|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Accessing Controls in LoginViewHi All,
This should be easy. I have a LoginView control on my default page. Within the LoggedInTemplate, I have a DropDownList control. From my code-behind cs file (in the DropDownList_SelectedIndexChanged method), how can I access the DropDownList to see what selection was made? A small code snippet would be very helpful. Thanks, Steve If that event is already raised ok, and it is raised by the DropDownList you
want to access, just get it via sender argument e.g you have protected void DropDownList1_selectedIndexChanged(object sender, EventArgs e) { DropDownList list=(DropDownList)sender; //Do something with the DDL } E.g in .NET object raising the event is always accessible via the sender argument. Wiring event handlers with that signature is standard in .NET. Show quoteHide quote "Steve Harp" <NoSpam@NoPlace.com> wrote in message news:n0irt2dr6mft7tln6307be6cp2csbdv740@4ax.com... > Hi All, > > This should be easy. I have a LoginView control on my default page. > Within the LoggedInTemplate, I have a DropDownList control. From my > code-behind cs file (in the DropDownList_SelectedIndexChanged method), > how can I access the DropDownList to see what selection was made? A > small code snippet would be very helpful. > > Thanks, > Steve
Custom Server Control
Loading webcontrols problem menu control StaticSelectedStyle Problem with javascript file in ASP Datagrid on WebPart: After postback Data is disappearing ASP:Menu control Dropdowns show above Main Menu Managed control and security how to trigger action from button embedded in another control? problem with FindControl How to Disabled node in Treeview |
|||||||||||||||||||||||