M
Mike
In a test project, I have created two WebForms and one WebUserControl that contains a textbox and a button. I would like to display a string in the textbox when the WebForm1 is used, but another string when WebForm2 is used. How can I do this? Do I have to create 2 different classes and then reference them in the "@ Register" directive, like this?
In WebForm1:
<%@ Register TagPrefix="uc1" TagName="WebUserControl1" Src="WebCtrlForForm1.ascx" %>
In WebForm2:
<%@ Register TagPrefix="uc1" TagName="WebUserControl1" Src="WebCtrlForForm2.ascx" %>
But what about the default class that is created when I create the WebUserControl? Is it safe to delete it? Is the strategy I am indicating here correct at all?
Thanks
Mike
In WebForm1:
<%@ Register TagPrefix="uc1" TagName="WebUserControl1" Src="WebCtrlForForm1.ascx" %>
In WebForm2:
<%@ Register TagPrefix="uc1" TagName="WebUserControl1" Src="WebCtrlForForm2.ascx" %>
But what about the default class that is created when I create the WebUserControl? Is it safe to delete it? Is the strategy I am indicating here correct at all?
Thanks
Mike