Avatar of 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

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

        End Try

    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?
.NET ProgrammingASP.NETVisual Basic.NET

Avatar of undefined
Last Comment

8/22/2022 - Mon

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

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
            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.

Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy