Click here to Skip to main content
15,922,407 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
please help me to solve following problem....

My default page consists of 5 register directives for 5 tags that call controls it depends on year actually like if current year is 12 then it uses user control12 n if current year is 11 it uses for11.

so i want to do something like this in the code section: get a particular variable, call it when year is set 12 it uses user control 12 , please let me know but my main question is, how can i change the src on the register directive to change of year.

Thanks in advance!!!!!!
Posted
Comments
ZurdoDev 17-Feb-12 7:56am    
That gets compiled into the dll so I have never seen anyone wanting to control that dynamically. Sounds like you just need to write code to load the control dynamically and add it to the form instead of trying to do the route you are going.
BobJanova 17-Feb-12 9:21am    
"if current year is 12 then it uses user control12 n if current year is 11 it uses for11."
This is very deeply broken and you should stop doing that. Controls should be generic things that don't depend on the context in which you want to use them.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900