Saturday, 10 August 2013

Change the function of a button if Logged in

Change the function of a button if Logged in

I am very new to the C#/ASP.NET-scene and I just can't seem to get the
syntax right to do it myself. I want a button's text and function to
change when the user is logged in. The code I have so far is:
if (Session["Patient"] == "Logged In")
{
Button3.Visible = false;
Button4.Visible = false;
}
else
Button3.Text = "Create Account";
Button4.Text = "Log In";
As far as I understand the code above changes the button's text,But how do
I change the button's function?
Thanks in Advance:-)

No comments:

Post a Comment