For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > April 2005 > Access value in HTML. Urgent. Thank You.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Access value in HTML. Urgent. Thank You.
Shapper

2005-04-29, 8:59 pm

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

Shane Thomas

2005-04-29, 8:59 pm

"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

Juan T. Llibre

2005-04-29, 8:59 pm

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:eJQlNiQTFHA.336@TK2MSFTNGP09.phx.gbl...
> 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
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com