hi sir,
i am manikyaprabhu
i create the two web from ( registerfrom and login from )
i want coding for the login form using register form
i
hi sir,
i am manikyaprabhu
i create the two web from ( registerfrom and login from )
i want coding for the login form using register form
i
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Niradhip ChakrabortyRank #429 · 5.8K reputationPosted Aug 11, 2008, 5:17 PM EDT
Try the following code:
using system.data.sqlclient;
using system.web.configuration;
Sqlconnection con = new sqlconnection("your conectionstring");
or
Sqlconnection con = new Sqlconnection(WebconfigurationManager.connectionstrings["your connetion name"].connectionstring);
Sqlcommand cmd = new sqlcommand();
cmd.commandtext = "select * from table";
cmd.connection = con;
if (con.state==connectionstate.closed) con.open();
SqlDatareader dr = cmd.executereader();
while(dr.read)
{
if ( dr["Username"] == textbox1.text.trim() && dr["Password"] == textbox2.text )
{
response.redirect("Homepage.aspx");
return;
}
}
Please go through with following URL for your reference.
1.http://www.daniweb.com/forums/thread6028.html
2.http://www.daniweb.com/forums/thread6028.html
Raj KumarRank #25 · 44.2K reputationPosted Aug 11, 2008, 8:58 PM EDT
See this article, I am sure will help.
http://www.c-sharpcorner.com/UploadFile/raj1979/LoginControl07242008104351AM/LoginControl.aspx?ArticleID=e06b9d4f-b65c-4c63-babc-fb65ef3224f7