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. to retrieve userid & name

to retrieve userid & name

Scheduled Pinned Locked Moved ASP.NET
asp-netdatabasehelpquestion
2 Posts 2 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.
  • S Offline
    S Offline
    sk_ko
    wrote on last edited by
    #1

    now I imported all tables of aspnetdb to my another database using aspnet_regsql command. it is ok. then In this database, I created only other user info table (including userid, name...) , beside aspnetdb's aspnet_Users table. Creating New user is also inserting into both tables. It is OK. now what I want to ask is: after one user is logged in, i want to take this userid and name and take them to another page using QueryString. how I have to do? please help me.

    M 1 Reply Last reply
    0
    • S sk_ko

      now I imported all tables of aspnetdb to my another database using aspnet_regsql command. it is ok. then In this database, I created only other user info table (including userid, name...) , beside aspnetdb's aspnet_Users table. Creating New user is also inserting into both tables. It is OK. now what I want to ask is: after one user is logged in, i want to take this userid and name and take them to another page using QueryString. how I have to do? please help me.

      M Offline
      M Offline
      Morgs Morgan
      wrote on last edited by
      #2

      You already have the idea of using query string to pass your parameters to the next page and all you could have done is googled how to use query string, let's see if this helps:

      //pass the parameters like so:
      Response.Redirect( "home.aspx?userid=" + userid.Text + "&name=" + name.Text() )

      and on home.aspx page load event you can retrieve your parameters from the query string like so:

      if( Request.QueryString[ "userid" ] != null && Request.QueryString[ "name" ] != null )
      {
      String userid = Request.QueryString[ "userid" ];
      String name = Request.QueryString[ "name" ];
      }
      else
      {
      //the query strings do not exist/were not passed
      }

      Want more: Passing variables between pages using QueryString[^] Happy coding, Morgs

      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