0% found this document useful (0 votes)
35 views75 pages

Web Technology Lab Manual

The document outlines various programs implemented in VB.NET and C# including finding the factorial value, comparing numbers, arithmetic operations, and other basic programs. It provides the code, design, and output for each program implemented as windows form or web applications.

Uploaded by

uma devi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views75 pages

Web Technology Lab Manual

The document outlines various programs implemented in VB.NET and C# including finding the factorial value, comparing numbers, arithmetic operations, and other basic programs. It provides the code, design, and output for each program implemented as windows form or web applications.

Uploaded by

uma devi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 75

DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

CONTENT

[Link] DATE PROGRAMS [Link] SIGN

[Link]

1.
Find the Factorial Value

2.
Find the Biggest & Smallest
Number

3.
Arithmetic Operation

4.
File &Folder Control

5.
Progress Bar

6.
List view Control

7.
Simple Login Form Without
Database

8.
Automatic Compute Age
Using DateTimePicker
9.
Error Handling

1
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

C#-WINDOWS FROM APPLICATION

10.
Google Map

11.
Insert, Delete, and Update the
Data in DataGridView without
using Database.

C#-WEB APPLICATION

12.
Display the Tweets Using
DataGridView Control with
MS-Access

13.
Query String Collection

14.
ADRotator Control

15. Image Slider

16. Registration Form Validation

2
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

[Link]
DATE: FIND THE FACTORIAL VALUE

AIM:

To write a [Link] program to find the factorial value using Windows Form
Application.

ALGORITHM:

1. Start  Visual Studio 2008


2. Click file >> new >> project >> visual basic >> windows >> windows
form application.
3. Place three label box in the form design page and named it as enter
the number, result, label.
4. Place a button in the Centre and named it as generate. Double-click on
the button and give the codings.
5. Save the program
6. Run the program

3
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

FORM DESIGN:

PROPERTIES:

CONTROLS TEXT NAME

Label1 factorial number Label1

Label2 Enter the number Label2

Label3 Result Label3

Label4 - Label4

Textbox1 - Textbox1

Button1 Generate Button1

4
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

SOURCE CODE:
Public Class Form1
Private Sub Button1_Click(ByVal sender As [Link], ByVal e
As [Link]) Handles [Link]
[Link] = fact(Val([Link]))
End Sub
Function fact(ByVal a As Integer) As Long
Dim k As Integer
fact = 1
For k = a To 1 Step -1
fact *= k
Next
End Function
End Class

5
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

OUTPUT:

RESULT:
Thus the program has been successfully executed.

6
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

[Link]
FIND THE BIGGEST & SMALLEST
NUMBERS
DATE:

AIM:

To write a [Link] program to find the biggest and smallest of three numbers using
Windows Form Application.

ALGORITHM:

1. Start the program.


2. Open Microsoft visual studio 2008.
3. Go to file->new project->visual basic->windows->windows form application.
4. Design the page with the required tools.
5. Change the properties for the selected tools.
6. Select the tools used in the design page and write code accordingly.
7. Save and run the program.
8. Stop the program.

7
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

FORM DESIGN:

PROPERTIES:

CONTROLS TEXT NAME

Label1 BIGGEST NUMBER Label1

Label2 First Number Label2

Label3 Second Number Label3

Label4 Third number Label4

Label5 Biggest Label5

Label6 Smallest Label6

Label7 - Label7

Label8 - Label8

Button Compare Button1

8
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

SOURCE CODE:
Public class form1
Private sub button1_click (Byval Sender As System-object,Byval e As [Link])Handles
[Link]
Dim f As Integer
Dim s As Integer
Dim t As Integer
Dim sma As Integer
Dim lar As Integer
F=val([Link])
S=val([Link])
T=val([Link])
If f>s then
Lar=f
Else
Lar=s
End If
If lar <t then
Lar=t
End If
If lar<s then
Sma=f
Else
Sma=s
End If
If sma>t then
Sma=t
End If
[Link]=lar
[Link]=sma
End Sub

9
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

OUTPUT:

RESULT:
Thus the program has been successfully executed.

10
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

[Link]
ARITHMETIC OPERATION
DATE:

AIM:

To write a [Link] program to find the Arithmetic operation using Windows


