Click here to Skip to main content
15,886,519 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
login.cs

C#
protected void Page_Load(object sender, EventArgs e)
  {

  }
  protected void ctlLogin_Authenticate(object sender, AuthenticateEventArgs e)
  {
      bool Authenticated = false;
      CheckBox chBox = (CheckBox)ctlLogin.FindControl("RememberMe");
      Authenticated = UserAuthenticate(ctlLogin.UserName, ctlLogin.Password);
      e.Authenticated = Authenticated;
     if (Authenticated == true)
      {
          if (chBox.Checked == true)
          {
              Response.Cookies["RFriend_Email"].Value = ctlLogin.UserName;
              Response.Cookies["RFriend_PWD"].Value = ctlLogin.Password;
              Response.Cookies["RFriend_UID"].Value = Session["Id"].ToString();
             Response.Cookies["RFriend_Email"].Expires = DateTime.Now.AddMonths(3);
              Response.Cookies["RFriend_PWD"].Expires = DateTime.Now.AddMonths(3);
             Response.Cookies["RFriend_UID"].Expires = DateTime.Now.AddMonths(3);
          }

          Response.Redirect("UserDetails.aspx?Id=" +Session["Id"].ToString());

     }
  }



master.cs





login.aspx web form is the web form of master page

C#
if ((!object.Equals(Request.Cookies["RFriend_Email"], null)) && (!object.Equals(Request.Cookies["RFriend_PWD"], null)) && (!object.Equals(Request.Cookies["RFriend_UID"], null)))
{
    if ((!object.Equals(Request.Cookies["RFriend_Email"].Value, "")) && (!object.Equals(Request.Cookies["RFriend_PWD"].Value, "")) && (!object.Equals(Request.Cookies["RFriend_UID"], "")))
    {
        Session["Email"] = Request.Cookies["RFriend_Email"].Value;
        Session["Password"] = Request.Cookies["RFriend_PWD"].Value;
        Session["Id"] = Request.Cookies["RFriend_UID"].Value;
    }
    else
    {
    }


I simply want to know about that what the code do in master.cs?
Posted
Updated 22-May-11 21:54pm
v3
Comments
[no name] 23-May-11 3:49am    
That makes two of us. You did not post any code from the master page. I edited one of the pre tags, but the one for the master page really is empty.

I simply want to know about that what the code do in master.cs?
I Simply have no idea as there is no code posted for master.cs.
 
Share this answer
 
Creating another ID and posting the same question in the hope that we don't notice isn't going to work either:
info about the code...[^]
 
Share this answer
 
Comments
[no name] 23-May-11 3:58am    
Great. I always wonder what goes on in those people's mind. Instead of simply editing their question until it can be understood, they do all kinds of crazy stuff.
CS2011 23-May-11 4:39am    
Do not go so hard on the kid..He just thinks every one is as dumb as him :-)
OriginalGriff 23-May-11 4:47am    
Surely not? He must have seen people on TV tying their shoelaces without help?
Why not go here[^] and make an effort to do some studying for yourself, rather than repeatedly posting these questions.
 
Share this answer
 

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