Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. add session variable to querystring in aspx not thru codepage

add session variable to querystring in aspx not thru codepage

Scheduled Pinned Locked Moved ASP.NET
tutorialquestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    thedom2
    wrote on last edited by
    #1

    can this be done anyone ? obviously the code below does not work but if someone knows how to embed session varible within querystring in the aspx page that would be awesome. thank anyway ppl something like this :

    hyperlinkfield headertext="User Name" datatextfield="username" datanavigateurlformatstring="test.aspx?session("usercode")

    V S 2 Replies Last reply
    0
    • T thedom2

      can this be done anyone ? obviously the code below does not work but if someone knows how to embed session varible within querystring in the aspx page that would be awesome. thank anyway ppl something like this :

      hyperlinkfield headertext="User Name" datatextfield="username" datanavigateurlformatstring="test.aspx?session("usercode")

      V Offline
      V Offline
      Vasudevan Deepak Kumar
      wrote on last edited by
      #2

      That would be clumsy. Can you generate the formatstring neatly in the codebehind rather than making a spagetti code in the ASPX?

      Vasudevan Deepak Kumar Personal Homepage
      Tech Gossips
      All the world's a stage, And all the men and women merely players. They have their exits and their entrances; And one man in his time plays many parts... --William Shakespeare

      T 1 Reply Last reply
      0
      • V Vasudevan Deepak Kumar

        That would be clumsy. Can you generate the formatstring neatly in the codebehind rather than making a spagetti code in the ASPX?

        Vasudevan Deepak Kumar Personal Homepage
        Tech Gossips
        All the world's a stage, And all the men and women merely players. They have their exits and their entrances; And one man in his time plays many parts... --William Shakespeare

        T Offline
        T Offline
        thedom2
        wrote on last edited by
        #3

        can you show suggestion ?

        V 1 Reply Last reply
        0
        • T thedom2

          can you show suggestion ?

          V Offline
          V Offline
          Vasudevan Deepak Kumar
          wrote on last edited by
          #4

          If you have <asp:hyperlink as a runat server and give an ID to it, you can access the same from codebehind and set is properties in page_load. At runtime, the necessary HTML would be generated for you.

          Vasudevan Deepak Kumar Personal Homepage
          Tech Gossips
          All the world's a stage, And all the men and women merely players. They have their exits and their entrances; And one man in his time plays many parts... --William Shakespeare

          1 Reply Last reply
          0
          • T thedom2

            can this be done anyone ? obviously the code below does not work but if someone knows how to embed session varible within querystring in the aspx page that would be awesome. thank anyway ppl something like this :

            hyperlinkfield headertext="User Name" datatextfield="username" datanavigateurlformatstring="test.aspx?session("usercode")

            S Offline
            S Offline
            sukkureddy
            wrote on last edited by
            #5

            Hi... try the follwoing datanavigateurlformatstring='"test.aspx?code=""+<%= session("PagePath") %>"' i hope it wil work for u

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups