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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. passing session details from user control

passing session details from user control

Scheduled Pinned Locked Moved ASP.NET
winformshelptutorialannouncement
7 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.
  • D Offline
    D Offline
    dotnetcsharpdev
    wrote on last edited by
    #1

    I have a page which has 4 user controls on it. The problem is : I have a link on this user control and when clicked goes to other page but I dunno how to pass the session variable to the other page from this page containing that uc. The other page always gets the same values as the session variable doesn't update when user control is clicked for different values.

    N A 2 Replies Last reply
    0
    • D dotnetcsharpdev

      I have a page which has 4 user controls on it. The problem is : I have a link on this user control and when clicked goes to other page but I dunno how to pass the session variable to the other page from this page containing that uc. The other page always gets the same values as the session variable doesn't update when user control is clicked for different values.

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      Session["SomeKey"] = SomeValue This doesn't work for you? Perhaps you should show a little of what you are doing.


      only two letters away from being an asset

      D 1 Reply Last reply
      0
      • N Not Active

        Session["SomeKey"] = SomeValue This doesn't work for you? Perhaps you should show a little of what you are doing.


        only two letters away from being an asset

        D Offline
        D Offline
        dotnetcsharpdev
        wrote on last edited by
        #3

        the session values pass across all pages . The problem is on this page I have a user control which is a grid with links. when i click on these links i am passed to other pages with different values for different links of the grid. but the next page gets only those values which are set in the first page where UC is embedded I need to change values in UC.

        N 1 Reply Last reply
        0
        • D dotnetcsharpdev

          the session values pass across all pages . The problem is on this page I have a user control which is a grid with links. when i click on these links i am passed to other pages with different values for different links of the grid. but the next page gets only those values which are set in the first page where UC is embedded I need to change values in UC.

          N Offline
          N Offline
          Not Active
          wrote on last edited by
          #4

          I still don't get what the difficulty is. You can't handle the click event in the user control and make the appropriate settings?


          only two letters away from being an asset

          D 1 Reply Last reply
          0
          • D dotnetcsharpdev

            I have a page which has 4 user controls on it. The problem is : I have a link on this user control and when clicked goes to other page but I dunno how to pass the session variable to the other page from this page containing that uc. The other page always gets the same values as the session variable doesn't update when user control is clicked for different values.

            A Offline
            A Offline
            Arun Jacob
            wrote on last edited by
            #5

            If you want to set Session variable while clicking link you can do by Session["Key"]=value in the click event. Can u plz clarify your question so that we can help you? :)

            Arun Jacob http://codepronet.blogspot.com/

            N 1 Reply Last reply
            0
            • A Arun Jacob

              If you want to set Session variable while clicking link you can do by Session["Key"]=value in the click event. Can u plz clarify your question so that we can help you? :)

              Arun Jacob http://codepronet.blogspot.com/

              N Offline
              N Offline
              Not Active
              wrote on last edited by
              #6

              Wow, wish I had thought of that :rolleyes:


              only two letters away from being an asset

              1 Reply Last reply
              0
              • N Not Active

                I still don't get what the difficulty is. You can't handle the click event in the user control and make the appropriate settings?


                only two letters away from being an asset

                D Offline
                D Offline
                dotnetcsharpdev
                wrote on last edited by
                #7

                he he he!! sorry mayb i was not clear in my question. The thing is i was handling the UC [which had a grid with links]events and not UC Clicked event and that has limitations but i got a workaround. Many thanks.

                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