I have a session1 parameter set in the select code for my detailsview in my aspx page. I want to check for a different session2 when the page loads. If that session2 exists, then use the select parameter using the different session2. I tried the following
code but it is not picking up the new session. I know the session value is there from posting it to a label. Can someone advise how to set a different Select parameter in code behind?
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Session("subMem") IsNot Nothing Then
SqlDataSource1.SelectParameters.Add("@MemId", Session("subMem"))
DetailsView1.DataBind()
End If
End Sub
Go to the complete details ...