Hey,
I have a user control that I want to use as a header in my application
on different pages.
So I follow the example first from one book but it doesn't work, then
from second book...etc since quite a few hours already.
My user control is very simple, has label1 and property:
Public Property Lab() As String
Get
Return label1.Text
End Get
Set(ByVal Value As String)
label1.Text = Value
End Set
End Property
Then I added it to the page where I wanted to use it. When I try to run
my page I get an error:
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not
set to an instance of an object.
Source Error:
Line 22:
Line 23: Private Sub Page_Load(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles MyBase.Load
Line 24: headercontracts1.napis1 = "Text"
Line 25: End Sub
I have no idea what can be wrong.
Regards
Arek
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!