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