You are on page 1of 43

Name:MAHESH LAXMAN MALI Roll No:29

Class:BCA III Sem:V.

1) Program based on Command line.

Q.1) Write a program to display “hello world”.


Source code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace hello_world
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World");
Console.ReadLine();
}
}
}
Output:
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

Q.2) Write a program to check a number is prime or not.


Source code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace prime
{
class Program
{
static void Main(string[] args)
{
int n,i,m=0,flag=0;
Console.Write ("Enter the number to check prime:");
n=int.Parse(Console.ReadLine());
m=n/2;
for(i=2;i<=m;i++)
{
if(n%i==0)
{
Console.Write("number is not prime");
flag=1;
break;
}
}
if(flag==0)
Console .Write ("Number is prime");
Console.ReadLine ();
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

}
}
}
Output:
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

Q.3) Write a program in c# to demonstrate command line argument.


Source code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Commandline
{
class Program
{
static void Main(string[] args)
{
{
int a,b,c;
a=int.Parse(args[0]);
b=int.Parse(args[0]);
c=a+b;
Console.WriteLine(“the sum is”+c);
Console.ReadLine();
}
}
}
}
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

Output:
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

Q.4) Write a program to demonstrate pass by value and pass by reference.


1)Pass By Value:
Source code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace passby
{
class Program
{
static void Main(string[] args)
{
int a=20;
int b=30;
Console.WriteLine("before swapping");
Console.WriteLine("a=" +a);
Console.WriteLine("b=" +b);
swap(a, b);
Console.WriteLine("after swapping");
Console.WriteLine("a=" +a);
Console.WriteLine("b=" +b);
Console.ReadLine();
}
static void swap(int x,int y)
{
int t;
t=x;
x = y;
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

y = t;
}
}
}

Output:
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

2)Pass By Reference:
Source code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace passby
{
class Program
{
static void Main(string[] args)
{
int a = 20;
int b = 30;
Console.WriteLine("before swapping");
Console.WriteLine("a=" + a);
Console.WriteLine("b=" + b);
swap(ref a, ref b);
Console.WriteLine ("after swapping");
Console.WriteLine("a=" + a);
Console.WriteLine("b=" + b);
Console.ReadLine();
}
static void swap(ref int x,ref int y)
{
int t; t
= x; x
= y; y
= t;
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

}
}
}
Output:
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

2) Program base on windows application.


Q.1 Write a program to accept a number from user and calculate sum of digit.
Source code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication6
{
public partial class Form1 : Form
{
int no, sum = 0, rem;
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)


{

private void button1_Click(object sender, EventArgs e)


{
no = Int32.Parse(textBox1.Text);
while (no > 0)
{
rem = no % 10;
sum = sum + rem;
no = no / 10;
}
label2.Text = sum.ToString();

}
}
}
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

Output:
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

Q.2 Write a program to accept a number from user and display it in reverse order.
Source code:
Output:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace p2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button2_Click(object sender, EventArgs e)


{
int a, rev = 0, rem;
Console.WriteLine("Enter a number");
a = Int32.Parse(textBox1.Text);
while (a > 0)
{
rem = a % 10;
rev = rev * 10 + rem;
a = a / 10;
}
label2.Text = rev.ToString();
}
}
}
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

Output:
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

Q.3 Write a program to accept two numbers from user and perform all arithmetic
operation on it.
Source code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication4
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int no1, no2, add;
no1 = Int32.Parse(textBox1.Text);
no2 = Int32.Parse(textBox2.Text);
add = no1 + no2;
label3.Text = add.ToString();
}
private void button2_Click(object sender, EventArgs e)
{
int no1, no2, sub;
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

no1 = Int32.Parse(textBox1.Text);
no2 = Int32.Parse(textBox2.Text);
sub = no1 - no2;
label3.Text = sub.ToString();
}
private void button3_Click(object sender, EventArgs e)
{
int no1, no2,mult;
no1 = Int32.Parse(textBox1.Text);
no2 = Int32.Parse(textBox2.Text);
mult = no1 * no2;
label3.Text = mult.ToString();
}
private void button4_Click(object sender, EventArgs e)
{
int no1, no2, div;
no1 = Int32.Parse(textBox1.Text);
no2 = Int32.Parse(textBox2.Text);
div = no1 / no2;
label3.Text = div.ToString();
}
}
}
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

Output:
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

Q.4 Create user registration form insert appropriate fields on it connect with database
and perform insert, update, delete operation on it.
Source code:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace lastex
{
public partial class Form1 : Form

{
SqlConnection con;
SqlCommand cmd;
SqlDataReader dr;
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)


{
con = new SqlConnection("password=Prajakta;User ID=sa;Initial
Catalog=dbtesting;Data Source=LAPTOP-HSL1S7BO;");

private void button1_Click(object sender, EventArgs e)


{

string q = "Insert into Table_3


values(@Id,@Name,@Address,@Gender,@Email)";
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

cmd = new SqlCommand(q, con);

cmd.Parameters.AddWithValue("@Id", textBox1.Text);
cmd.Parameters.AddWithValue("@Name", textBox2.Text);
cmd.Parameters.AddWithValue("@Address", textBox3.Text);
cmd.Parameters.AddWithValue("@Gender", comboBox1 .Text );
cmd.Parameters.AddWithValue("@Email", textBox5.Text);

con.Open();
int res = cmd.ExecuteNonQuery();
if (res == 1)
{
label6.Text = "Data is succesfully submitted";
}
else
{
label6 .Text = "Please enter correct data ";
}
con.Close();

private void button2_Click(object sender, EventArgs e)


{
string q = "Insert into Table_3
values(@Id,@Name,@Address,@Gender,@Email)";

cmd = new SqlCommand(q, con);

cmd.Parameters.AddWithValue("@Id", textBox1.Text);
cmd.Parameters.AddWithValue("@Name", textBox2.Text);
cmd.Parameters.AddWithValue("@Address", textBox3.Text);
cmd.Parameters.AddWithValue("@Gender", comboBox1.Text);
cmd.Parameters.AddWithValue("@Email", textBox5.Text);

con.Open();
int res = cmd.ExecuteNonQuery();
if (res == 1)
{
label6.Text = "Data is succesfully submitted";
}
else
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

{
label6.Text = "Please enter correct data ";
}
con.Close();

private void button3_Click(object sender, EventArgs e)


{

cmd = new SqlCommand("update Table_3 set Id='" +textBox1 .Text +


"' where Name='" +textBox2 .Text + "'", con);
con.Open();
dr = cmd.ExecuteReader();
if (dr.Read() == true)
{
label6.Text = " Update of data is successfull";
con.Close();

}
else
{
label6.Text = "update is unsuccessfull";
}
}

private void button4_Click(object sender, EventArgs e)


{
con.Open();

cmd = new SqlCommand("Delete from Table_3 where Id='" + textBox1.Text +


"'", con);
dr = cmd.ExecuteReader();
if (dr.Read() == true)
{
label6.Text = "data is successfully deleted";
con.Close();

}
else
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

{
label6.Text = "delete is unsuccessfull";
}
}

}
}

Output:
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

3) Program based on web application.

Q.1 Create a webpage as user registration form that consist various server control such
as (Text box, Label, Radiobutton, Checkbox, List and Button. )
Source code

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Reg.aspx.cs"


Inherits="Reg" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.style1
{
width: 100%;
}
.style2
{
width: 541px;
}
.style3
{
text-align: center;
}
.style4
{
width: 541px;
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

text-align: right;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div class="style3">
Registration form
</div>
<div>

<table class="style1">
<tr>
<td class="style4">
Student name</td>
<td>
<asp:TextBox ID="Txtname" runat="server"
ontextchanged="TextBox1_TextChanged"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style4">
Address</td>
<td>
<asp:TextBox ID="Txtadd" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

<td class="style4">
Class</td>
<td>
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem>select class</asp:ListItem>
<asp:ListItem Value="BCA1"></asp:ListItem>
<asp:ListItem Value="BCA2"></asp:ListItem>
<asp:ListItem Value="BCA3"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="style4">
&nbsp;</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="style4">
&nbsp;</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="style4">
Date Of Birth</td>
<td>
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

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


</td>
</tr>
<tr>
<td class="style4">
Mobile number</td>
<td>
<asp:TextBox ID="Txtmob" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style4">
Gender</td>
<td>
<asp:RadioButton ID="RadioButton1" runat="server"
oncheckedchanged="RadioButton1_CheckedChanged"
Text="Male" />
&nbsp;
<asp:RadioButton ID="RadioButton2" runat="server"
Text="Female" />
</td>
</tr>
<tr>
<td class="style2">

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Button ID="btnsubmit" runat="server"
onclick="Button1_Click"
Text="SUBMIT" />
&nbsp;</td>
<td>
&nbsp;
<asp:Button ID="btncancle" runat="server"
onclick="Button2_Click"
Text="CANCLE" />
&nbsp;</td>
</tr>
</table>

</div>
</form>
</body>
</html>
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

Output:
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

Q.2 Design an ASP.Net webpage to implement use of Hyperlink, Response, Redirect,


Server.
Source code

<%@ Page Language="C#" AutoEventWireup="true"


CodeFile="login.aspx.cs" Inherits="login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.style1
{
width: 100%;
}
.style2
{
text-align: center;
}
.style3
{
text-align: right;
width: 663px;
}
.style4
{
width: 663px;
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

}
</style>
</head>
<body>
<form id="form1" runat="server">
<div class="style2">
login form
</div>
<div>

<table class="style1">
<tr>
<td class="style3">
User Id</td>
<td>
<asp:TextBox ID="Txtid" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style3">
Password</td>
<td>
<asp:TextBox ID="txtpass" runat="server"
TextMode="Password"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style4">
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

&nbsp;</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="style4">

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;
<asp:Button ID="btnlogin" runat="server"
onclick="btnlogin_Click"
Text="Login" />
&nbsp;</td>
<td>
<asp:HyperLink ID="HyperLink1" runat="server"
NavigateUrl="~/Reg.aspx">Click Here</asp:HyperLink>
</td>
</tr>
</table>

</div>
</form>
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

</body>
</html>

Output:
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

Q.3 Create a web page user registration page of perform various validation by using
validation control.
Source code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="validation5.aspx.cs"
Inherits="validation5" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

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

<head runat="server">

<title></title>

<style type="text/css">

.style1

width: 100%;

.style2

width: 455px;

.style3

width: 455px;

text-align: right;

.style4

text-align: center;

width: 1125px;

.style5
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.
{

width: 325px;

.style6

width: 455px;

text-align: right;

height: 29px;

.style7

width: 325px;

height: 29px;

.style8

height: 29px;

.style9

width: 455px;

text-align: right;

height: 26px;

.style10

width: 325px;

height: 26px;

.style11

{
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.
height: 26px;

.style12

width: 455px;

height: 23px;

.style13

width: 325px;

height: 23px;

.style14

height: 23px;

</style>

</head>

<body>

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

<div class="style4">

Registration form

<br />

</div>

<div>

<table class="style1">

<tr>

<td class="style3">

Student name</td>

<td class="style5">
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.
<asp:TextBox ID="Txtname" runat="server"></asp:TextBox>

</td>

<td>

<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"

ControlToValidate="Txtname" ErrorMessage="please enter name"

ForeColor="Red" ValidationGroup="0"></asp:RequiredFieldValidator>

</td>

</tr>

<tr>

<td class="style3">

address</td>

<td class="style5">

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

</td>

<td>

<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"

ControlToValidate="Txtadd" ErrorMessage="please enter your address"

ForeColor="Red" ValidationGroup="0"></asp:RequiredFieldValidator>

</td>

</tr>

<tr>

<td class="style6">

Email</td>

<td class="style7">

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

</td>

<td class="style8">

<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"

ControlToValidate="Txtmail" ErrorMessage="enter your valid email"

ForeColor="Red"
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.
ValidationExpression="^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-
]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$"></asp:RegularExpressionValidator>

</td>

</tr>

<tr>

<td class="style6">

class</td>

<td class="style7">

<asp:DropDownList ID="DropDownList1" runat="server">

<asp:ListItem>Select class</asp:ListItem>

<asp:ListItem Value="BCA 1"></asp:ListItem>

<asp:ListItem Value="BCA2"></asp:ListItem>

<asp:ListItem Value="BCA3"></asp:ListItem>

</asp:DropDownList>

</td>

<td class="style8">

</td>

</tr>

<tr>

<td class="style3">

&nbsp;</td>

<td class="style5">

&nbsp;</td>

<td>

&nbsp;</td>

</tr>

<tr>

<td class="style3">

&nbsp;</td>

<td class="style5">

&nbsp;</td>
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.
<td>

&nbsp;</td>

</tr>

<tr>

<td class="style3">

&nbsp;</td>

<td class="style5">

&nbsp;</td>

<td>

&nbsp;</td>

</tr>

<tr>

<td class="style3">

mobile no</td>

<td class="style5">

<asp:TextBox ID="Txtmob" runat="server" MaxLength="10"></asp:TextBox>

</td>

<td>

<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server"

ControlToValidate="Txtmob" ErrorMessage="Enter your valid mobile number"

ForeColor="Red" ValidationExpression="[0-9]{10}"

ValidationGroup="0"></asp:RegularExpressionValidator>

</td>

</tr>

<tr>

<td class="style3">

Age</td>

<td class="style5">

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

</td>

<td>
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

<asp:RangeValidator ID="RangeValidator1" runat="server"

ControlToValidate="Txtage" ErrorMessage="Enter valid age" ForeColor="Red"

MaximumValue="35" MinimumValue="18"
ValidationGroup="0"></asp:RangeValidator>

</td>

</tr>

<tr>

<td class="style3">

Gender</td>

<td class="style5">

<asp:RadioButton ID="RadioButton1" runat="server"

oncheckedchanged="RadioButton1_CheckedChanged" Text="male" />

<asp:RadioButton ID="RadioButton2" runat="server" Text="female" />

</td>

<td>

&nbsp;</td>

</tr>

<tr>

<td class="style9">

</td>

<td class="style10">

<asp:CheckBox ID="CheckBox1" runat="server" Text="Reading" />

</td>

<td class="style11">

</td>

</tr>

<tr>

<td class="style3">

Hobby</td>

<td class="style5">

<asp:CheckBox ID="CheckBox2" runat="server" Text="Swimming" />


Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.
</td>

<td>

&nbsp;</td>

</tr>

<tr>

<td class="style2">

&nbsp;</td>

<td class="style5">

<asp:CheckBox ID="CheckBox3" runat="server" Text="Dancing" />

</td>

<td>

&nbsp;</td>

</tr>

<tr>

<td class="style9">

password</td>

<td class="style10">

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

</td>

<td class="style11">

</td>

</tr>

<tr>

<td class="style6">

comform password</td>

<td class="style7">

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

</td>

<td class="style8">

<asp:CompareValidator ID="CompareValidator1" runat="server"

ControlToCompare="Txtpass" ControlToValidate="txtcpass"
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

ErrorMessage="Confirm password" ForeColor="Red"


ValidationGroup="0"></asp:CompareValidator>

</td>

</tr>

<tr>

<td class="style12">

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;

&nbsp;</td>

<td class="style13">

<asp:Button ID="btnsub" runat="server" Text="Submit" ValidationGroup="0"

style="text-align: right" Width="89px" />

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<asp:Button ID="Btncancle" runat="server" Text="Cancel"

onclick="Btncancle_Click" Width="96px" />

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

</td>

<td class="style14">

</td>

</tr>

<tr>

<td class="style2">

&nbsp;</td>

<td class="style5">

<asp:ValidationSummary ID="ValidationSummary1" runat="server"

ValidationGroup="0" />

</td>

<td>
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.
&nbsp;</td>

</tr>

</table>

</div>

</form>

</body>

</html>

Output
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.
Name:MAHESH LAXMAN MALI Roll No:29
Class:BCA III Sem:V.

You might also like