Form Application.

ALGORITHM:

1. Start visual studio 2008.


2. Go to file->new project->visual basic->windows->windows form application.
3. Place a label box and named as arithmetic operation.
4. Place a three label box and named it as number1, number2, result.
5. Place three text box parallel to the label boxes in the form
6. Place five button and named as an add, sub, mul, div, clear. Double click on each
buttons and give the codings.
7. Save the program.
8. Run the program.
9. End the program

11
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

FORM DESIGN:

PROPERTIES:

CONTROLS TEXT NAME


ARITHMETIC
Label 1 Label 1
OPERATION
Label 2 Number 1 Label 2
Label 3 Number 2 Label 3
Result
Label 4 Label 4
-
Text box 1 Text box 1
Text box 2
Text box 2 -

Text box 3 - Text box 3


Add
Button 1 Button 1
Sub
Button 2 Button 2
Mul
Button 3 Button 3
Div
Button 4 Button 4
Clear
Button 5 Button 5

12
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

SOURCE CODE:
Public Class Form1
Dim number1 AsInteger
Dim number2 As Integer
Dim result AsInteger
PrivateSub Button1_Click(ByVal sender As [Link], ByVal e As
[Link]) Handles [Link]
number1 = [Link]
number2 = [Link]
result = number1 + number2
[Link] = result
EndSub
PrivateSub Button2_Click(ByVal sender As [Link], ByVal e As [Link])
Handles [Link]
number1 = [Link]
number2 = [Link]
result = number1 - number2
[Link] = result
EndSub
PrivateSub Button3_Click(ByVal sender As [Link], ByVal e As [Link])
Handles [Link]
number1 = [Link]
number2 = [Link]
result = number1 * number2
[Link] = result
EndSub
PrivateSub Button4_Click(ByVal sender As [Link], ByVal e As [Link])
Handles [Link]
number1 = [Link]
number2 = [Link]
result = number1 / number2
[Link] = result
EndSub

13
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

PrivateSub Button5_Click(ByVal sender As [Link], ByVal e As [Link])


Handles [Link]
[Link] = ""
[Link] = ""
[Link] = ""
EndSub
EndClass

14
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

OUTPUT:

RESULT:
Thus the program has been successfully executed.

15
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

[Link]
FILE & FOLDER CONTROL
DATE:

AIM:

To write a [Link] program to find the File & Folder Control using Windows
Form Application.

ALGORITHM:

1. Start the program.


2. Open Microsoft visual studio 2008.
3. Go to file-> project-> visual basic-> windows-> windows form application.
4. Design the page with the required tools.
5. Double-click on the button and write the code accordingly.
6. Save & run the program.
7. Stop the program.

16
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

FORM DESIGN:

PROPERTIES:

CONTROLS TEXT NAME

Label1 File&Folder Control Label1

Label2 Selected folder Label2

Label3 Selected file Label3

Textbox1 Textbox1

Textbox2 Textbox2

Radiobutton1 Folder Open Radiobutton1

Radiobutton2 File Open Radiobutton2

Openfiledialog1 Openfiledialog1

Folderbrowserdialog1 Folderbrowserdialog1

Button1 OK Button1

Groupbox1 Groupbox1

17
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

SOURCE CODE:
PublicClass Form1
PrivateSub Button1_Click(ByVal sender As [Link], ByVal e As [Link])
Handles [Link]
If [Link] = TrueThen
[Link]()
[Link] = [Link]
Else
[Link]()
[Link] = [Link]
EndIf
EndSub
EndClass

18
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

OUTPUT:

RESULT:
Thus the program has been successfully executed.

19
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

[Link]
PROGRESS BAR
DATE:

AIM:

To write a [Link] program to find the Progress Bar using Windows Form
Application.

ALGORITHM:
1. Open Microsoft Visual Studio 2008.

2. Go to file->new project->visual basic->windows->windows form application.

3. In the toolbox, click and drag three label boxes, two textboxes, a progress bar and a timer.
Rename the label boxes according to the program.

4. Change the interval of timer to 100.

5. Double click on the button and give the codings.

6. Save the program.

7. Run the program.

8. End the program.

20
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

FORM DESIGN:

PROPERTIES:

CONTROLS TEXT NAME

Label1 PROGRESS BAR Label1

Label2 Username Label2

Label3 Password Label3

Textbox1 - Textbox1

Textbox2 - Textbox2

Button1 Login Button1

ProgressBar1 - ProgressBar1

Timer1 Interval- 100 Timer1

21
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

SOURCE CODE:
Public class Form1

Private sub form_load(Byval Sender As System-object,Byval e As [Link])Handles

[Link]

[Link]=0

[Link]=100

End Sub

Private Sub Timer1_Tick (Byval Sender As System-object,Byval e As [Link])Handles

[Link]

[Link]=[Link]+5

[Link]=[Link]&”%”&”completed”

If [Link]>=100 then

[Link]=False

If [Link]=”CS” And [Link]=”123” then

MsgBox(“Welcome”,[Link] “CS GIRLS”)

[Link]=0

Else

MsgBox(“Invalid user name”,[Link],”CS GIRLS”)

[Link]= ““

[Link]=0

[Link] ()

End If

End If

22
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

End Sub

Private Sub Button1_click (Byval Sender As System-object,Byval e As [Link])Handles


[Link]

[Link]=True

End Sub

End Class

23
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

OUTPUT:

RESULT:

Thus the program has been successfully executed.

24
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

[Link]
LISTVIEW CONTROL
DATE:

AIM:
To write a [Link] program to display students marksheet using listview control in
Windows Form Application.

ALGORITHM:
1. Open Microsoft visual studio 2008.
2. Click file >> select new >> new project >> visual basic>> windows form application.
3. From the toolbox,
4. Click and drag 9 label boxes and rename them.
5. Click and drag 8 textboxes and place them correspondingly with the label boxes;
6. Click and drag ListView control and select details in view in the property of
ListView control; click and drag button and change the text to ADD in the property
of button.
7. Double-click on the form and give the codings. Similarly, double-click on the button
and give the codings.
8. Save the program.
9. Run the program.
10. End the program.

25
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

FORM DESIGN:

PROPERTIES:

CONTROLS TEXT NAME

Label1 Roll no Label1


Label2 Name Label2
Label3 Tamil Label3
Label4 English Label4
Label5 Maths Label5
Label6 Computer Science Label6
Label7 Physics Label7
Label8 Chemistry Label8
Label9 DISPLAY STUDENT’S Label9
MARKSHEET USING
LISTVIEW CONTROL
TextBox1 - TextBox1
TextBox2 - TextBox2
TextBox3 - TextBox3
TextBox4 - TextBox4
TextBox5 - TextBox5
TextBox6 - TextBox6
TextBox7 - TextBox7
TextBox8 - TextBox8
Button Add Button
ListView - ListView

26
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

SOURCE CODE:
Public Class Form1
Private Sub Form1_Load(ByVal sender As [Link], ByVal e As [Link])
Handles [Link]
[Link]("roll", 60, [Link])
[Link]("name", 100, [Link])
[Link]("tam", 60, [Link])
[Link]("eng", 60, [Link])
[Link]("maths", 60, [Link])
[Link]("cs", 60, [Link])
[Link]("phy", 60, [Link])
[Link]("chem", 60, [Link])
[Link]("total", 60, [Link])
[Link]("ave", 60, [Link])
End Sub
Private Sub Button1_Click(ByVal sender As [Link], ByVal e As
[Link]) Handles [Link]
Dim newitem As New ListViewItem([Link])
Dim tot, ave As Single
[Link]([Link])
[Link]([Link])
[Link]([Link])
[Link]([Link])
[Link]([Link])
[Link]([Link])
[Link]([Link])
[Link](newitem)
tot = (Val([Link]) + Val([Link]) + Val([Link]) +
Val([Link]) + Val([Link]) + Val([Link]))
ave = tot / 6
[Link](tot)
[Link](ave)
[Link] = " "
[Link] = " "
[Link] = " "
[Link] = " "
[Link] = " "
[Link] = " "
[Link] = " "
[Link] = " "
[Link]("Record inserted successfully")
End Sub
End Class

27
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

OUTPUT:

RESULT:
Thus the program has been successfully executed.

28
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

[Link]
SIMPLE LOGIN FORM WITHOUT
DATE: DATABASE

AIM:

To write a [Link] program to find the simple login form without database
using Windows Form Application.

ALGORITHM:
1. Start the program.
2. Open Microsoft visual studio 2008.
3. Go to file ->new project ->visual basic->windows->windows form application.
4. Design the page with the required tools. (label,button,textbox)
5. Change the properties for the selected tools. Rename the label as user name and
another label as password. and then rename the buttons as Login and Exit.
6. Click Password Textbox ->property-> passwordchar - *.
7. Create Form 2 and design the page with label as “DONE”.
8. Select the label in the form 2 design page and write code accordingly.
9. Select the login button in form 1 design page and write code accordingly.
10. Save & run the program.
11. Stop the program

29
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

FORM DESIGN:

PROPERTIES:

CONTROLS TEXT NAME

FORM1

Label1 LOGIN PAGE Label1

Label2 Username Label2

Label3 Password Label3

Textbox1 - Textbox1

Textbox2 - Textbox2

Button1 Login Button1

Button2 Exit Button2

FORM 2

Label1 Done! Label1

30
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

SOURCE CODE:
Form1:

PublicClass Form1
PrivateSub Button2_Click(ByVal sender As [Link], ByVal e As [Link])
Handles [Link]
[Link]()
EndSub
PrivateSub Button1_Click(ByVal sender As [Link], ByVal e As [Link])
Handles [Link]
If [Link] = "Anu"And [Link] =
"1333"Then [Link]()
[Link]()
EndIf
EndSub
EndClass

Form2:
PublicClass Form2
PrivateSub Label1_Click(ByVal sender As [Link], ByVal e As [Link])
Handles [Link]
[Link] = "DONE!"
EndSub
EndClass

31
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

OUTPUT:

RESULT:
Thus the program has been successfully executed.

32
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

[Link]
AUTOMATIC COMPUTE AGE USING
DATE:
DATETIMEPICKER

AIM:

To write a [Link] program to find the automatic compute age using datatimepicker
in Windows Form Application.

ALGORITHM:

1. Start visual studio 2008.


2. Go to file<<new<<project<<visual basic<<window<<windows form application
3. Place a label box and named it as calculating the age.
4. Place two label boxes and named it as our wish.
5. The datetimepicker tool is place at the form
6. Text box is also placed.
7. Go to the properties of the textbox and in the ENABLED column select the false
option
8. Double clock on the datetimepicker tool and write the coding’s
9. Save the program
10. Run the program
11. End the program

33
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

FORM DESIGN:

PROPERTIES:

CONTROLS TEXT NAME

Label 1 CALCULATE OUR AGE Label 1

Label 2 Select Your Date Label 2

Label 3 Your Age Label 3

Datetimepicker 1 - Datetimepicker 1

Textbox 1 - Textbox 1

34
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

SOURCE CODE:
PublicClass Form1
PrivateSub DateTimePicker1_ValueChanged(ByVal sender As [Link], ByVal e As
[Link]) Handles [Link]
Dim datecheck AsString
Dim today As [Link] = [Link]
datecheck = [Link]
Dim yearnow AsInteger = [Link]
Dim yeardtp AsInteger = [Link]
Dim rightyear AsInteger = [Link]
Dim minimage AsInteger = yeardtp - rightyear
Dim currentage AsInteger = yearnow - yeardtp
[Link] = [Link]
[Link]()
EndSub

35
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

OUTPUT:

RESULT:
Thus the program has been successfully executed.

36
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

[Link]
DATE: ERROR HANDLING

AIM:

To write a [Link] program to find the Error Handling using Windows Form
Application.

ALGORITHM:

1. Start the program.

2. Open Microsoft visual studio 2008.

3. Go to file->new project->visual basic->windows->windows form application.

4. Design the page with the required tools. (Label box, button, textbox)

5. Change the properties for the selected tools.

6. Select the tools used in the design page and write code accordingly.

7. Save and Run the program.

8. Stop the program.

37
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

FORM DESIGN:

PROPERTIES:

CONTROLS TEXT NAME

Label1 ERROR HANDLING Label1

Label2 Enter the number under 250 Label2

Textbox1 - Textbox1

Button1 CHECK Button1

38
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

SOURCE CODE:
Public Class Form1
Private Sub cmdCheck_Click(ByVal sender As [Link], ByVal e As
[Link]) Handles [Link]
Dim intInteger As Byte
Try
intInteger = CByte([Link])
Catch ex As InvalidCastException
MsgBox("There was an Invalid Cast Exception error")
Catch ex As OverflowException
MsgBox("There was an Overflow Exception error")
Catch ex As Exception
MsgBox("There was a general error")
End Try
MsgBox("You entered : " & [Link])
End Sub
End Class

39
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

OUTPUT:

RESULT:
Thus the program has been successfully executed.

40
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

[Link]
GOOGLE MAP
DATE:

AIM:

To create a google map using visual studio 2008.

ALGORITHM:

1. Start the visual studio 2008


2. Go to file<<new<<project<<c#<<windows form application.
3. The split container is placed in the specified area
4. Now in the new window place the label box named as country, state, city, street.
5. Place four text box in parallel to the label box.
6. Button is place in the center of the left page
7. Now save the file as we required
8. Run the program
9. End the program

41
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

FORM DESIGN:

PROPERTIES:

CONTROLS TEXT NAME


splitcontainer 1 - Splitcontainer 1

Label 1 GOOGLE MAP Label 1

Label 2 Street Label 2

Label 3 City Label 3

Label 4 State Label 4

Label 5 Zip Label 5


Textbox1-textbox4 - Textbox1-textbox4

Web browser1 - Web browser 1

Button 1 Search Button 1

42
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

SOURCE CODE:

PublicClass Form1

PrivateSub DateTimePicker1_ValueChanged(ByVal sender As [Link], ByVal e As


[Link]) Handles [Link]

Dim datecheck AsString


Dim today As [Link] = [Link]
datecheck = [Link]
Dim yearnow AsInteger = [Link]
Dim yeardtp AsInteger = [Link]
Dim rightyear AsInteger = [Link]
Dim minimage AsInteger = yeardtp - rightyear
Dim currentage AsInteger = yearnow - yeardtp
[Link] = [Link]
[Link]()
EndSub
PrivateSub Form1_Load(ByVal sender As [Link], ByVal e As [Link])
[Link]
EndSub
EndClass

43
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

OUTPUT:

RESULT:
Thus the program has been successfully executed.

44
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

[Link] INSERT, DELETE AND UPDATE THE DATA


IN DATAGRIDVIEW WITHOUT USING
DATE: DATABASE

AIM:

To insert, delete and update the data in DataGrid View without using Database.

ALGORITHM:

1. Open Microsoft visual studio 2008


2. Click file>>select new >>new project>>c#>>windows form application
3. In the form drag and drop Label box, Text Box, Button, and DataGridView
control from the Toolbox.
4. Click the label and rename it, which is replaced by the column name in the
DataGridView.
5. Click the buttons and give the coding.
6. Save the program
7. Run the program.
8. End the program.

45
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

FORM DESIGN:

46
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

PROPERTIES:

CONTROLS TEXT NAME

Label1 Name Label1

Label2 Address Label2

Label3 Mobile number Label3

Label4 Pin code Label4

Label5 SHOPPING DETAILS USING Label5


DATAGRID
Textbox1 - Textbox1

Textbox2 - Textbox2

Textbox3 - Textbox3

Button1 Insert Button1

Button2 New Button2

Button3 Update Button3

Button4 Delete Button4

47
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

SOURCE CODE:
using System;
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
namespace shopping_online
{
public partial class Form1 : Form
{
DataTable table = new DataTable("table");
int index;
public Form1()
{
InitializeComponent();
}
private void form1_Load(object sender, EventArgs e)
{
[Link]("NAME", [Link]("[Link]"));
[Link]("ADDRESS", [Link]("[Link]"));
[Link]("MOBILE NO", [Link]("[Link]"));
[Link]("PINCODE", [Link]("[Link]"));
[Link] = table;
}

private void button1_Click(object sender, EventArgs e)


{
[Link]([Link], [Link], [Link], [Link]);
[Link]("Data Inserted Successfully");
}

private void button2_Click(object sender, EventArgs e)


{
[Link] = [Link];
[Link] = [Link];
[Link] = [Link];
[Link] = [Link];
}
private void dataGridview1_CellClick(object sender, DataGridViewCellEventArgs e)
{
index = [Link];
DataGridViewRow row = [Link][index];
[Link] = [Link][0].[Link]();
[Link] = [Link][1].[Link]();

48
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

[Link] = [Link][2].[Link]();
[Link] = [Link][3].[Link]();
}

private void button3_Click(object sender, EventArgs e)


{
DataGridViewRow newdata=[Link][index];
[Link][0].Value = [Link];
[Link][1].Value = [Link];
[Link][2].Value = [Link];
[Link][3].Value = [Link];
[Link]("Data Updated Successfully");
}
private void button4_Click(object sender, EventArgs e)
{
index = [Link];
[Link](index);
[Link]("Data Deleted Successfully");
}
}

49
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

OUTPUT:

RESULT:
Thus the program has been successfully executed.

50
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

[Link]
DISPLAY THE TWEETS USING
DATE: DATAGRIDVIEW WITH MS-ACCESS

AIM:

To display the TWEETS using DataGridView with MS access in [Link] web

application.

ALGORITHM:

1. Start the program

2. Open file→ New project, visual c# →add [Link] web application template and

name the project

3. Default page of aspx design tab add gridview &amp; sql datasource.

4. Open MS access and create an database and save the database as TWEETL

5. Create the design view for the table and the data type and save as at access 2000

Database.

6. Open visual studio→using server explorer add data connection→Browse the file

name and add it →check the test connection.

7. Through sqlDatasource →configure data source→connect the databse with new

connection to check the TEST QUERY.

8. Using gridview choose the data source→SqlDataSource and Enable [Link]

auto format we can select the scheme.

9. Solution Explorer→add the existing item of the database were saved

10. Run the program using google chrome.

51
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

FORM DESIGN:

52
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

53
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

PROPERTIES:

CONTROLS TEXT NAME

Gridview - Gridview1

SqlDataSourse - SqlDataSourse1

54
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

OUTPUT:

RESULT:
Thus the program has been successfully executed.

55
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

[Link]
DATE: QUERYSTRING

AIM:

To write a [Link] program to create the querystring collection using Web


Application.

ALGORITHM:

1. Open Microsoft visual studio 2008.


2. Open file>>New project>>visual c#>>add [Link] web application template
and name the project.
3. Create page1 and Label,Textbox,Button from the tool box.
4. Again, create page2 and drop a Label from the tool box.
5. Click the buttons and the codings.
6. In output, page1 we have to right click>>view in browser.
7. Form will be created in next page.
8. Save the program.
9. Run the program.

56
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

FROM DESIGN:

Page1:

PROPERTIES:

CONTROLS TEXT NAME

Label 1 Firstname Label 1

Label 2 Lastname Label 2

Textbox 1 - Textbox 1

Textbox 2 - Textbox 2

Button 1 QUERYSTRING Button 1

57
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

SOURCE CODE:
using System;
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
namespace q1
{
public partial class page1 : [Link]
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void Button1_Click(object sender, EventArgs e)
{
[Link]("[Link]?firstname=" + [Link] +
"&lastname=" + [Link] + "");
}
}
}

58
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

Page2:

PROPERTIES:

CONTROLS TEXT NAME

Label 1 Fullname Label 1

Lable 2 Lblname Label 2

59
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

SOURCE CODE:
using System;
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
namespace q1
{
public partial class page2 : [Link]
{
protected void Page_Load(object sender, EventArgs e)
{
[Link] = [Link]["firstname"] +
[Link]["lastname"];
}
}
}

60
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

OUTPUT:
Page1:

Page2:

RESULT:
Thus the program has been successfully executed.

61
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

[Link]
DATE: ADROTATOR CONTROL

AIM:

To write a [Link] program using ADRotator control.

ALGORITHM:

1. Open Microsoft Visual Studio –> click file New Website, to click a new
empty web application / website.
2. Create New web page for display and click Website Add new item, to select
XML file.
3. Right click on Solution Explorer –> Add New folder and rename(images) right click
to select Add existing item and select jpg files to copy and paste it.
4. Add New XML File in project for write advertisement detail.
5. Then click website to add new item to select Web form.
6. Drag and drop AdRotator Control on web page from toolbox.
7. Assign XML File to AdvertisementFile property of AdRotator control.
8. Then save it and start debugging.

