会话存储的数据在模态弹出扩展器中不起作用

时间:2016-05-28 04:00:23

标签: asp.net vb.net session

我有电子商务类网站。我想知道会话中存储的信息可以在回发后检索内置的ModalPopupExtender。我试着在session&中存储一些细节。回发后我从会话中获取该信息,但它没有检索。我试着调试它&我看到值没有存储在会话中。我是通过在pageLoad上调用会话值来做的吗?

Private Sub orderButton_Click(sender As Object, e As EventArgs) Handles orderButton.Click
        Session("patientName") = patientName.Text
        Session("address1") = address1.Text

        If HttpContext.Current.Request.Cookies("chkusername") Is Nothing Then
            MPlogin.Show()
        Else  
            condition code executes
        End If
 End Sub

 Private Sub Online_Medicines_order_online_order_by_prescription_Load(sender As Object, e As EventArgs) Handles Me.Load
If Session("patientName") Is Nothing Then
            patientName.Text = ""
        Else
            patientName.Text = Session("patientName").ToString
        End If

        If Session("address1") Is Nothing Then
            address1.Text = ""
        Else
            address1.Text = Session("address1").ToString
        End If
End Sub

0 个答案:

没有答案