how to immediately change value of session variable?
-
I have a webform page, this page have a button for change session variable, when user click on this button session variable don't show new value after page postback action, and if user click again on this button or refresh value of session variable change then for this user must be click on this button minimum 2 times. how to immediately change value of session variable? (I don't want to use querystring and refresh)
Mehdi Bahrami
-
I have a webform page, this page have a button for change session variable, when user click on this button session variable don't show new value after page postback action, and if user click again on this button or refresh value of session variable change then for this user must be click on this button minimum 2 times. how to immediately change value of session variable? (I don't want to use querystring and refresh)
Mehdi Bahrami
Mehdi Bahrami wrote:
how to immediately change value of session variable? (I don't want to use querystring and refresh)
What do you mean by that? You want to change session variable on button click ? You just need to update the session variable. Better you post the code and ask your query.
cheers, Abhijit CodeProject MVP
-
Mehdi Bahrami wrote:
how to immediately change value of session variable? (I don't want to use querystring and refresh)
What do you mean by that? You want to change session variable on button click ? You just need to update the session variable. Better you post the code and ask your query.
cheers, Abhijit CodeProject MVP
when user click on imagebutton8 show true and after click on imagebutton8 again show true but I want show False.
Protected Sub Page_PreLoad(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreLoad If Page.IsPostBack Then Response.Write(Session("null")) End Sub Protected Sub ImageButton9_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ImageButton9.Click Session.Contents("null") = False End Sub Protected Sub ImageButton8_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ImageButton8.Click Session.Contents("null") = True End Sub
Thank YouMehdi Bahrami
-
when user click on imagebutton8 show true and after click on imagebutton8 again show true but I want show False.
Protected Sub Page_PreLoad(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreLoad If Page.IsPostBack Then Response.Write(Session("null")) End Sub Protected Sub ImageButton9_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ImageButton9.Click Session.Contents("null") = False End Sub Protected Sub ImageButton8_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ImageButton8.Click Session.Contents("null") = True End Sub
Thank YouMehdi Bahrami
Mehdi Bahrami wrote:
Session.Contents("null") = False
Mehdi Bahrami wrote:
Session.Contents("null") = True
Seesion("null") = True Session("null") = False I don't think "null" is good name. I would do Session("ShowImage") = True Session("ShowImage") = False
Yusuf Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
-
Mehdi Bahrami wrote:
Session.Contents("null") = False
Mehdi Bahrami wrote:
Session.Contents("null") = True
Seesion("null") = True Session("null") = False I don't think "null" is good name. I would do Session("ShowImage") = True Session("ShowImage") = False
Yusuf Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
But my problem not for name. I use every name but this problem occure again.
Mehdi Bahrami