A.V.C.
COLLEGE (AUTONOMOUS)
Affiliated to Annamalai University
NAAC Reaccredited ‘A+’ Grade Institution (4th cycle) (CGPA=3.46/4.00)
NIRF All India Ranking 2025: College Rank-band:151-200
UGC Recognised “College with Potential for Excellence -Phase I & II”
MANNAMPANDAL, MAYILADUTHURAI – 609 305
DEPARTMENT OF COMPUTER SCIENCE
[Link] PROGRAMMING
SUBJECT CODE – 23 CAP 512
REGISTER NO. : U23 22
CONTENT
NAME :
CLASS : III – B.C.A.-B
YEAR : 2025 - 2026
A.V.C. COLLEGE (AUTONOMOUS)
Affiliated to Annamalai University
NAAC Reaccredited ‘A+’ Grade Institution (4th cycle) (CGPA=3.46/4.00)
NIRF All India Ranking 2025: College Rank-band:151-200
UGC Recognised “College with Potential for Excellence -Phase I & II”
MANNAMPANDAL, MAYILADUTHURAI – 609 305
DEPARTMENT OF COMPUTER SCIENCE
CERTIFIED BONAFIDE RECORD
ROLL NO. : U23 22
NAME :
CLASS :
SUBJECT CODE : 23 CAP 512
SUBJECT : [Link] PROGRAMMING
Staff In-charge Head of the Department
Examination Register No. …………………………………………………………
Submitted for the Practical Examination held on …………………………… 2025.
Examiners
1.
2.
CONTENTS
[Link] DATE TITLE [Link] SIGNATURE
1 05/08/25 VALIDATION CONTROL
2 06/08/25 WEB APPLICATION TOOL
3 13/08/25 FILE BROWSING
4 14/08/25 WORKING WITH COMBO BOX &
LIST BOX
5 22/08/25 WEB APPLICATION
6 25/08/25 AD ROTATOR USING FILE
7 10/09/25 CALENDAR CONTROL
8 11/09/25 AUTHENTICATION &
AUTHORIZATION
9 18/09/25 STUDENT DATABASE
10 19/09/25 TELEPHONE USING GRID VIEW
CONTROL
11 26/09/25 DATA BIND WITH WEB CONTROLS
12 29/09/25 DATA BIND WITH DATA
CONTROLS
OUTPUT:
[Link]
Date: 05/08/2025
VALIDATION CONTROL
AIM:
To design an [Link] webpage using validation controls.
ALOGORITHM:
Step1: Go to dash home > Monodevelop.
Step2: Click start file >New > Solution > [Link] > Web applications.
Step3: In the name text_box type name & then choose the location browser option, in
opening and finally click ok.
Step4: In the coding window type the following program under <form id=”form”> tag.
(view > pads > solution)
Solution Ex1
Ex1
[Link] (select) & set option > Ex1 options, XSP server (RHS),
port number (8082/8081 (LHS)).
Step5: After completing the program run the program using run menu. Start without
debugging or ctrl+F5 (Save: ctrl+s or file > save).
Step6: In the output window enter the username, age, passwords and re-passwords.
Step7: Finally click on submit button.
PROGRAM:
<% @page language=”C#”%>
<html>
<body>
<form id=”f1” runat=”server”>
User Name:
<asp:TextBox id=”t1” runat=”server”/>
<asp:RequiredFieldValidator id=”r1” ControlToValidate=”t1” ErrorMessage=”Username
must be entered” runat=”server”/>
Age:
<asp:TextBox id=”t2” runat=”server”/>
<asp:RangeValidator id=”rv1” ControlToValidate=”t2” ErrorMessage=”Age must be in the
range between 18 to 100” runat=”server” Type=Integer MinimumValue=”18”
MaximumValue=”100”/>
Password:
<asp:TextBox id=”t3” runat=”server” TextMode=”password”/>
<asp:RequiredFieldValidator id=”rfv2” ControlToValidate=”t3” ErrorMessage=”password
must be entered” runat=”server”/>
Re-password:
<asp:TextBox id=”t4” runat=”server” TextMode=”password”/>
<asp:RequiredFieldValidator id=”rfv3” ControlToValidate=”t4” ErrorMessage=”re-
password must be entered” runat=”server”/>
<asp:CompareValidator id=”cmp1” runat=”server” ControlToValidate=”t4”
ControlToCompare=”t3” ErrorMessage=”password and re-password must be the same”/>
E-mail id:
<asp:TextBox id=”t5” runat=”server”/>
<asp:RegularExpressionValidator id=”re1” runat=”server” ErrorMessage=”please enter the
correct mail id” ControlToValidate=”t5” ValidationExpression=”(\w+([-.]\w+)*@\w+([-
.]\w+)*\.\w+([-.]\w+)*”/>
<asp:Button id=”b1” Text=”Submit” runat=”server”/>
</form>
</body>
</html>
RESULT:
This the above program executed successfully and the output verified.
OUTPUT:
[Link]
Date: 06/08/2025
WEB APPLICATION TOOL
AIM:
To design an [Link] webpage using web application tools.
ALOGORITHM:
Step1: Go to dash home > Monodevelop.
Step2: Click start file >New > Solution > [Link] > Web applications.
Step3: In the name text_box type name & then choose the location browser option, in
opening and finally click ok.
Step4: In the coding window type the following program under <form id=”form”> tag.
(view > pads > solution)
Solution Ex2
Ex2
[Link] (select) & set option > Ex2 options, XSP server (RHS),
port number (8082/8081 (LHS)).
Step5: After completing the program run the program using run menu. Start without
debugging or ctrl+F5 (Save: ctrl+s or file > save).
Step6: In the output window enter the username, age, passwords and re-passwords.
Step7: Finally click on submit button.
PROGRAM:
<% @page language=”C#”%>
<html>
<body>
<form id=”f1” runat=”server”>
<table>
<tr> <td>Name: </td>
<td> <asp:TextBox id=”Name” runat=”server”/> </td>
</tr>
<tr> <td>Street: </td>
<td> <asp:TextBox id=”Street” runat=”server”/> </td>
</tr>
<tr> <td>City: </td>
<td> <asp:TextBox id=”City” runat=”server”/> </td>
</tr>
<tr> <td>State: </td>
<td> <asp:TextBox id=”State” runat=”server”/> </td>
</tr> </table>
<asp:Button id=”b1” Text=”Submit” Onclick=”b1_Clicked” runat=”server”/>
<asp:Label id=”l1” runat=”server”/>
</form>
</body>
</html>
[Link]:
Protected void b1_Clicked (object sender, EventArgs e)
{
string str=” “;
str+=[Link];
str+=[Link];
str+=[Link];
str+=[Link];
[Link]=str;
}
RESULT:
This the above program executed successfully and the output verified.
OUTPUT:
[Link]
Date:13/08/2025
FILE BROWSING
AIM:
To design an file browsing using [Link].
ALOGORITHM:
Step1: Go to dash home > Monodevelop.
Step2: Click start file >New > Solution > [Link] > Web applications.
Step3: In the name text_box type name & then choose the location browser option, in
opening and finally click ok.
Step4: In the coding window type the following program under <form id=”form”> tag.
(view > pads > solution)
Solution Ex3
Ex3
[Link] (select) & set option > Ex3 options, XSP server (RHS),
port number (8082/8081 (LHS)).
Step5: After completing the program run the program using run menu. Start without
debugging or ctrl+F5 (Save: ctrl+s or file > save).
Step6: In the output window enter the username, age, passwords and re-passwords.
Step7: Finally click on submit button.
PROGRAM:
<% @page language=”C#”%>
<html>
<body>
<form id=”f1” runat=”server”>
<asp:FileUpload id=”fup1” runat=”server”>
<asp:Button id=”b1” text=”upload” onclick=”upload” runat=”server”/>
<asp:label id=”l1” Forecolor=”violet” runat=”server”/>
</form>
</body>
</html>
[Link]:
Public virtual void upload (object sender, EventArgs e)
{
string filepath=”/File/”+[Link];
[Link] (map path(filepath));
[Link]=”file has been uploaded successfully”;
}
RESULT:
This the above program executed successfully and the output verified.
OUTPUT:
[Link]
Date:14/08/2025
WORKING WITH COMBO BOX AND LIST BOX
AIM:
To design an [Link] webpage using combo box and list box.
ALOGORITHM:
Step1: Go to dash home > Monodevelop.
Step2: Click start file >New > Solution > [Link] > Web applications.
Step3: In the name text_box type name & then choose the location browser option, in
opening and finally click ok.
Step4: In the coding window type the following program under <form id=”form”> tag.
(view > pads > solution)
Solution Ex4
Ex4
[Link] (select) & set option > Ex4 options, XSP server (RHS),
port number (8082/8081 (LHS)).
Step5: After completing the program run the program using run menu. Start without
debugging or ctrl+F5 (Save: ctrl+s or file > save).
Step6: In the output window enter the username, age, passwords and re-passwords.
Step7: Finally click on submit button.
PROGRAM:
<% @page language=”C#”%>
<html>
<body>
<form id=”f1” runat=”server”>
Items:
<asp:TextBox id=”t1” runat=”server”>
<asp:Button id=”btn1” runat=”server” Text=”>>>” onclick=”btn1_Clicked”/>
<asp:Button id=”btn2” runat=”server” Text=”UP” onclick=”btn2_Clicked”/>
<asp:Button id=”btn3” runat=”server” Text=”DOWN” onclick=”btn3_Clicked”/>
<asp:ListBox id=”lb1” runat=”server” width=”100” height=”100”/>
<br/> <br/>
<asp:DropDownList id=”ddl1” runat=”server” visible=”false”/>
<asp:Button id=”btn4” runat=”server” Text=”ADD” onclick=”btn4_Clicked”/>
<asp:Button id=”btn5” runat=”server” Text=”DELETE” onclick=”btn5_Clicked”/>
<asp:Button id=”btn6” runat=”server” Text=”SELECT” onclick=”btn6_Clicked”/>
</form>
</body>
</html>
[Link]:
Public virtual void btn1_Clicked (object sender, EventArgs e)
{
[Link]([Link]);
[Link]=” “;
}
Public virtual void btn2_Clicked (object sender, EventArgs e)
{
int i=[Link] Index;
String item=[Link] [Link] String( );
if(i>0){
[Link] At(i);
[Link](i-1, Item);
}
}
Public virtual void btn3_Clicked (object sender, EventArgs e)
{
int i=[Link] Index;
String item=[Link]( );
if(i<[Link]-1)
{
[Link] At(i);
[Link](i+1,item);
}
}
Public virtual void btn4_Clicked (object sender, EventArgs e)
{
[Link]=true;
[Link](“Orange”);
[Link](“Apple”);
[Link](“Grapes”);
[Link](“Strawberry”);
[Link](“Avacado”);
}
Public virtual void btn5_Clicked (object sender, EventArgs e)
{
int i=[Link] Index;
if(i>0){
[Link] At(i);
}
}
Public virtual void btn6_Clicked (object sender, EventArgs e)
{
int i=[Link] Index;
String Item=[Link] [Link]( );
if(i>0){
[Link]=Item;
}
}
RESULT:
This the above program executed successfully and the output verified.
OUTPUT:
[Link]
Date:22/08/2025
WEB APPLICATION
AIM:
To design an webpage using [Link].
ALOGORITHM:
Step1: Go to dash home > Monodevelop.
Step2: Click start file >New > Solution > [Link] > Web applications.
Step3: In the name text_box type name & then choose the location browser option, in
opening and finally click ok.
Step4: In the coding window type the following program under <form id=”form”> tag.
(view > pads > solution)
Solution Ex5
Ex5
[Link] (select) & set option > Ex5 options, XSP server (RHS),
port number (8082/8081 (LHS)).
Step5: After completing the program run the program using run menu. Start without
debugging or ctrl+F5 (Save: ctrl+s or file > save).
Step6: In the output window enter the username, age, passwords and re-passwords.
Step7: Finally click on submit button.
PROGRAM:
<% @page language=”C#”%>
<html>
<body>
<form id=”f1” runat=”server”>
<div> <center>
<h2> <b> Job seeker detail‟s </b> </h2>
</center>
<center> <table border=”1”>
<tr> <td align=”left”>
<asp:Label id=”label1” runat=”server” Text=”name”/>
</td>
<td align=”left”>
<asp:TextBox id=”textbox1” runat=”server”/>
</td> </tr>
<tr> <td align=”left”>
<asp:Label id=”label2” runat=”server” Text=”fathername”/>
</td>
<td align=”left”>
<asp:TextBox id=”textbox2” runat=”server”/>
</td> </tr>
<tr> <td align=”left”>
<asp:Label id=”label3” runat=”server” Text=”age”/>
</td>
<td align=”left”>
<asp:TextBox id=”textbox3” runat=”server”/>
</td> </tr>
<tr> <td align=”left”>
<asp:Label id=”label4” runat=”server” Text=”address”/>
</td>
<td align=”left”>
<asp:TextBox id=”textbox4” runat=”server”/>
</td> </tr>
<tr> <td align=”left”>
<asp:Label id=”label5” runat=”server” Text=”gender”/>
</td> <td>
<asp:RadioButton id=”radiobutton1” Text=”Male” GroupName=”a”/>
<asp:RadioButton id=”radiobutton2” Text=”Female” GroupName=”a”/>
</td> </tr>
<tr> <td align=”left”>
<asp:Label id=”label6” runat=”server” Text=”jobtype”/>
</td>
<td align=”left”>
<asp:DropDownList id=”dropdownlist” runat=”server”>
<asp:ListItem> DataAnalysist </asp:ListItem>
<asp:ListItem> Software Developer</asp:ListItem>
<asp:ListItem> Testing </asp:ListItem>
<asp:ListItem> Technical Assistant</asp:ListItem>
<asp:ListItem> Application Developer</asp:ListItem>
</asp: DropDownList> </td> </tr>
<tr> <td align=”left”>
<asp:Button id=”button1” runat=”server” text=”Submit”/>
</td> </tr> </table>
</form>
</body>
</html>
[Link]:
Using system;
Using [Link];
Using [Link];
Using [Link];
Using [Link];
Using [Link];
namespace Sample{
Public partial class default [Link]{
Public virtual void button1_Clicked (object as sender, EventArgs args)
{
String str=” “;
str+=”<b>Name:</b>”+[Link]=”<br>”;
str+=”<b> Father‟s Name:</b>”+[Link]=”<br>”;
str+=”<b>Age:</b>”+[Link]=”<br>”;
str+=”<b>Contact Address:</b>”+[Link]=”<br>”;
if {
([Link])
str+=”<b>Gender:</b>”+[Link]=”<br>”;
}
Else {
str+=”<b>Gender:</b>”+[Link]=”<br>”;
[Link]=str;
}
}
}
}
RESULT:
This the above program executed successfully and the output verified.
OUTPUT:
[Link]
Date:25/08/2025
AD ROTATOR USING FILE
AIM:
To design an AD rotator using [Link].
ALOGORITHM:
Step1: Go to dash home > Monodevelop.
Step2: Click start file >New > Solution > [Link] > Web applications.
Step3: In the name text_box type name & then choose the location browser option, in
opening and finally click ok.
Step4: Go to dash home – image folder – in the image folder copy and two image and paste
it on the current project folder.
Step5: In [Link] delete the button1 clicked line and type the following code.
Step6: From the solution window select [Link], right click-add-select the new file and
choose the xml and change the filename as [Link].
Step7: Again right click on the [Link] and add html file(To), name if as
([Link]),([Link]).
Step8: Run the program using run menu. Start without debugging or ctrl+F5 (Save: ctrl+s
or file > save).
PROGRAM:
<% @page language=”C#”%>
<html>
<body>
<form id=”f1” runat=”server”>
<asp:AdRotator id=”ar” advertisementfile=”~/[Link]” runat=”server”/>
</form>
</body>
</html>
[Link]
<?xml version=”1.0” encoding=”UTF-8”?>
<Advertisement>
<Ad>
<Image url> [Link] </Image url>
<Navigation url> [Link] </Navigation url>
<Alternate text> Birds </Alternate text>
<Impression> 2 </Impression>
</Ad>
<Ad>
<Image url> [Link] </Image url>
<Navigation url> [Link] </Navigation url>
<Alternate text> Flowers </Alternate text>
<Impression> 1 </Impression>
</Ad>
</Advertisement>
[Link]
<html>
<body>
<h1> Course offered </h1>
<ol>
<li> BSC </li>
<li> BCA </li>
<li> [Link] </li>
<li> BBA </li>
</ol>
<a href=”[Link]”> Back </a>
</body>
</html>
[Link]
<html>
<body>
<h1> Tourist places </h1>
<ol>
<li> Bali </li>
<li> Goa </li>
<li> Malaysia </li>
<li>Singapore </li>
</ol>
<a href=”[Link]”> Back </a>
</body>
</html>
RESULT:
This the above program executed successfully and the output verified.
OUTPUT:
[Link]
Date:10/09/2025
CALENDAR CONTROL
AIM:
To design an calendar using [Link] calendar controls.
ALOGORITHM:
Step1: Go to dash home > Monodevelop.
Step2: Click start file >New > Solution > [Link] > Web applications.
Step3: In the name text_box type name & then choose the location browser option, in
opening and finally click ok.
Step4: In the coding window type the following program under <form id=”form”> tag.
(view > pads > solution)
Solution Ex7
Ex7
[Link] (select) & set option > Ex7 options, XSP server (RHS),
port number (8082/8081 (LHS)).
Step5: After completing the program run the program using run menu. Start without
debugging or ctrl+F5 (Save: ctrl+s or file > save).
Step6: In the output window enter the username, age, passwords and re-passwords.
Step7: Finally click on submit button.
PROGRAM:
<% @page language=”C#”%>
<html>
<body>
<form>
<div>
<asp:Calendar id=”calendar” runat=”server” OnSelection changed=”calendar selection
changed”/>
<br/> <br/>
SelectDate:<asp:TextBox id=”txtdate” runat=”server” ReadOnly=”tml”/>
</div>
</form>
</body>
</html>
[Link]:
Protected void page_load (object sender, EventArgs args)
{
If(!IsPostBack)
{
[Link]=[Link] DateString ( );
}
}
Protected void calendar_selectionchanged (object sender, EventArgs args)
{
[Link] =[Link] DateString ( );
}
}
}
RESULT:
This the above program executed successfully and the output verified.
OUTPUT:
[Link]
Date:11/09/2025
AUTHENTICATION AND AUTHORIZATION
AIM:
To determine the program using authentication and authorization in [Link]
ALGORITHM:
Step1: Go to dash home > MonoDevelop. Click new solution >[Link] > web application
>type the filename > browse the location select the folder > open the file.
Step2: In [Link] delete the button code line and type the following code.
Step3: In the solution window, select the filename and add the new file then choose [Link]
> web form and change the file name as [Link]
Step4: In the [Link] type the following code. In the solution window right click the
reference. Select the [Link] and [Link]
Step5: Run the program.
PROGRAM:
<% @page language=”C#”%>
<html>
<body>
<form id=”f1” runat=”server”>
<div>
<asp:TextBox id=”user” runat=”server” Placeholder=”username”/>
<br/> <br/>
<asp:TextBox id=”text pass” runat=”server” TextMode=”password”
Placeholder=”password”/>
<asp:Button id=”btnlogin” runat=”server” Text=”login” onclick=”btnlogin_click”/>
<br/> <br/>
<asp:Label id=”lb1Error” runat=”server/>
</form>
</body>
</html>
[Link]:
Public void btnlogin_click (object sender, EventArgs args)
{
if((txt [Link]==”admin”)&&(txt [Link]==”admin”))
{
[Link] from login page (txt [Link], false);
[Link](“[Link]”);
}
else
{
[Link]=”Invalid Credientials”;
}
}
Add: New html
[Link]
<html> <body>
<form id=”form1” runat=”server”>
<div>
<h1> Welcome Admin </h1>
</div>
</form> </body>
</html>
RESULT:
This the above program executed successfully and the output verified.
OUTPUT:
[Link]
Date:18/09/2025
STUDENT DATABASE
AIM:
To create a student database using [Link]
ALOGRITHM:
Step1: Go to dash home > Monodevelop.
Step2: Click start new solution > C# >click arrow of C3 >[Link] >web application click
the arrow of gt# > browse the file name and finally click ok.
Step3: In the left window side double click and [Link] and finally it is selected.
Step4: In [Link] arrow symbol type the following command.
Command in sql:
Mysql –u root –p
Enter Password: zaps
mysql> create a database student;
mysql> use student;
Database changed
mysql> create table mark (regno varchar(10), name varchar(20), mark1 integer(5),
mark2 integer(5));
mysql> insert into mark values („U232245‟,‟Malar‟,87,98);
mysql> select*from mark;
Step5: After created a database get back to monodevelop and type the following program
then run the program.
PROGRAM:
<% @page language=”C#”%>
<html>
<body>
<form id=”form1” runat=”server”>
[Link]:
<asp:TextBox id=”regno” runat=”server”/> <br/>
Name:
<asp:TextBox id=”name” runat=”server”/> <br/>
Mark1:
<asp:TextBox id=”mark1” runat=”server”/> <br/>
Mark2:
<asp:TextBox id=”mark2” runat=”server”/> <br/>
<br/> <br/>
<asp:Button id=”button1” Text=”insert” Onclick=”insert1” runat=”server”/>
<asp:Button id=”button2” Text=”update” Onclick=” update1” runat=”server”/>
<asp:Button id=”button3” Text=”delete” Onclick=” delete1” runat=”server”/>
<asp:Button Backcolor=”Bisque” id=”button4” Text=”view” Onclick=” view1”
runat=”server” />
<asp:GridView id=”Grid” runat=”server”>
<column>
<asp:BoundField HeaderText=”regno” DataField=”regno”/>
<asp:BoundField HeaderText=”name” DataField=”name”/>
<asp:BoundField HeaderText=”mark1” DataField=”mark1”/>
<asp:BoundField HeaderText=”mark2” DataField=”mark2”/>
</column>
</asp:GridView>
<asp:Label id=”MSG” runat=”server”/>
</form> </body> </html>
[Link]:
Using [Link];
Using [Link];
Using [Link];
Public partial class default:[Link]
{
String CS=”server=localhost;password=zaps;database=student;userid=root;port=3306;”;
Public virtual void insert1 (object sender,EventArgs args)
{
Mysql Connection con=new Mysql Connection (CS);
String insertsql=”insert into mark values (@regno, @name, @mark1, @mark2)”;
Mysql Parameter p1=new Mysql Parameter (“regno”, [Link]);
Mysql Parameter p2=new Mysql Parameter (“name”, [Link]);
Mysql Parameter p3=new Mysql Parameter (“mark1”, [Link] ([Link]));
Mysql Parameter p4=new Mysql Parameter (“mark2”, [Link] ([Link]));
Mysql Command insert cmd=new Mysql Command ([Link], con);
insert [Link](p1);
insert [Link](p2);
insert [Link](p3);
insert [Link](p4);
[Link]( );
int Status= insert [Link] ( );
if(Status ==1)
[Link]=”Students information are inserted into the database successfully”;
else
[Link]=”Records are not inserted successfully”;
[Link] ( );
}
Public virtual void update1(object sender,EventArgs args)
{
Mysql Connection con=new Mysql Connection (CS);
String updatesql=”update mark set mark1= @mark1; mark2= @mark2; where
regno=@regno;”;
Mysql Parameter p1=new Mysql Parameter (“regno”, [Link]);
Mysql Parameter p2=new Mysql Parameter (“mark1”, [Link]);
Mysql Parameter p3=new Mysql Parameter (“mark2”, [Link]);
Mysql Command insert cmd=new Mysql Command ([Link], con);
[Link]( );
int Status= [Link] ( );
if(Status >1)
[Link]=”Students marks are updated successfully”;
else
[Link]=”Marks are not updated”;
[Link] ( );
}
Public virtual void delete1(object sender,EventArgs args)
{
Mysql Connection con=new Mysql Connection (CS);
String deletesql=”delete from mark where regno=@regno;”;
Mysql Parameter p1=new Mysql Parameter (“regno”, [Link]);
Mysql Command insert cmd=new Mysql Command ([Link], con);
[Link]( );
int Status= [Link] ( );
if(Status >1)
[Link]=”Students data are deleted successfully”;
else
[Link]=”data are not deleted”;
[Link] ( );
}
Public virtual void view1(object sender,EventArgs args)
{
[Link]=true;
Mysql Connection con=new Mysql Connection (CS);
String sql1=”select* from mark”;
Mysql Command c1=new Mysql Command (sql1, con);
[Link]( );
Mysql DataReader r1=[Link]( );
[Link]=r1;
[Link]( );
[Link] ( );
}
}
RESULT:
This the above program executed successfully and the output verified.
OUTPUT:
[Link]
Date:19/09/2025
TELEPHONE USING GRID VIEW CONTROL
AIM:
To create a Telephone book database using [Link]
ALOGRITHM:
Step1: Go to dash home > Monodevelop.
Step2: Click start new solution > C# >click arrow of C3 >[Link] >web application click
the arrow of gt# > browse the file name and finally click ok.
Step3: In the left window side double click and [Link] and finally it is selected.
Step4: In [Link] arrow symbol type the following command.
Command in sql:
Mysql –u root –p
Enter Password: abmin
mysql> create a database telephone;
mysql> use telephone;
Database changed
mysql> create table details(tno into(20), tname varchar(20), address varchar(25));
mysql> insert into details values (9862743754, ‟Malarvizhi‟, „India‟);
mysql> insert into details values (9863694554, ‟Sameeha‟, „India‟);
mysql> insert into details values (6862743754, ‟Riyana regis‟, „India‟);
mysql> select*from mark;
Step5: After created a database get back to monodevelop and type the following program
then run the program.
PROGRAM:
<% @page language=”C#”%>
<html>
<head runat=”server”>
<title> Default </title>
</head>
<body bgcolor=”lavender”>
<form id=‟form1” runat=”server”>
<h1 align=”center”> TELEPHONE BOOK </h1>
Enter [Link]:
<asp:TextBox id=”t1” runat=”server”/> <br/>
Enter Name:
<asp:TextBox id=”t2” runat=”server”/> <br/>
Enter Address:
<asp:TextBox id=”t3” runat=”server”/> <br/>
Mark2:
<asp:TextBox id=”mark2” runat=”server”/> <br/>
<br/> <br/>
<asp:Button Backcolor=”Dark Turquoise” id=”button1” Text=”INSERT”
Onclick=”insertclicked” runat=”server”/>
<asp:Button Backcolor=”Dark Turquoise” id=”button2” Text=”DELETE”
Onclick=”deleteclicked” runat=”server”/>
<asp:Button Backcolor=”Dark Turquoise” id=”button3” Text=”UPDATE”
Onclick=”updateclicked” runat=”server”/>
<asp:Button Backcolor=”Bisque” id=”button4” Text=”VIEW” Onclick=” viewclicked”
runat=”server” />
<asp:GridView id=”grid1” runat=”server” AllowPaging=”true” AllowSorting=”true”
PageSize=”5”>
<column>
<asp:BoundField HeaderText=”tno” DataField=”tno”/>
<asp:BoundField HeaderText=”tname” DataField=”tname”/>
<asp:BoundField HeaderText=”address” DataField=”address”/>
</column>
</asp:GridView> <br/> <br/>
<asp:Label id=”l1” runat=”server”/>
</form> </body> </html>
[Link]:
Using System;
Using [Link];
Using [Link];
Using [Link];
Using [Link];
namespace telephonebook
{
Public partial class default:[Link] page
{
Public virtual void viewclicked (object sender,EventArgs args)
{
[Link]=true;
String CS=”server=localhost;password=admin;database=telee;userid=root;port=3306;”;
Mysql connection c=new Mysql connection (CS);
String sql1=”select*from details”;
Mysql command c1= new Mysql command (sql1,c);
[Link]( );
Mysql DataReader r1=[Link] ( );
[Link]=r1‟
[Link]( );
[Link]( );
}
Public virtual void insertclicked (object sender, EventArgs args)
{
[Link]=false;
String CS=”server=localhost;password=admin;database=telee;userid=root;port=3306;”;
Mysql connection c=new Mysql connection (CS);
String sql1=”insert into telee values (@a, @b, @c);”;
Mysql Parameter p1=new Mysql Parameter (“a”, [Link]([Link]));
Mysql Parameter p2=new Mysql Parameter (“b”, ([Link]));
Mysql Parameter p3=new Mysql Parameter (“c”, ([Link]));
Mysql Command c1=new Mysql Command(sql1,c);
[Link](p1);
[Link](p2);
[Link](p3);
[Link]( );
int k=[Link]( );
if(k>0)
[Link]=”Inserted successfully”;
[Link]( );
}
Public virtual void updateclicked (object sender, EventArgs Args)
{
[Link]=false;
String CS=”server=localhost;password=admin;database=telee;userid=root;port=3306;”;
Mysql connection c=new Mysql connection (CS);
String sql1=”update telee set tname=@b, address=@c where tno=@a;”;
Mysql Parameter p1=new Mysql Parameter (“a”, [Link]([Link]));
Mysql Parameter p2=new Mysql Parameter (“b”, ([Link]));
Mysql Parameter p3=new Mysql Parameter (“c”, ([Link]));
Mysql Command c1=new Mysql Command(sql1,c);
[Link](p1);
[Link](p2);
[Link](p3);
[Link]( );
int k=[Link]( );
if(k>0)
[Link]=”Updated successfully”;
[Link]( );
}
Public virtual void deleteclicked (object sender, EventArgs Args)
{
[Link]=false;
String CS=”server=localhost;password=admin;database=telee;userid=root;port=3306;”;
Mysql connection c=new Mysql connection (CS);
String sql1=”delete from telee where tno=@a;”;
Mysql Parameter p1=new Mysql Parameter (“a”, [Link]([Link]));
Mysql Command c1=new Mysql Command(sql1,c);
[Link](p1);
[Link]( );
int k=[Link]( );
if(k>0)
[Link]=”Deleted successfully”;
[Link]( );
}
}
}
RESULT:
This the above program executed successfully and the output verified.
OUTPUT:
[Link]
Date:26/09/2025
DATA BINDING WITH WEB CONTROLS
AIM:
Bind DropDownList to database data from sqlDataSource.
ALOGORITHM:
Step1: Go to dash home > Monodevelop.
Step2: Click start file >New > Solution > [Link] > Web applications.
Step3: In the name text_box type name & then choose the location browser option, in
opening and finally click ok.
Step4: In the coding window type the following program under <form id=”form”> tag.
(view > pads > solution)
Solution Ex11
Ex11
[Link] (select) & set option > Ex11 options, XSP server (RHS),
port number (8082/8081 (LHS)).
Step5: After completing the program run the program using run menu. Start without
debugging or ctrl+F5 (Save: ctrl+s or file > save).
Step6: In the output window enter the username, age, passwords and re-passwords.
Step7: Finally click on submit button.
PROGRAM:
<%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”[Link]”
Inherits=”Program11”%>
<!DOCTYPE html>
<html xmlns=”[Link]
<head runat=”server”>
<title>program 11 </title>
</head>
<body>
<form id=”form1” runat=”server”>
<div>
<asp:DropDownList id=”ddlStudents” runat=”server” DataSource id=”SqlDataSource1”
DataField=”Name” DataValueField=”StudentID”>
</asp:DropDownList>
<asp:SqlDataSource id=”SqlDataSource1” runat=”server” ConnectionString=”<%$
ConnectionStrings:SchoolDBConnectionString %>” SelectCommand=”SELECT
StudentID, Name FROM Students”>
</asp:sqlDataSource>
</div>
</form> </body> </html>
RESULT:
This the above program executed successfully and the output verified.
OUTPUT:
[Link]
Date:29/09/2025
DATA BINDING WITH DATA CONTROLS
AIM:
Use the Details View to display single record and bind to SqlDataSource.
ALOGORITHM:
Step1: Go to dash home > Monodevelop.
Step2: Click start file >New > Solution > [Link] > Web applications.
Step3: In the name text_box type name & then choose the location browser option, in
opening and finally click ok.
Step4: In the coding window type the following program under <form id=”form”> tag.
(view > pads > solution)
Solution Ex12
Ex12
[Link] (select) & set option > Ex12 options, XSP server (RHS),
port number (8082/8081 (LHS)).
Step5: After completing the program run the program using run menu. Start without
debugging or ctrl+F5 (Save: ctrl+s or file > save).
Step6: In the output window enter the username, age, passwords and re-passwords.
Step7: Finally click on submit button.
PROGRAM:
<%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”[Link]”
Inherits=”Program12” %>
<!DOCTYPE html>
<html xmlns=”[Link]
<head runat=”server”>
<title> Program 12 </title>
</head> <body>
<form id=”form1” runat=”server”>
<div>
<asp:DetailsView id=”DetailsView1” runat=”server” AutoGenerateRows=”true”
DataKeyNames=”StudentID” DataSource id=”SqlDataSource1”>
</asp:DetailsView>
<asp:SqlDataSource id=”SqlDataSource1” runat=”server” ConnectionStrings:”<%$
ConnectionStrings:SchoolDBConnectionString %>” SelectCommand=”SELECT
StudentID, Name, Age FROM Students WHERE StudentID=1”>
</asp:sqlDataSource>
</div>
</form> </body> </html>
RESULT:
This the above program executed successfully and the output verified.