Display Session Variable in textbox?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • What-a-Tool

    Display Session Variable in textbox?

    I want to display a session variable as a textbox value:

    <input type="text" ...... value="<%=Sessi on("myvar")%>" >

    I've tried several different variation of this and can't get it to display
    properly with any.

    Help please?

    Sean


  • Steven Burn

    #2
    Re: Display Session Variable in textbox?

    <%
    Session("MySess ion")="abcdefg "
    sTemp = Session("MySess ion")
    %>

    <input type="text" value="<%=sTemp %>" name="txtSessio nValue">

    --
    Regards

    Steven Burn
    Ur I.T. Mate Group


    Keeping it FREE!

    "What-a-Tool" <Die!FrigginSpa mmers!DieDie!@I HateSpam.Com> wrote in message news:KDh%d.7011 4$SF.58946@lake read08...[color=blue]
    > I want to display a session variable as a textbox value:
    >
    > <input type="text" ...... value="<%=Sessi on("myvar")%>" >
    >
    > I've tried several different variation of this and can't get it to display
    > properly with any.
    >
    > Help please?
    >
    > Sean
    >
    > [/color]

    Comment

    • Aaron [SQL Server MVP]

      #3
      Re: Display Session Variable in textbox?

      Does it work if you just do <%=Session("myv ar")%> straight to the screen?
      (My guess is that the session variable is empty, because your syntax below
      looks fine... as long as the session variable can't contain "


      On 3/20/05 11:36 AM, in article KDh%d.70114$SF. 58946@lakeread0 8,
      "What-a-Tool" <Die!FrigginSpa mmers!DieDie!@I HateSpam.Com> wrote:
      [color=blue]
      > I want to display a session variable as a textbox value:
      >
      > <input type="text" ...... value="<%=Sessi on("myvar")%>" >
      >
      > I've tried several different variation of this and can't get it to display
      > properly with any.
      >
      > Help please?
      >
      > Sean
      >
      >[/color]

      Comment

      • What-a-Tool

        #4
        Re: Display Session Variable in textbox?

        What my posted code string displays in the text box is :
        "<%=Session (" -inside the text box, and a final ">" -outside the
        text box




        "Aaron [SQL Server MVP]" <ten.xoc@dnartr eb.noraa> wrote in message
        news:BE631B1B.4 07C%ten.xoc@dna rtreb.noraa...[color=blue]
        > Does it work if you just do <%=Session("myv ar")%> straight to the screen?
        > (My guess is that the session variable is empty, because your syntax below
        > looks fine... as long as the session variable can't contain "
        >
        >
        > On 3/20/05 11:36 AM, in article KDh%d.70114$SF. 58946@lakeread0 8,
        > "What-a-Tool" <Die!FrigginSpa mmers!DieDie!@I HateSpam.Com> wrote:
        >[color=green]
        >> I want to display a session variable as a textbox value:
        >>
        >> <input type="text" ...... value="<%=Sessi on("myvar")%>" >
        >>
        >> I've tried several different variation of this and can't get it to
        >> display
        >> properly with any.
        >>
        >> Help please?
        >>
        >> Sean
        >>
        >>[/color]
        >[/color]


        Comment

        • What-a-Tool

          #5
          Re: Display Session Variable in textbox?

          Thank you for your help - got it working - just noticed I was doing
          something stupid that I kept overlooking.

          Thank you again


          "Aaron [SQL Server MVP]" <ten.xoc@dnartr eb.noraa> wrote in message
          news:BE631B1B.4 07C%ten.xoc@dna rtreb.noraa...[color=blue]
          > Does it work if you just do <%=Session("myv ar")%> straight to the screen?
          > (My guess is that the session variable is empty, because your syntax below
          > looks fine... as long as the session variable can't contain "
          >
          >
          > On 3/20/05 11:36 AM, in article KDh%d.70114$SF. 58946@lakeread0 8,
          > "What-a-Tool" <Die!FrigginSpa mmers!DieDie!@I HateSpam.Com> wrote:
          >[color=green]
          >> I want to display a session variable as a textbox value:
          >>
          >> <input type="text" ...... value="<%=Sessi on("myvar")%>" >
          >>
          >> I've tried several different variation of this and can't get it to
          >> display
          >> properly with any.
          >>
          >> Help please?
          >>
          >> Sean
          >>
          >>[/color]
          >[/color]


          Comment

          Working...