c# .net code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vandana
    New Member
    • Aug 2006
    • 1

    #1

    c# .net code

    can you comment this code line by line as i am new to programing.


    private void Page_Load(objec t sender, System.EventArg s e)
    {
    IPrincipal p = HttpContext.Cur rent.User;
    if(p.IsInRole(" login"))
    {
    isAuthenticated = true;
    }
    if(!isAuthentic ated)
    {
    FormsAuthentica tion.SignOut();
    RegisterStartup Script("Logout" ,"<script>docum ent.location.hr ef='../Login.aspx'</script>");
    }
    else
    {
    CustomPrincipal s = HttpContext.Cur rent.User as CustomPrincipal ;
    irca_uid = s.getIRCAID();
    intUserType = s.getUserType() ;
    }
    if (!Page.IsPostBa ck)
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    If you are knew to programming then commenting a piece of code will be a very valueable exersice to do.

    Generally people don't put enough comments in their own code without having someone elses code to comment.

    Comment

    Working...