I have a datagrid with a button column that displays some partner
info. i.e. PartnerId, PartnerName ... The button column has a button
that when the user clicks it they are redirected or server.transfer to
a different page where I would like to pass the PartnerId. I could do
this very easy with a QueryString, but would rather not display this
info in the URL. I want to pass this by creating a form variable
using the RegisterHiddenField() function.
i.e.
Private Sub PartnerGrid_ItemCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs ) Handles
PartnerGrid.ItemCommand
RegisterHiddenField("PartnerID", _
PartnerGrid.DataKeys(e.Item.ItemIndex)
If e.CommandName.ToString() = "Preview" Then
'Server.Transfer("Somewhere")
End If
End Sub
Now the problem here is when I call the RegisterHiddenField() the page
is not Posted again before the Server.Transfer so the value of
"PartnerId" is never updated. How do I repost this page so this value
is updated before I Server.Transfer?