asp.net - How to set dropdownlist in .aspx page from managed code via DOM -
I have a control that sits in the .aspx page, but the dynamic code
On the same page as the control, I have:
& lt; Asp: DropDownList ID = "DropDownAppServer" runat = "server" & gt; Page.xaml.cs I have tried to: HtmlElement element = doc.GetElementById ("DropDownAppServer"); Element.SetAttribute ("Option", "Blow");
Not working though it works with:
& lt; Input type = "text" id = "text1" disabled = "disabled" value = "my initial value" />
Can not you tell why you are not
DropDownAppServer.Option = blah? If you do not have explicit access to control, you can use the FindControl (ctrlName) function to get context for children's objects.
Comments
Post a Comment