you can't directly set properties from control event handlers. They have to point to methods.
Cherryhomesj
Junior Poster in Training
58 posts since Sep 2011
Reputation Points: 30
Solved Threads: 17
If NewUser is just a property of the page then it will always be reset each time the page is called because the page is recreated each time. You should probably look into asp.net Sessions to store the value of NewUser, that way the updated value will persist across postbacks.
Cherryhomesj
Junior Poster in Training
58 posts since Sep 2011
Reputation Points: 30
Solved Threads: 17
You could create a page property using Session to maintain its value
public bool NewUser
{
get
{
return Session["NewUser"] == null ? true : (bool)Session["NewUser"];
}
set
{
Session["NewUser"] = value;
}
}
This is C# though, not real sure of the syntax in VB. In this instance if the Session is null then it will return true if the Session variable is not null then it casts it as bool and returns the value.
This page contains some information about using Session
Cherryhomesj
Junior Poster in Training
58 posts since Sep 2011
Reputation Points: 30
Solved Threads: 17