Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to run onSelectedIndexChanged when the combo is inside User Contr

Status
Not open for further replies.

ehx6

IS-IT--Management
May 20, 2004
150
US
Hi , I am able to put the following code in an aspx page then once the selected index changed, I can run a method to do process some code.
<asp:dropdownlist id="ddlPartnership" AutoPostBack="true" Runat="server" OnSelectedIndexChanged="FillddlProject" />

The Question, is now I have created a user control where I put the above code inside ueser control, then I used the Usercontrol in an aspx page :
<%@ Register TagPrefix="uc1" TagName="PIPT_Combo_Investor_cr" Src="PIPT_Combo_Investor_cr.ascx" %>

SO if I want to run some code once the user changed the selected index, how can I do that.
thanks for your help
Ehx
 
Hi,

Put the code in the code behind for the page PIPT_Combo_Investor_cr.ascx

JB

----------------------------------------------------------------------------------------
 
Do you mean to put the code beind of the user control behind the client aspx code behind? So what is the purpose of using User control. I am trying to be able to shield all the code inside the user control, so when I use the user cotnrol in any pages, I only see resutls of the combo;however, I was not able to use <<<OnSelectedIndexChanged="FillddlProject>>> at the client aspx page when I use the user control.
What basically I am trying to do is the user control has 2 combo , first one drive the second one,This is working well, but I also want the use once he select the first combo to hide a panel(which contain the return of data from database).

So I am not sure how to utilize "OnSelectedIndexChanged" when I do not have access to it from the client if using the user control..... any idea how to do it without copying the code behind of the user control to the client aspx page code behind.
thanks

ehx

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top