I'm pulling my hair out on this. I've tried a few different things and I just can't seem to get my ProdID variable value loaded. I have a gridview and added an "Add" button column. When the "Add" button for any row is clicked, I'm calling SqlDataSource.Insert()
to execute my INSERT command. I'm trying to load the ProdID variable/parameter with the ProdID from the same row as the "Add" button but it either comes across empty or I get a "index was out of range" error if I try to load it from "SelectedIndex" and I've
tried varying values with no luck. I know it's something stupid but I'm stumped.
Code behind:
Protected Sub SqlNonUserProds_Inserting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceCommandEventArgs) Handles SqlNonUserProds.Inserting
' Get a reference to the currently logged on user
Dim currentUser As MembershipUser = Membership.GetUser()
Go to the complete details ...