Click here to Skip to main content
15,893,814 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more: (untagged)
Pls give me a code for Simple Registration form in C# windows application with check user already exists or not...

If i enter the previous value, it couldn't not entered to database. please give a code...
Posted
Updated 14-Apr-15 5:06am
v2
Comments
Sascha Lefèvre 14-Apr-15 11:05am    
Are you aware that this website not only has a QA-section but also tons of articles about programming? Have you tried to find one that does what you want? No? Off you go..

This is not a place where we hand you all the code you need. I would suggest you google for some examples or even search the Articles on this site, http://www.codeproject.com/search.aspx?sbo=kw[^].

Then, when you get stuck on something specific please come back and ask a specific question and we'll gladly help you out.
 
Share this answer
 
Maybe this code will help you out:-

C#
if (TextBox1.Text == "admin" && TextBox2.Text == "pass")
        Response.Redirect("admpanel.aspx");
    else if (TextBox1.Text == "director" && TextBox2.Text == "pass")
        Response.Redirect("admpanel.aspx");
    //else if(TextBox1.Text==ds.Tables[0].Rows[0]["user"].ToString() && TextBox2.Text==ds.Tables[0].Rows[0]["pass"].ToString())
    //    Response.Redirect("admnpanel.aspx");
    else
        Response.Write("Invalid Username/Password");
}
 
Share this answer
 
Comments
surendhar.c 15-Apr-15 4:35am    
Thank u Deepak Kanswal Sharma

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900