Access value in HTML. Urgent. Thank You.

Discussion in 'ASP .Net' started by Shapper, Apr 29, 2005.

  1. Shapper

    Shapper Guest

    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
    Shapper, Apr 29, 2005
    #1
    1. Advertising

  2. Shapper

    Shane Thomas Guest

    "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
    Shane Thomas, Apr 29, 2005
    #2
    1. Advertising

  3. 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:...
    > 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
    >
    Juan T. Llibre, Apr 29, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Miguel Dias Moura
    Replies:
    2
    Views:
    10,478
    Bruno Sirianni
    Apr 5, 2004
  2. Miguel Dias Moura

    Error with a code line. Urgent. Thank You.

    Miguel Dias Moura, Jun 14, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    274
  3. Miguel Dias Moura
    Replies:
    2
    Views:
    333
    Martin
    Jun 22, 2004
  4. Miguel Dias Moura
    Replies:
    4
    Views:
    3,290
    Miguel Dias Moura
    Jun 23, 2004
  5. Shapper

    Cookie. Urgent. Thank You.

    Shapper, May 5, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    317
    Brock Allen
    May 5, 2005
Loading...

Share This Page