Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Access value in HTML. Urgent. Thank You.

Reply
Thread Tools

Access value in HTML. Urgent. Thank You.

 
 
Shapper
Guest
Posts: n/a
 
      04-29-2005
Hello,

I have this:
Sub Page_Load(Sender As Object, E As EventArgs)
Response.Write(Session("culture"))
End Sub

It displays Session("culture") value.

I want to access this value in my HTML code.
I thought it would be something like:

<%# Response.Write(Session("culture")) %>

It's not working. What am I doing wrong?

Thanks,
Miguel

 
Reply With Quote
 
 
 
 
Shane Thomas
Guest
Posts: n/a
 
      04-29-2005
"Shapper" <mdmoura*NOSPAM*@gmail.*DELETE2SEND*com> wrote in message
news:mdmoura*NOSPAM*@gmail.*DELETE2SEND*com:

> <%# Response.Write(Session("culture")) %>


Don't use the "#", just <% ... %>


-shane

 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      04-29-2005
Try :

Dim x as String
x = (Session("culture"))

Now you can manipulate x as you see fit.



Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"Shapper" <mdmoura*NOSPAM*@gmail.*DELETE2SEND*com> wrote in message
news:(E-Mail Removed)...
> Hello,
>
> I have this:
> Sub Page_Load(Sender As Object, E As EventArgs)
> Response.Write(Session("culture"))
> End Sub
>
> It displays Session("culture") value.
>
> I want to access this value in my HTML code.
> I thought it would be something like:
>
> <%# Response.Write(Session("culture")) %>
>
> It's not working. What am I doing wrong?
>
> Thanks,
> Miguel
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
send me passwords to access intelius site thank you csmith463 Computer Support 3 11-15-2006 05:57 PM
?? dropdownlist in datagrid, not defaulting to current value ??? THANK YOU jason@cyberpine.com ASP .Net 2 02-16-2005 03:10 PM
RE: How to access an event of a custom control??? Thank you! =?Utf-8?B?RGFuaWVsIFdhbHplbmJhY2g=?= ASP .Net 1 04-05-2004 04:52 AM
Thank You CJ, Thank Mike! mytho Computer Support 7 11-23-2003 06:50 AM



Advertisments