开发者

Usercontrol and Page Postback

I have a page with three radio buttons and a calendar usercontrol. The radio buttons have autopostback and depending on which one you click it should change the calendar availabilities based on the sel开发者_高级运维ected index. The problem is that the page load of the calendar is executing first before the selected index change (where I am setting the needed id).

Any suggestions?


You shouldn't initialize your Calendar-Control automatically in Page_Load. It should only be initialized through a public method. You could call this method If Not Page.IsPostback with default-settings and from your SelectedIndexChanged event-handler with the selected value(s) as parameter(s).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