Hello,
I'm *very* new to
VB (in the .NET) area. I'm using visual studio 2008 and I've got to use to session variables to insert a new row into a database table.
So, I have 2 session variables captured from gridviews as follows:
Code:
//From page 1.aspx
Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.SelectedIndexChanged
Dim ProdCodeSession As String
Session("PCSV") = GridView1.SelectedDataKey.Value
ProdCodeSession = Session("PCSV")
Response.Redirect("Starworkinput.aspx")
End Sub
//From 2.aspx
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim ProdCodeParam As String
ProdCodeParam = Session("PCSV")
End Sub
Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.SelectedIndexChanged
Dim ActSSNSession As String
Session("ASSV") = GridView1.SelectedDataKey.Value
ActSSNSession = Session("ASSV")
**** PSEUDOCODE: Insert "PCSV", "ASSV" into SQLDSTABLE(PCSVColumn,ASSVColumn) ****
End Sub
I don't know how to use
VB to connect to a sqldatasource and insert a row. Any help would be greatly appreciated. Thank you!