Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
User Control - raising an event
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
User Control - raising an event
Environment versions
OS:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01327983
Message ID:
01327983
Views:
65
Hi everybody,

I have the following code in the page
 <label class="bx">
                                Gender</label><span class="bx"><asp:DropDownList ID="ddlGender" OnSelectedIndexChanged="chkGender"
                                    AutoPostBack="true" ToolTip="Select Gender" runat="server" SelectedValue='<%# Bind("Gender") %>'
                                    CssClass="gndr">
                                    <asp:ListItem Value="M">Male</asp:ListItem>
                                    <asp:ListItem Value="F">Female</asp:ListItem>
                                </asp:DropDownList>
                                </span>
and in the chkGender event handler we set ViewState to the value of the gender. Some other controls are dependant on this value.

Now, I'd like to use the GeneralInfo UserControl I designed instead. However, I'm not certain how to expose the OnSelectedIndexChanged event.

Do you have samples or ideas how this should be done?

Thanks a lot in advance.

Reading this http://chiragrdarji.wordpress.com/2007/08/23/raise-event-from-user-control-to-main-page-event-delegation-from-user-control-to-aspx-page-in-aspnetc/ in the meantime.
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform