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. asp dot net - session state

asp dot net - session state

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

    Now I need a help from you quite urgent. I read a data from DataSet as EmpID. Display the EmpID in form1.aspx using Label control. Data Enter in textbox controll like salary. Now click a submit button. The form refresh and update the salary respective EmpID. Next we want the empID move to next employee. How to apply the above task. I try to session state but not working. my form was developed following method. form.aspx " runat="server"> form.aspx.vb dim cmd as new sqlcommand("Select EmpID from MyTable", connection) dim adp as new sqldataadapter(cmd) dim ds as new DataSet() Try connection.open() adp.fill(ds,"MyTable") session("ds") = ds.tables("MyTable") catch finally connection.close() end try abglorie

    O 1 Reply Last reply
    0
    • A abglorie

      Now I need a help from you quite urgent. I read a data from DataSet as EmpID. Display the EmpID in form1.aspx using Label control. Data Enter in textbox controll like salary. Now click a submit button. The form refresh and update the salary respective EmpID. Next we want the empID move to next employee. How to apply the above task. I try to session state but not working. my form was developed following method. form.aspx " runat="server"> form.aspx.vb dim cmd as new sqlcommand("Select EmpID from MyTable", connection) dim adp as new sqldataadapter(cmd) dim ds as new DataSet() Try connection.open() adp.fill(ds,"MyTable") session("ds") = ds.tables("MyTable") catch finally connection.close() end try abglorie

      O Offline
      O Offline
      oceanexplorer
      wrote on last edited by
      #2

      Hi, You may want to look more into using a datareader for this type of usuage if your wanting to cycle through a record at a time. An SqlDataReader sits in the System.Data.SqlClient namespace. You call a read by something like this (this isn't perfect code as I work in c#!) SqlConnectionconnection = newSqlConnection("myconnectionstringhere") Dim command As SqlCommand = newSqlCommand("SELECT * FROM Customers", connection) connection.Open() Dim data As SqlDataReader = command.ExecuteReader() data.read() The Data.Read method will advance and retrieve the next record. Remember to close the connection once your done with it. Do a search on google for SqlDateReader and you will get information on it's usage back. Regards Paul

      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