A
antonyliu2002
I have the following simple code to test if my session is working:
<Script Runat="Server">
Sub LinkButtonGenInfo_Click(s As Object, e As EventArgs)
If txtFirstName.Text <> Nothing Then
Session("firstName")=txtFirstName.Text
End If
If txtFirstName.Text <> Nothing Then
lblYourName.Text=Response.Write(Session("firstName"))
End If
End Sub
</Script>
When I check out the page from the browser, I got the following error
message at Line 10, and I don't know how to fix it. Could you please
give me a hint? Thanks a lot!
Compiler Error Message: BC30491: Expression does not produce a value.
Source Error:
Line 8: End If
Line 9: If txtFirstName.Text <> Nothing Then
Line 10: lblYourName.Text=Response.Write(Session("firstName"))
Line 11: End If
Line 12: End Sub
<Script Runat="Server">
Sub LinkButtonGenInfo_Click(s As Object, e As EventArgs)
If txtFirstName.Text <> Nothing Then
Session("firstName")=txtFirstName.Text
End If
If txtFirstName.Text <> Nothing Then
lblYourName.Text=Response.Write(Session("firstName"))
End If
End Sub
</Script>
When I check out the page from the browser, I got the following error
message at Line 10, and I don't know how to fix it. Could you please
give me a hint? Thanks a lot!
Compiler Error Message: BC30491: Expression does not produce a value.
Source Error:
Line 8: End If
Line 9: If txtFirstName.Text <> Nothing Then
Line 10: lblYourName.Text=Response.Write(Session("firstName"))
Line 11: End If
Line 12: End Sub