Welcome to WebmasterWorld Guest from 54.198.205.145

Forum Moderators: bakedjake

Message Too Old, No Replies

Response write vs Text as a lable

ASP.net hell

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 5, 2002
posts:1510
votes: 0


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

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

Senior Member

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 20, 2002
posts:3732
votes: 0


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

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

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

Preferred Member

10+ Year Member

joined:Apr 25, 2002
posts:470
votes: 0


What language are you using?