.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Code Snippets >> ASP.NET Controls >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

ModelPopUpExtnder in ASP.NET

Posted By:Athira Sreejith       Posted Date: March 24, 2009    Points: 10    Category: ASP.NET Controls    URL: http://www.dotnetspark.com  
 

Ajax ModelPopUpExtnder code example in ASP.NET.

Design:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" EnableEventValidation="false"%>


http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
http://www.w3.org/1999/xhtml">

    Untitled Page
       
   





     
   

   


       
           
           
       
       
           
       
   

                Login

                Sign Up

  

   


            
                TargetControlID="Loginlnk"
             PopupControlID="LoginPanel"
             BackgroundCssClass="modalBackground"
             DropShadow="true"
             OkControlID="LoginBtn"
             OnOkScript="ok()"
             CancelControlID="CancelBtn" />
                TargetControlID="Signuplnk"
             PopupControlID="SignupPanel"
             BackgroundCssClass="modalBackground"
             DropShadow="true"
             OkControlID="JoinBtn"
             OnOkScript="okJoin()"
             CancelControlID="CancelBtn2" />
   

   

   
   

   
  



 

.csPage:

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Login : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void LoginBtn_Click(object sender, EventArgs e)
    {
        //Add your DB Authentication Module here....
        //This is just for testing
        if (loginId.Text.Equals("user") && pwd.Text.Equals("user"))
            successLabel.Text = "Welcome User";
        else
            successLabel.Text = "Authentication Failed...Retry";
        successLabel.Visible = true;
        Loginlnk.Visible = false;
        Signuplnk.Visible = true;
    }


    protected void JoinBtn_Click(object sender, EventArgs e)
    {
        //Add your DB layer to store information for signIn user module here....
        //This is just for testing
        if (txtUserName.Text.Equals("user") && txtPassword.Text.Equals("user"))
        {
            successLabel.Text = "SignIn Successful";
            //Response.Write(txtFirstName.Text +" "+txtLastName.Text+ "
");
            //Response.Write(txtEmailAddress.Text);
        }
        else
            successLabel.Text = "Missing information...Retry";
        successLabel.Visible = true;
        Signuplnk.Visible = false;
        Loginlnk.Visible = true;
    }
}



     

Further Readings:

    Responses

    No response found. Be the first to respond this post

    Post Comment

    You must Sign In To post reply
    Find More code samples in C#, ASP.Net, Vb.Net and more Here

    Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend