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).
精彩评论