M
msnnews.msn.com
hi there,
i have a usercontrol that i use do display a list of news from db, depending
on the newsTypeID.
the problem is i put 3 of these on one page, and gave them each a different
newsTypeID (1,2,3) but it always returns the last one..in ASP.NET 1.1 it
worked okay, now in 2.0 it doesnt seem to wanna work for me, unless i'm
doing something wrong?? please help, code is below:
my ASP.NET page has the following reference to the usercontrols, with the
additional variable added (newstypeid)
----------------------------------------------------------
<div id="s2"><uc1:uc_Announcements newstypeid="1" ID="Uc_Announcements1"
runat="server" />
</div>
<div id="s3">
<uc1:uc_Announcements newstypeid="1" ID="Uc_Announcements2" runat="server"
/>
</div>
<div id="s4"><uc1:uc_Announcements newstypeid="1" ID="Uc_Announcements3"
runat="server" />
</div>
----------------------------------------------------------
in the uc_Announcements.ascx - code behind i have
----------------------------------------------------------
Public Property newstypeid() As Integer
Get
Return a_typeID
End Get
Set(ByVal value As Integer)
a_typeID = value
End Set
End Property
Private a_typeID As Integer
i have a usercontrol that i use do display a list of news from db, depending
on the newsTypeID.
the problem is i put 3 of these on one page, and gave them each a different
newsTypeID (1,2,3) but it always returns the last one..in ASP.NET 1.1 it
worked okay, now in 2.0 it doesnt seem to wanna work for me, unless i'm
doing something wrong?? please help, code is below:
my ASP.NET page has the following reference to the usercontrols, with the
additional variable added (newstypeid)
----------------------------------------------------------
<div id="s2"><uc1:uc_Announcements newstypeid="1" ID="Uc_Announcements1"
runat="server" />
</div>
<div id="s3">
<uc1:uc_Announcements newstypeid="1" ID="Uc_Announcements2" runat="server"
/>
</div>
<div id="s4"><uc1:uc_Announcements newstypeid="1" ID="Uc_Announcements3"
runat="server" />
</div>
----------------------------------------------------------
in the uc_Announcements.ascx - code behind i have
----------------------------------------------------------
Public Property newstypeid() As Integer
Get
Return a_typeID
End Get
Set(ByVal value As Integer)
a_typeID = value
End Set
End Property
Private a_typeID As Integer