Pass data from gridview to new page without using querystring

Pass data from gridview to new page without using querystring

am 18.10.2007 17:03:05 von dakota64

Greetings all, I have a gridview that I need to pass the primary key
from a selected row to a new page. I have it working with a
querystring, but I would like to do it without using the querystring.

DataNavigateUrlFormatString="MultilineEdit.aspx?Pkey={0}" />

I have been trying to use session and context, but I have not been
able to get anything to work. The code below is what I have. Thank
you in advance for your help..

Protected Sub GridView1_SelectedIndexChanged(ByVal sender As
Object, ByVal e As System.EventArgs) Handles
GridView1.SelectedIndexChanged
Dim strString As String
strString = GridView1.SelectedRow.Cells.Item(0).Text.ToString

Session.Item("MyPkey") = strString
Response.Redirect("MultilineEdit.aspx")

'Context.Items.Add("MyPkey", strString)
'Server.Transfer("MultilineEdit.aspx")
End Sub