62
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

FORM DESIGN:

PROPERTIES:

CONTROL ADVERTISEMENT NAME

ADRotator XML file ADRotator

63
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

SOURCE CODE:
<?xml version="1.0" encoding="utf-8" ?>
<Advertisements>
<Ad>
<ImageUrl>Images\[Link]</ImageUrl>
<NavigatorUrl>[Link]
<width>600</width>
<height>300</height>
<Impression>800</Impression>
</Ad>
<Ad>
<ImageUrl>Images\[Link]</ImageUrl>
<NavigatorUrl>[Link]
<width>600</width>
<height>300</height>
<Impression>800</Impression>
</Ad>
</Advertisements>

64
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

OUTPUT:

RESULT:

Thus the program has been successfully executed.

65
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

[Link]
IMAGE SLIDER
DATE:

AIM:

To write a [Link] program to create the image slider in using web application.

ALGORITHM:

1. Start the program.


2. Open Microsoft visual studio 2008.
3. Go to file -> new project-> other language -> c#-> web-> [Link] web application.
4. Copy the image from the file explorer place it within the project file.
5. Design the page with the required tools.
6. Change the properties for the selected tools.
7. Select the tools used in the design page and write code accordingly.
8. Save and run the program.
9. Stop the program.

66
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

FROM DESIGN:

PROPERTIES:

CONTROLS TEXT NAME

Image 1 - Image 1

Image 2 - Image 2

Image 3 - Image 3

Button 1 - Button 1

Button 2 - Button 2

67
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

SOURCE CODE:
Using [Link];
Using [Link];
Using [Link];

Using [Link];
Using [Link];
Using [Link];
Using [Link];
Using [Link];
Using [Link];
Using [Link];
Namespace WebApplication1

Public partial class _Default: [Link]


{

Protected void Button1_Click (object sender, EventArgs e)

String url = [Link];


[Link] = [Link];
[Link] = [Link];
[Link] = url; }
protected void Button2_Click(object sender, EventArgs e)

{string url = [Link];


[Link] = [Link];
[Link] = [Link];
[Link] = url;
}

}
}

68
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

OUTPUT:

RESULT:
Thus the program has been successfully executed.

69
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

[Link] REGISTRATION FORM VALIDATION

DATE:

AIM:
To write a [Link] program to create the registration from with validation using web
application.

ALGORITHAM:

1. Start the program.


2. Open Microsoft visual studio 2008.
3. Go to file->new project->other language->c#->web ->[Link] web application.
4. Design the page with the required tools.
5. Drag the validation tool in the design page.
6. Change the properties for the selected tools.
7. Select the tools used in the design page and write code accordingly.
8. Save the program.
9. Run the program.
10. End the program.

70
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

FORM DESIGN:

71
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

72
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

PROPERTIES:

CONTROLS TEXT NAME FIELD VALIDATOR

Label 1 LOGIN FROM Label 1 -


VALIDATION

Label 2 User name Label 2 Required field validator

Label 3 e-mail Label 3 Regular expression validator

Label 4 Password Label 4 Required field validator

Label 5 Conform password Label 5 Required field validator&


compare validator

Label 6 Country Label 6 Required validator

Textbox 1 - Textbox 1 -

Textbox 2 - Textbox 2 -

Text box 3 - Textbox 3 -

Textbox 4 - Textbox 4 -

Dropdown box 1 - Dropdown box 1 -

Button 1 Submit Button 1 -

73
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

SOURCE CODE:
[Link];

Using [Link];

Using [Link];

Using [Link];

Using [Link];

Using [Link];

Using [Link];

Using [Link];

Using [Link] controls;

Using [Link];

Using [Link];

Using [Link];

Name space webapplication7

Public partial class_default:[Link]

Protected void button1_click (object sender,eventargs e)

[Link](“LOGIN SUCCESFULLY”);

74
DEPARTMENT OF COMPUTER SCIENCE, SACWC WEB TECHNOLOGY LAB

OUTPUT:

RESULT:
Thus the program has been successfully executed.

75

You might also like