I have two user controls attached to my Master page. (vb.net)
These user controls display ads, and the pnly difference between them is the width of the ads they should diplay.
Is there some way in which I can just register one user control, but use it twice, and then pass different integers to them?
In other words, instead of having this:
@ Register Src="Ads240.ascx" TagName="Ads240" TagPrefix="uc240" %>
@ Register Src="Ads120.ascx" TagName="Ads120" TagPrefix="uc120" %>
I'd only like to register one of them:
@ Register Src="Ads.ascx" TagName="Ads" TagPrefix="ucAds" %>
Then from the .aspx page I'd like to have two of these:
<ucAds:Ads ID="Ads" runat="server" />
but kind of send different values to them (like "Usercontrolparameter=120")
How do I do this?
I have looking at properties and the like, but I don't know if they can let me reuse the user control file with different values.
Thanks for any help!
View Complete Post