problem with creating a variable for usercontrol...?

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,084
Latest member
HansGeorgi

Latest Threads

Top