Forum Moderators: bakedjake

Message Too Old, No Replies

Response write vs Text as a lable

ASP.net hell

         

chris_f

2:10 pm on May 13, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is driving me crazy. It's something so simple but it doesn't work.

WHY?

I have an application variable called 'CurrentSessions'. In this is the number of session the web server has open. I wish to display this on a page a an asp label. I have declare a label called 'NumOfSess'. I have used

NumOfSess.Text = Application("CurrentSessions")

to populate the label. However, when I run the app the label is blank. To check that the variable is passed correctly I did

Response.Write(NumOfSess.Text)

and the returns the value correctly.

Can you please tell me why

<asp:Label ID="NumOfSess" Runat="server" />

is not picking up the value. If you need I'll sticky you the code. However, it's another persons work in progress so there's some stuff that is commented out because it doesn't work.

Chris

korkus2000

5:17 pm on May 13, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



From what you are showing it should work. Sticky me.

Are you calling the function Page_Init() or Page_Load()?

Filipe

10:12 pm on May 13, 2002 (gmt 0)

10+ Year Member



What language are you using?