C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




login


Posted Date: 04 Jul 2008      Total Responses: 3

Posted By: sreemani       Member Level: Gold     Points: 1



i drag and drop the login control, after that what can i do, i don't know.
Please give login code related login control.
give 2 users authentication





Responses

Author: Deepa    04 Jul 2008Member Level: DiamondRating:     Points: 2

check this:
here is sample code
http://quickstarts.asp.net/QuickStartv20/aspnet/doc/ctrlref/login/login.aspx



Author: SSN    04 Jul 2008Member Level: GoldRating:     Points: 4

The login control is most probably used for the project using the authentication(form authentication) mode. In that mode there is not need to add a single line of code in login cs file. Better you have to create a login form using the controls from the tool box, I think you may got an Idea?? All the best
regards



Author: Jaya Kumar    04 Jul 2008Member Level: GoldRating:     Points: 6

protected void Login_Authenticate(object sender, AuthenticateEventArgs e)
{
try
{
if (Validata_Data())
{
lblError.Visible = false;
//Your Store Proc Fn Comes here
while (sqlRdr.Read())
{
Session["UserID"] = Convert.ToString(sqlRdr["UserID"]);
Session["UserTypeID"] = Convert.ToString(sqlRdr["UserTypeID"]);
Session["FullName"] = Convert.ToString(sqlRdr["FullName"]);
Session["UserType"] = Convert.ToString(sqlRdr["UserType"]);
}
switch (Convert.ToString(Session["UserType"]).ToUpper().Trim())
{
case "ADMIN":
RedirectPage = "AdminHome.aspx";
break;
case "MEMBER":
RedirectPage = "MemberHome.aspx";
break;
}
Response.Redirect(RedirectPage, false);
}
}
catch (Exception ex)
{
lblError.Visible = false;
lblError.Text = ex.Message;
}
}
}



Post Reply
You must Sign In to post a response.
Next : hi frnds please help me its urgent
Previous : Save data from grid view to .csv files
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use