G
Gramps
Hi,
I have a simple ascx(Banner) that consists of an image a
label and a public property, 'ThisTitle'. From a page I
want to set the label via assignment to the property. The
only way I can find to set this property is in the HTML of
my page:
<uc1:Banner id="Banner1" runat="server"
ThisTitle="Login"></uc1:Banner>
and in the code-behind Page_Load of the ascx I have:
lbl.Text=this.ThisTitle.
This works and allows me to provide a common image banner
with page specific text.
1) Can I set the 'ThisTitle' property of ascx in code-
behind of my PAGE?
2) I have a second ascx which uses the first as a
constiuent control to provide greater common functinoality
to those pages that need it. From a page containing this
new 'bigger' ascx, how can I set 'ThisTitle' of the Banner
ascx that it contains? Again, I would prefer to do this
from the code-behind of the page.
I am using VS.Net IDE and C#
Thanks
I have a simple ascx(Banner) that consists of an image a
label and a public property, 'ThisTitle'. From a page I
want to set the label via assignment to the property. The
only way I can find to set this property is in the HTML of
my page:
<uc1:Banner id="Banner1" runat="server"
ThisTitle="Login"></uc1:Banner>
and in the code-behind Page_Load of the ascx I have:
lbl.Text=this.ThisTitle.
This works and allows me to provide a common image banner
with page specific text.
1) Can I set the 'ThisTitle' property of ascx in code-
behind of my PAGE?
2) I have a second ascx which uses the first as a
constiuent control to provide greater common functinoality
to those pages that need it. From a page containing this
new 'bigger' ascx, how can I set 'ThisTitle' of the Banner
ascx that it contains? Again, I would prefer to do this
from the code-behind of the page.
I am using VS.Net IDE and C#
Thanks