tag:blogger.com,1999:blog-3923359343089034996.post3235609674755965775..comments2023-06-14T08:47:52.501-07:00Comments on Project 31-A: RadioButtonList Error With UpdatePanelsWayne Walter Berryhttp://www.blogger.com/profile/07116744675621334568noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-3923359343089034996.post-56721024821923131902012-03-07T05:20:32.881-08:002012-03-07T05:20:32.881-08:00Forgot to say, change "cphContent" to th...Forgot to say, change "cphContent" to the name of your UpdatePanel, e.g. UpdatePanel1.Akihttp://www.smart-survey.co.uk/noreply@blogger.comtag:blogger.com,1999:blog-3923359343089034996.post-24716013537095604952012-03-07T05:18:33.083-08:002012-03-07T05:18:33.083-08:00I spent hours trying to figure this problem, and t...I spent hours trying to figure this problem, and the solution posted on this article didn't work for me. I added this to the codebehind to get it working:<br /><br />-------<br />VB<br />-------<br />RadioButtonList1.SelectedValue = "Option1"<br />RadioButtonList1.SelectedItem.Attributes.Add("onclick", "javascript:setTimeout('__doPostBack(\'ctl00$cphContent$RadioButtonList1$" & RadioButtonList1.SelectedIndex & "\',\'\')', 0)")<br /><br />-------<br />C#<br />-------<br />RadioButtonList1.SelectedValue = "Option1";<br />RadioButtonList1.SelectedItem.Attributes.Add("onclick", "javascript:setTimeout('__doPostBack(\\'ctl00$cphContent$RadioButtonList1$" + RadioButtonList1.SelectedIndex + "\\',\\'\\')', 0)");<br /><br /><br /><br />This will manually add the onclick code after the item has been selected.<br /><br />Hope this helps!Akihttp://www.smart-survey.co.uk/noreply@blogger.comtag:blogger.com,1999:blog-3923359343089034996.post-51773749331338269102009-04-04T16:56:00.000-07:002009-04-04T16:56:00.000-07:00Isn't it evil to populate a data source in the Loa...Isn't it evil to populate a data source in the Load event instead of the Init? I've been reading up on ViewState and whatnot here...<BR/><BR/>http://weblogs.asp.net/infinitiesloop/archive/2006/08/03/Truly-Understanding-Viewstate.aspx<BR/><BR/>Thoughts?Billhttp://www.billforney.com/noreply@blogger.com