Standard Control | Label | TextBox | Password Box | Button | ASP.NET C# WEB FORM

 <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="Standard_Control.Index" %>


<!DOCTYPE html>


<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

    <title></title>

    <style type="text/css">

        .auto-style1 {

            width: 100%;

            border-style: solid;

            border-width: 1px;

        }

        .auto-style2 {

            height: 34px;

        }

    </style>

</head>

<body>

    <form id="form1" runat="server">

        <div>

            <table cellpadding="5" cellspacing="5" class="auto-style1">

                <tr>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td colspan="4" style="text-align:center;">

                        <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="32pt" ForeColor="#0000CC">Registration Form:</asp:Label>

                    </td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                </tr>

                <tr>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>

                        <asp:Label ID="Label2" runat="server" Text="USER ID"></asp:Label>

                    </td>

                    <td>

                        <asp:TextBox ID="textid" runat="server"></asp:TextBox>

                    </td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                </tr>

                <tr>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>

                        <asp:Label ID="Label3" runat="server" Text="Password"></asp:Label>

                    </td>

                    <td>

                        <asp:TextBox ID="textpwd" runat="server" TextMode="Password"></asp:TextBox>

                    </td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                </tr>

                <tr>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td style="vertical-align: top">

                        <asp:Label ID="Label4" runat="server" Text="Address"></asp:Label>

                    </td>

                    <td>

                        <asp:TextBox ID="textadd" runat="server" TextMode="MultiLine" Height="60px" Width="180px"></asp:TextBox>

                    </td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                </tr>

                <tr>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                </tr>

                <tr>

                    <td class="auto-style2"></td>

                    <td class="auto-style2"></td>

                    <td class="auto-style2"></td>

                    <td class="auto-style2"></td>

                    <td class="auto-style2"></td>

                    <td class="auto-style2"></td>

                    <td class="auto-style2"></td>

                    <td class="auto-style2"></td>

                </tr>

                <tr>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                </tr>

                <tr>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                </tr>

                <tr>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                </tr>

                <tr>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                </tr>

                <tr>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>

                        <asp:Button ID="Button1" runat="server" Text="Submit" OnClick="Button1_Click"/>

                    </td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                </tr>

                <tr>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                </tr>

                <tr>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td colspan="4">

                        <asp:Label ID="lblresult" runat="server"></asp:Label>

                    </td>

                    <%--<td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>--%>

                    <td>&nbsp;</td>

                    <td>&nbsp;</td>

                </tr>

            </table>

        </div>

    </form>

</body>

</html>

Above File is Standard_Control\Index.aspx

















using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

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

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            string userid, password, address;
            userid = textid.Text;
            password = textpwd.Text;
            address = textadd.Text;

            lblresult.Text = userid + "<br>" + password + "<br>" + address; 
        }
    }
}
Above File is Standard_Control\Index.aspx.cs

Comments

Popular posts from this blog

Range Validator Control In ASP.NET Web forms | Form Validation | ASP.NET Web forms

Query String In ASP.NET Web Forms | State Management | ASP.NET | Web Forms

Validation Summary Control In ASP.NET Web forms | Form Validation | ASP.NET