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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use ascx include files dynamically ?

Status
Not open for further replies.

fly231

Programmer
May 29, 2005
24
GB
Hi,
I would appreciate it very much if someone could help me with this.
I'm having problems figuring out how to us ascx files dynamically.
Like in a IF statement
IF(showID)
{
<UserControl1:form1 runat="server"/>
}
else
<UserControl1:form2 runat="server"/>
}

signupForm1 and signupForm2 are registered like this :

<%@ Register TagPrefix="UserControl1" TagName="form1" Src="includes/signupForm1.ascx" %> ,

<%@ Register TagPrefix="UserControl1" TagName="form2" Src="includes/signupForm2.ascx" %> .

What I want to know is, how to use them in an IF statement.
Or if I could change it's SRC property dynamically.


Thanks
 

This exactly what I was looking for.
Thank you so much for the information.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top