Link to home
Start Free TrialLog in
Avatar of grwallace
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_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.SelectedIndexChanged

        Try
            StockPotrnId = GridView1.SelectedRow.Cells(2).Text
        Catch ex As Exception

        End Try

        Response.Redirect("frmstockorderdetail.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?
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of grwallace
grwallace

ASKER

OK some good progress here - thanks.

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").ToString())
        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?
Got it - use Session as as source when setting the comtrol.

thanks