RadioButton not being selected with Click()http://forums.asp.net/t/1637408.aspx/1?RadioButton+not+being+selected+with+Click+Fri, 07 Jan 2011 21:15:41 -050016374084230004http://forums.asp.net/p/1637408/4230004.aspx/1?RadioButton+not+being+selected+with+Click+RadioButton not being selected with Click() <p>I need to select a radio button, but when I use Click(), it doesn't get checked.&nbsp; My code is:</p> <p>Dim p as new HtmlPage(&quot;BloodPressureDemographicV100P01.aspx&quot;)&nbsp;<br> p.Elements.Find(&quot;SmokingStatus_0&quot;).Click()</p> <p>The element exists on the page, but it never gets selected.&nbsp; I also tried HtmlElement.DispatchEvent(New HtmlMouseEvent(&quot;click&quot;)), but it doesn't work, either.</p> <p>Can&nbsp;anyone help?</p> 2010-12-29T15:18:02-05:004230371http://forums.asp.net/p/1637408/4230371.aspx/1?Re+RadioButton+not+being+selected+with+Click+Re: RadioButton not being selected with Click() <p>After some hair pulling, I realized that an ASP.NET RadioButtonList renders as a span with a radio button element and a label&nbsp;element inside it.&nbsp; The solution, using the code above,&nbsp;is to do this:</p> <p>&nbsp;p.Elements.Find(&quot;SmokingStatus_0&quot;)<strong>.ChildElements(0)</strong>.Click()</p> 2010-12-29T20:02:14-05:004243422http://forums.asp.net/p/1637408/4243422.aspx/1?Re+RadioButton+not+being+selected+with+Click+Re: RadioButton not being selected with Click() <p>Sorry for the late reply...&nbsp;Glad you got it working. :)</p> <p>Cheers!</p> 2011-01-07T21:15:41-05:00