I've created a user control Header which is a header with a page title. I
want to set the page title from code, so I've made it a property:
Public Property PageTitle() As String
Get
Return lblHeading.Text
End Get
Set(ByVal Value As String)
lblHeading.Text = Value
End Set
End Property
In the main page, I've dragged and dropped the user control on to my page,
I've created the control in my code-behind:
Dim C1 As NEW Header
C1.PageTitle = "This is the heading"
However, this is giving me an error: "Object reference not set to an
instance of an object"
I'm sure the name is right, so what I am missing. Here's the HTML where the
control is added:
<uc1:Header id="uCtlHeader" runat="server"></uc1:Header>
I've tried
"Dim c1 As Header = New Header"
but that didn't work either.
Please help me..
Thanks,
Faisel
------------------------ Yahoo! Groups Sponsor --------------------~-->
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/