C
Chris Fink
Hello,
I have a user control that contains a datalist and within that a asp label,
as follows:
<aspataList ID="dlHomeDetail_Starters" Runat="server" CellPadding="1"
CellSpacing="1" Width="100%" RepeatDirection="Vertical" RepeatColumns="1">
<HeaderTemplate>
<tr class=mainhead vAlign=center>
<td class=away colSpan=5><asp:Label ID="lblGroupName"
Runat="server"></asp:Label></td>
</tr>
<tr class=bg1 align=middle>
In my code behind, in the page load event I am receiving this error "Object
reference not set to an instance of an object" on this line
lblGroupName.Text = "Test".
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
lblGroupName.Text = "Test"
dlHomeDetail_Starters.DataSource =
oFFLLeague.getPlayerStats_TeamSummary(Session("FFLLeagueID"),
Request.Params("week"),
oFFLLeague.getHomeTeamIDFromGameID(Request.Params("week"),
Request.Params("gid")), "Starters")
dlHomeDetail_Starters.DataBind()
End Sub
Is my problem due to the sequence of events in the webform page load and
that the label is not yet available? I always find understanding the order
of events confusing when using a user control.
Any help is appreciated,
Thanks Chris
I have a user control that contains a datalist and within that a asp label,
as follows:
<aspataList ID="dlHomeDetail_Starters" Runat="server" CellPadding="1"
CellSpacing="1" Width="100%" RepeatDirection="Vertical" RepeatColumns="1">
<HeaderTemplate>
<tr class=mainhead vAlign=center>
<td class=away colSpan=5><asp:Label ID="lblGroupName"
Runat="server"></asp:Label></td>
</tr>
<tr class=bg1 align=middle>
In my code behind, in the page load event I am receiving this error "Object
reference not set to an instance of an object" on this line
lblGroupName.Text = "Test".
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
lblGroupName.Text = "Test"
dlHomeDetail_Starters.DataSource =
oFFLLeague.getPlayerStats_TeamSummary(Session("FFLLeagueID"),
Request.Params("week"),
oFFLLeague.getHomeTeamIDFromGameID(Request.Params("week"),
Request.Params("gid")), "Starters")
dlHomeDetail_Starters.DataBind()
End Sub
Is my problem due to the sequence of events in the webform page load and
that the label is not yet available? I always find understanding the order
of events confusing when using a user control.
Any help is appreciated,
Thanks Chris