grwallace
asked on
asp.net pass a parameter from a VB form to the next web form
I have a gridview on my first web form. and in the asscociated VB form I am extracting a value when the Select option is clicked as follows:-
Private Sub GridView1_SelectedIndexCha nged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.SelectedIndexCha nged
Try
StockPotrnId = GridView1.SelectedRow.Cell s(2).Text
Catch ex As Exception
End Try
Response.Redirect("frmstoc korderdeta il.aspx")
End Sub
The redirect works fine and loads the next page, but I need to pass the value of StockPotrn above to a DetailsView control on the next page.
Any ideas how to do this?
Private Sub GridView1_SelectedIndexCha
Try
StockPotrnId = GridView1.SelectedRow.Cell
Catch ex As Exception
End Try
Response.Redirect("frmstoc
End Sub
The redirect works fine and loads the next page, but I need to pass the value of StockPotrn above to a DetailsView control on the next page.
Any ideas how to do this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Got it - use Session as as source when setting the comtrol.
thanks
thanks
ASKER
I now can extract the value in the calling form:-
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim StockPotrnId As String
Try
StockPotrnId = CInt(Session("StockPotrnId
Catch ex As Exception
End Try
End Sub
I now need to pass this as a value to the DetailView control on the web form - how can I do that?