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. Store repeater value in session variable

Store repeater value in session variable

Scheduled Pinned Locked Moved ASP.NET
databasejsontutorial
3 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.
  • L Offline
    L Offline
    lionelcyril
    wrote on last edited by
    #1

    HI i have successfully created a connection string and the rest of the commands are as follows Dim cmd As New SqlCommand(sql, SQLConn) cmd.Connection.Open() Repeater1.DataSource = cmd.ExecuteReader() Repeater1.DataBind() cmd.Connection.Close() The above code works fine.. My doubt is that how to i get to store all rows of a column returned by a Repeater in a session variable.... Can do tht using a SQldatareader as: Session("SessionName")=readerobj("uid")

    N 1 Reply Last reply
    0
    • L lionelcyril

      HI i have successfully created a connection string and the rest of the commands are as follows Dim cmd As New SqlCommand(sql, SQLConn) cmd.Connection.Open() Repeater1.DataSource = cmd.ExecuteReader() Repeater1.DataBind() cmd.Connection.Close() The above code works fine.. My doubt is that how to i get to store all rows of a column returned by a Repeater in a session variable.... Can do tht using a SQldatareader as: Session("SessionName")=readerobj("uid")

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      lionelcyril wrote:

      My doubt is that how to i get to store all rows of a column returned by a Repeater

      Repeater doesn't have rows or columns.

      lionelcyril wrote:

      Can do tht using a SQldatareader as: Session("SessionName")=readerobj("uid")

      What are you trying to achieve? Why do you want to keep the repeater generated code in session? Are you trying to do some sort of caching?

      Best wishes, Navaneeth

      L 1 Reply Last reply
      0
      • N N a v a n e e t h

        lionelcyril wrote:

        My doubt is that how to i get to store all rows of a column returned by a Repeater

        Repeater doesn't have rows or columns.

        lionelcyril wrote:

        Can do tht using a SQldatareader as: Session("SessionName")=readerobj("uid")

        What are you trying to achieve? Why do you want to keep the repeater generated code in session? Are you trying to do some sort of caching?

        Best wishes, Navaneeth

        L Offline
        L Offline
        lionelcyril
        wrote on last edited by
        #3

        I figured out another way... i wanted to store a particular value from a database column into a session variable.. Anyways 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