shlvy Posted November 6, 2003 Posted November 6, 2003 Hi How can i clear the TextBox of login and password after a member login into the site (I use Cookies). Thank's Quote
Moderators Robby Posted November 6, 2003 Moderators Posted November 6, 2003 textBox.Text = "" or textBox.Text = String.Emtpy Quote Visit...Bassic Software
shlvy Posted November 6, 2003 Author Posted November 6, 2003 Hi It's not working , the message error is : Reference to a non-shared member requires an object reference. Thank's Quote
Moderators Robby Posted November 6, 2003 Moderators Posted November 6, 2003 Is the textbox on the same page? Quote Visit...Bassic Software
Moderators Robby Posted November 6, 2003 Moderators Posted November 6, 2003 Where or in which event are you clearing the textbox? Quote Visit...Bassic Software
shlvy Posted November 7, 2003 Author Posted November 7, 2003 Hi I put it in the sub of login , here it is : ...... if intID <> 0 then Response.Cookies("MyCookie").Value = sqlText Response.Cookies("MyCookie").Expires = DateTime.Now.AddDays(1) TextBox.Text = "" lblMessage1.Text = "Hi" else lblMessage1.Text="Wrong UserName Or Password" end if end sub </SCRIPT> Quote
Administrators PlausiblyDamp Posted November 7, 2003 Administrators Posted November 7, 2003 What is the control name? If you have actually named it TextBox then it is probably confusing it with the class TextBox. Try renaming it to something else TextBox1 for example. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.