Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Font Application

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 54

EX.

NO: 1
1. FONT APPLICATION
DATE: 21.12.17

AIM:

To create a Font Application program using VB.net

ALGORITHM:
Step1: Start -All program-MS visual studio2008-visual studio.

Step2:In windows application create a font program

Step3: create one rich text box ,button control, and font dialog control on windows
application form

Step4: Set the Text property of the button control to 'Change Font'

Step5: Set the ShowColor property of the FontDialog control to True.

Step6: Double-click the Change Color button and modify the code of the Click
event.

Step7:Stop the process.


PROGRAM :

If FontDialog1.ShowDialog <> Windows.Forms.DialogResult.Cancel Then

TextBox1.ForeColor = FontDialog1.Color

TextBox1.Font = FontDialog1.Font

End If
OUTPUT:

RESULT:

Thus the above program is verified.


Ex No: 2

Date: 29.12.2017 2.NOTEPAD APPLICATION

AIM:

To create a Notpad Application using VB.net.

ALGORITHM:
Step1:Start -All program-MS visual studio2008-visual studio.

Step2: Create one textbox for notpad menus.

Step3: create one menu strips for make a note pad properties, like file,new,cut ,copy
menus

Step4: Double click the menus to write a coding to create a notepad.

Step5: create a Font dialog control to change color and font style.

Step6: Stop the process.


PROGRAM :

NEW:

Private Sub NewToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles NewToolStripMenuItem.Click
If TextBox1.Modified Then

Dim ask As MsgBoxResult

ask = MsgBox("Do you want to save the changes",


MsgBoxStyle.YesNoCancel, "New Document")

If ask = MsgBoxResult.No Then

TextBox1.Clear()

ElseIf ask = MsgBoxResult.Cancel Then

ElseIf ask = MsgBoxResult.Yes Then

SaveFileDialog1.ShowDialog()

My.Computer.FileSystem.WriteAllText(SaveFileDialog1.FileName,
TextBox1.Text, False)

TextBox1.Clear()

End If

Else

TextBox1.Clear()

End If

End Sub
OPEN:

Private Sub OpenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles OpenToolStripMenuItem.Click
'Check if there's text added to the textbox
If TextBox1.Modified Then

'If the text of notepad changed, the program will ask the user if they want to save
the changes
Dim ask As MsgBoxResult

ask = MsgBox("Do you want to save the changes",


MsgBoxStyle.YesNoCancel, "Open Document")
If ask = MsgBoxResult.No Then
OpenFileDialog1.ShowDialog()
TextBox1.Text =
My.Computer.FileSystem.ReadAllText(OpenFileDialog1.FileName)
ElseIf ask = MsgBoxResult.Cancel Then
ElseIf ask = MsgBoxResult.Yes Then
SaveFileDialog1.ShowDialog()

My.Computer.FileSystem.WriteAllText(SaveFileDialog1.FileName,
TextBox1.Text, False)
TextBox1.Clear()
End If
Else

'If textbox's text is still the same, notepad will show the OpenFileDialog
OpenFileDialog1.ShowDialog()
Try
TextBox1.Text =
My.Computer.FileSystem.ReadAllText(OpenFileDialog1.FileName)
Catch ex As Exception
End Try
End If
End Sub

SAVE:

Private Sub SaveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles SaveToolStripMenuItem.Click
SaveFileDialog1.ShowDialog()
If My.Computer.FileSystem.FileExists(SaveFileDialog1.FileName)
Then
Try

My.Computer.FileSystem.WriteAllText(SaveFileDialog1.FileName,
TextBox1.Text, False)
Catch ex As Exception
End Try
End If
End Sub

EXIT:
Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ExitToolStripMenuItem.Click
'exit the program
End
End Sub
Undo" menu code

Private Sub UndoToolStripMenuItem_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles UndoToolStripMenuItem.Click
If TextBox1.CanUndo Then
TextBox1.Undo()
Else
End If
Endsub

CUT:

Private Sub CutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles CutToolStripMenuItem.Click
My.Computer.Clipboard.Clear()
If TextBox1.SelectionLength > 0 Then
My.Computer.Clipboard.SetText(TextBox1.SelectedText)
End If
TextBox1.SelectedText = ""
End Sub

CUPY:

Private Sub CopyToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles CopyToolStripMenuItem.Click
My.Computer.Clipboard.Clear()
If TextBox1.SelectionLength > 0 Then
My.Computer.Clipboard.SetText(TextBox1.SelectedText)

End If
End Sub

PASTE:

Private Sub PasteToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles PasteToolStripMenuItem.Click
If My.Computer.Clipboard.ContainsText Then
TextBox1.Paste()
End If
End Sub
SELECT ALL:

Private Sub SelectAllToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles SelectAllToolStripMenuItem.Click
End Sub

FORMAT:

Private Sub FontToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles FontToolStripMenuItem.Click
FontDialog1.ShowDialog()
TextBox1.Font = FontDialog1.Font
End Sub

FORMAT FONT COLOR:

Private Sub FontColorToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles FontColorToolStripMenuItem.Click
ColorDialog1.ShowDialog()
TextBox1.ForeColor = ColorDialog1.Color
End Sub
OUTPUT:
RESULT:

Thus the above program is verified.


EX NO: 3

DATE: 09.01.2018 3.CALCULATOR

AIM:

To create an arithmetic calculator to manipulate some operations.

ALGORITHM:
Step1: Start -All program-MS visual studio2008-visual studio.

Step2:Create one textbox to produce a calclutation.

Step3: Create a 12 button control for numeric numbers and basic add,
subtraction, multiplication, division on the form.

Step4:double click the button control to create a coding for calculation.

Step5: Stop the process.


PROGRAM :

Public Class Form1

Dim firstValue As Decimal

Dim secondValue As Decimal

Dim answer As Decimal

Dim operations As String

Private Sub btn1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btn1.Click

TextBox1.Text = TextBox1.Text + btn1.Text


End Sub
Private Sub btn2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btn2.Click

TextBox1.Text = TextBox1.Text + btn2.Text

End Sub

Private Sub btnPlus_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnPlus.Click

firstValue = lblBig.Text

operations = "+"

TextBox1.Text = ""
End Sub
Private Sub BtnEqual_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnEqual.Click
secondValue = textbox1.Text
If operations = "+"
Then
TextBox1.Text = firstValue + secondValue
ElseIf operations ="-" Then
TextBox1.Text =firstValue – secondValue
ElseIf operations ="/" Then
TextBox1.Text =firstValue / secondValue
ElseIf operations ="*" Then
TextBox1.Text =firstValue * secondValue
End If
End Sub
Private Sub Btnclear_Click_1(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
lblBig.Text = "0"
TextBox1.Text = ""
End Sub
Private Sub btnDecimalPoint_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnDecimalPoint.Click
If Not (lblBig.Text.Contains(".")) Then
lblBig.Text += "."
End If
TextBox1.Text = TextBox1.Text + btnDecimalPoint.Text
End Sub
OUTPUT:
RESULT:

Thus the above program is verified.


EX.NO: 4

DATE: 22.01.2018 4.EMPLOYEE PAY SLIP

AIM:

To create a employee pay slip for basic HRA,DA,GROSS PAY using vb.net

ALGORITHM:
Step1: Start -All program-MS visual studio2008-Visual studio.

Step2: Create two group box for employee personal detail and employee details.

Step3: Create a lable box and textbox for required fields, like HRA,DA,PF,GROSS PAY

Step4: Create a Radio button for employee gender.

Step5: Set 1 Ok button control for display the details.Click the ok event to make a

coding Step6: Display the Employee details.


PROGRAM :

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click
HRA.Text = Val(salary.Text) * 10 / 100
ESI.Text = Val(salary.Text) * 5 / 100
DA.Text = Val(salary.Text) * 7 / 100
TA.Text = Val(salary.Text) * 4 / 100
PF.Text = Val(salary.Text) * 1 / 100

End sub
OUTPUT:

RESULT:
Thus the above program is verified.
EX.NO: 5

DATE: 29.01.2018 5. STUDENT MARK LIST

AIM:

To Create a student mark list with 5 subject mark using Vb.net

ALGORITHM:
Step1:Start-all program-MS visual studio2008-visual studio.

Step2:Ctreate a lable box for Student name,mark1 to mark 5 and Grade,result on the form

Step3:Create two button control for OK an CLEAR.

Step4:Double click on the OK control button to make a coding for AVG,RESULT,and

GRADE Step5:Stop the process.


PROGRAM :

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click
TOTAL.Text = Val(M1.Text) + Val(M2.Text) + Val(M3.Text) + Val(M4.Text) +
Val(M5.Text)
AVG.Text = Val(TOTAL.Text) / 5
If (Val(M1.Text) >= 40 And Val(M2.Text) >= 40 And Val(M3.Text) >= 40 And
Val(M4.Text) >= 40 And Val(M5.Text) >= 40) Then
RSLT.Text = "PASS"
Else
RSLT.Text = "FAIL"
End If
If (Val(AVG.Text) >= 90) Then
GRD.Text = "A+"
ElseIf (Val(AVG.Text) >= 70) Then
GRD.Text = "A"
ElseIf (Val(AVG.Text) >= 60) Then
GRD.Text = "B"
ElseIf (Val(AVG.Text) >= 40) Then
GRD.Text = "C"
Else
GRD.Text = "no grade"

End If
End Sub
OUTPUT:

RESULT:

Thus the above program is verified.


EX.NO: 6

DATE: 07.02.2018 6.ADDING DATA INTO TEXT FILE

AIM:

To create a data file and save it as a text file format using vb.net

ALGORITHM:
Step1: Start-all program-MS visual studio2008-visual studio

Step2:Make 2 textfile one for content of the file and another for file name.

Step3:In button click event we initialize a variable for stream writer.

Step4:Using stream writer open a text file writer and the file name as text box 1content.

Step5:write the content on textbox 1 to the given the file.

Step6:Stop the process.


PROGRAM :

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click

Dim file As System.IO.StreamWriter

file = My.Computer.FileSystem.OpenTextFileWriter("d:\" &


TextBox1.Text, True)

file.WriteLine(TextBox2.Text)

file.Close()

End Sub
OUTPUT:

RESULT:

Thus the above program is verified.


EX.NO: 7
DATE: 15.02.2018 7.COLLEGE WEBSITE

AIM:

To create a Web Application program using ASP.net for College Website.

ALGORITHM:

Step1: Start -All program-MS visual studio2008-visual studio2008

Step2: In File menu-New- Web Site

Step3: Under Visual Studio template-Choose Asp.Net Web Site-Choose File


System-Set the path - Choose the language from the Language as
Visual C#

Step4: Click OK button

Step5: Click on Design tab and drag controls for College Website, it
Contains about College and courses.

Step6: Create aboutus.aspx and courses.aspx files

Step7: Add javascript for validation.

Step8: For run the application,Right click the mouse and select “Run in Web browser “ option.

Step9:Stop the process.


PROGRAM :

HomePage.aspx

<%@ Page Language="C#" MasterPageFile="~/MyMaster.master" AutoEventWireup="true"


CodeFile="HomePage.aspx.cs" Inherits="HomePage" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table style="width: 100%; " cellpadding="0" cellspacing="0">
<tr>
<td>
<i><b>user name</b><asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server" ControlToValidate="TextBox1"
ErrorMessage="RequiredFieldValidator"
SetFocusOnError="True">*</asp:RequiredFieldValidator>
</i></td>
<td style="width: 209px">
<asp:TextBox ID="TextBox1" runat="server" Height="16px"></asp:TextBox>
</td>
<td rowspan="3">
<asp:DataList ID="DataList1" runat="server" BackColor="#DEBA84"
BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellPadding="3"
CellSpacing="2" DataSourceID="SqlDataSource1" GridLines="Both"
Width="100%">
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<ItemStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
<SelectedItemStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
<ItemTemplate>
Description:
<asp:Label ID="DescriptionLabel" runat="server"
Text='<%# Eval("Description") %>' />
</ItemTemplate>
</asp:DataList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [Description] FROM [Notice]"></asp:SqlDataSource>
</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td>
<i><b>password</b><asp:RequiredFieldValidator ID="RequiredFieldValidator2"
runat="server" ControlToValidate="TextBox2"
ErrorMessage="RequiredFieldValidator"
SetFocusOnError="True">*</asp:RequiredFieldValidator>
</i></td>
<td style="width: 209px">
<asp:TextBox ID="TextBox2" runat="server" Height="16px"
TextMode="Password"></asp:TextBox>
</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td>
&nbsp;</td>
<td style="width: 209px">
<asp:Button ID="Button1" runat="server" Font-Bold="True"
onclick="Button1_Click" Text="login" />
</td>
<td>
&nbsp;</td>
</tr>
</table>
</asp:Content>
OUTPUT:

RESULT:

Thus the above program is verified.


EX .NO: 8
8. ONLINE EXAMINATION SYSTEM
DATE: 27.02.2018

AIM:

To create a Web Application program using ASP.net for Online Examination System

ALGORITHM:

Step1: Start -All program-MS visual studio2008-visual studio2008

Step2: In File menu-New- Web Site

Step3: Under Visual Studio template-Choose Asp.Net Web Site-Choose File


System-Set the path - Choose the language from the Language as
Visual C#

Step4: Click OK button

Step5: Click on Design tab and drag controls for Online Examination System , it
Contains Student Register no. Name, and questions.

Step6: Create Welcome.aspx and Result.aspx files

Step7: For run the application,Right click the mouse and select “Run in Web browser “ option.

Step7: Stop the process.


PROGRAM :

Result.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/QuizMaster.Master"


AutoEventWireup="true" CodeBehind="Result.aspx.cs" Inherits="Quiz.Result"
%> <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
runat="server"> <div class="header">
<p>Welcome <span id="name">Guest</span></p>
</div>
<div class="question_block" id="congratulations" visible="false" runat="server">
<div class="congrats_block">
<div class="left_border">
</div>

<div class="middle_border">
<div class="hori_border"></div>
<div class="congratulations">
&nbsp;
</div>
<div class="text_block">
<div class="text">
<p class="con_text">This is to certify that</p>
<p class="name"></p>
<p class="con_text">has succesfullyanwered the quiz.</p>
</div>
</div>

</div>

<div class="right_border">
</div>

<div class="clear"></div>
<div class="hori_border_bottom"></div>
</div>

</div>

<div class="question_block" visible="false" id="fail" runat="server">


<div class="congrats_block">
<div class="left_border">
</div>

<div class="middle_border">
<div class="hori_border"></div>
<div class="fail">
&nbsp;
</div>
<div class="text_block">
<div class="text">
<p class="con_text">This is to certify that</p>
<p class="name">AbhinandanPatra</p>
<p class="con_text">has succesfullyanwered the quiz.</p>
</div>
</div>

</div>

<div class="right_border">
</div>

<div class="clear"></div>
<div class="hori_border_bottom"></div>
</div>

</div>
</asp:Content>

Quizmaster.master

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


CodeBehind="QuizMaster.master.cs" Inherits="Quiz.QuizMaster" %>

<!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>
<link href="~/Styles/style.css" rel="stylesheet" type="text/css" />
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
<style type="text/css">
.auto-style1 {
text-align: center;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
<div id="container">
<div id="body">
<div class="home_pageContainer">
<div class="page_container">

online examination</div>
</div>
</div>
</div>

</asp:ContentPlaceHolder>
</div>
<div class="auto-style1">
start your quiz</div>
</form>
</body>
</html>

Welcome.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/QuizMaster.Master"


AutoEventWireup="true" CodeBehind="Welcome.aspx.cs" Inherits="Quiz.Welcome" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
runat="server"> <div class="header">
<p>Welcome to <span id="quizName">Online</span><span id="Quiztitle"
runat="server"></span> Quiz</p>
</div>
<div class="welcome_text">
<p>Welcome <span id="welcomequiz" runat="server"></span></p>
</div>
<div class="instruction">
<div class="info_div">Information</div>
<div class="border">

<div class="left_div" >


<p class="red">Description</p>

<p id="txtdesc" runat="server"></p>

</div>
<div class="right_div">
<p>Note</p>
<ul>
<li>Click the 'Submit Test' button given in the bottom of this page to Submit your
answers.</li>
<li>Don't refresh the page.</li>
</ul>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
<div class="button">
<div class="test">

<asp:Button ID="btnStartQuiz" CssClass="take_test" runat="server"


onclick="btnStartQuiz_Click" />
</div>
</div>
</div>
</asp:Content>
OUTPUT:

RESULT:

Thus the above program is verified.


EX.NO: 9

DATE: 07.03.2018 9.ONLINE MOBILE SHOP

AIM:

To create a web application of online mobile shop using ASP.net

ALGORITHM:

Step1: Start -All program-MS visual studio2008-visual studio2008

Step2: In File menu-New- Web Site

Step3: Under Visual Studio template-Choose Asp.Net Web Site-Choose File


System-Set the path - Choose the language from the Language as
Visual C#

Step4: Click OK button

Step5: Click on Design tab and drag controls for Online mobile shop , it
contains Customer details and mobile details.

Step6: Create Login.aspx and Product.aspx files

Step7: Add javascript for validation.

Step8: For run the application,Right click the mouse and select “Run in Web browser “
option.

Step9: Stop the process.


PROGRAM :

Login.aspx

using System;

usingSystem.Collections.Generic;

usingSystem.Linq;

usingSystem.Web;

usingSystem.Web.UI;

usingSystem.Web.UI.WebControls;

public partial class Login : System.Web.UI.Page

DS_USER.USER_SELECTDataTable UDT = new DS_USER.USER_SELECTDataTable();

DS_USERTableAdapters.USER_SELECTTableAdapterUAdapter =
new DS_USERTableAdapters.USER_SELECTTableAdapter();

protected void Page_Load(object sender, EventArgs e)

protected void btnlogin_Click(object sender, EventArgs e)

UDT = UAdapter.Seleect_FOR_LOGIN(txtuname.Text,

txtpass.Text); if (UDT.Rows.Count> 0)

Session["uname"] = txtuname.Text;

Session["fname"] = UDT.Rows[0]["name"].ToString();
Session["lname"] = UDT.Rows[0]["surname"].ToString();

Response.Redirect("User/Default.aspx");

else

lblerror.Text = "Error !!!";

Product.aspx

using System;

usingSystem.Collections.Generic;

usingSystem.Linq;

usingSystem.Web;

usingSystem.Web.UI;

usingSystem.Web.UI.WebControls;

public partial class PRODUCT : System.Web.UI.Page

DS_CAT.CATEMST_SELECTDataTable CDT =
new DS_CAT.CATEMST_SELECTDataTable();

DS_CATTableAdapters.CATEMST_SELECTTableAdapterCAdapter =
new DS_CATTableAdapters.CATEMST_SELECTTableAdapter();

DS_AITEM.ITEM_SELECTDataTable IDT = new DS_AITEM.ITEM_SELECTDataTable();


DS_AITEMTableAdapters.ITEM_SELECTTableAdapterIAdapter = new
DS_AITEMTableAdapters.ITEM_SELECTTableAdapter();

protected void Page_Load(object sender, EventArgs e)

if (Page.IsPostBack == false)

IDT = IAdapter.SeleectTOP7();

DataList1.DataSource = IDT;

DataList1.DataBind();

protected void DataList1_ItemCommand(object source, DataListCommandEventArgs e)

protected void DataList1_ItemCommand1(object source, DataListCommandEventArgs e)

Response.Redirect("View.aspx?idd=" + e.CommandArgument.ToString());

User.master

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


CodeFile="User.master.cs" Inherits="User" %>

<!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>

<link href="meera.css" rel="stylesheet" type="text/css"


/> <link href="meera.css" rel="stylesheet"
type="text/css" />
<link rel="stylesheet" type="text/css" href="engine1/style.css" media="screen"
/> <style type="text/css">a#vlb{display:none}</style>
<script type="text/javascript"
src="engine1/jquery.js"></script> <style type="text/css">
.style2
{
width: 991px;
}
.style3
{
width: 378px;
}
.style4
{
width: 533px;
}
</style>
<asp:ContentPlaceHolder id="head"
runat="server"> </asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<div id="top">

</div><div id="menuu">
<asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" Width="100%"
onmenuitemclick="Menu1_MenuItemClick">
<DynamicMenuItemStyleCssClass="dmenu" /> <Items>

<asp:MenuItem Text="HOME" Value="HOME"


NavigateUrl="~/Default.aspx"></asp:MenuItem>
<asp:MenuItem Text="LOGIN" Value="PRODUCT"
NavigateUrl="~/Login.aspx"></asp:MenuItem>
<asp:MenuItem Text="REGISTER" Value="LOGIN"
NavigateUrl="~/Registration.aspx"></asp:MenuItem>
<asp:MenuItem Text="FEEDBACK" Value="FEEDBACK"
NavigateUrl="~/Feedback.aspx"></asp:MenuItem>
<asp:MenuItem Text="CONTACTUS" Value="CONTACTUS"
NavigateUrl="~/Contact us.aspx"></asp:MenuItem>
</Items>
<StaticMenuItemStyleCssClass="smenu" />
</asp:Menu>
</div><%--<div id="menu">

<table class="style2">
<tr>
<td>
<asp:Button ID="Button3" runat="server" Text="HOME" CssClass="btnmenu"
CausesValidation="False" PostBackUrl="~/Home.aspx" /> </td>
<td>
<asp:Button ID="Button4" runat="server" Text="SIGN UP"
CssClass="btnmenu" CausesValidation="False"
PostBackUrl="~/Registration.aspx" /> </td>
<td>
<asp:Button ID="Button5" runat="server" Text="LOGIN" CssClass="btnmenu"
CausesValidation="False" PostBackUrl="~/Login.aspx" /> </td>
<td>
<asp:Button ID="Button6" runat="server" Text="PRODUCT" CssClass="btnmenu"
CausesValidation="False" PostBackUrl="~/PRODUCT.aspx" /> </td>

<td>
<asp:Button ID="Button7" runat="server" Text="FEEDBACK"
CssClass="btnmenu" CausesValidation="False" PostBackUrl="~/Feedback.aspx" />
</td>
<td>
<asp:Button ID="Button8" runat="server" Text="CONTACT US"
CssClass="btnmenu" CausesValidation="False" PostBackUrl="~/Contact us.aspx" />
</td>
</tr>
</table>
</div>--%>

<div id="second1">

<%-- <div id="slide1">


<table class="tbl">
<tr>
<td class="tblhead">
Member Login</td>
</tr>
<tr>
<td>
&nbsp;</td>
</tr>
<tr>
<td>
<table class="style1">
<tr>
<td class="lbl">
UserName :</td>
<td>
<asp:TextBox ID="txtuname" runat="server" CssClass="txt"></asp:TextBox>
</td>
</tr>
<tr>
<td class="lbl">
Password :</td>
<td>
<asp:TextBox ID="txtupass" runat="server" CssClass="txt"></asp:TextBox>
</td>
</tr>
<tr>
<td>
&nbsp;</td>
<td>
<asp:Button ID="btnlogin" runat="server" CssClass="btn" Text="Login"
onclick="btnlogin_Click1" />
</td>
</tr>
<tr>
<td>
&nbsp;</td>
<td>
<asp:LinkButton ID="LinkButton1" runat="server">New User ?</asp:LinkButton>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<asp:Label ID="lbll" runat="server"></asp:Label>
</td>
</tr>
</table>
<br />
<table class="tbl">
<tr>
<td class="tblhead">
SEARCH PRODUCT :</td>
</tr>
<tr>
<td>

<table class="style1">
<tr>
<td>
<asp:TextBox ID="txtsearch" runat="server" CssClass="txt"
Width="180px"></asp:TextBox></td>
<td>
<asp:Button ID="btnsearc" runat="server" CssClass="btn" Text="Search"
onclick="btnsearc_Click" Width="80px" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
&nbsp;</td>
</tr>
</table>
</div>--%><div id="slide3">
<asp:ContentPlaceHolder id="ContentPlaceHolder1"
runat="server"></asp:ContentPlaceHolder></div>

<%--<div id="wowslider-container1">
<div class="ws_images">
<a href="#"><imgsrc="data1/images/12.jpg" alt="" title="" id="wows0"/></a>
<a href="#"><imgsrc="data1/images/6.jpg" alt="" title="" id="wows1"/></a>
<a href="#"><imgsrc="data1/images/5.jpg" alt="" title="" id="wows2"/></a>
<a href="#"><imgsrc="data1/images/13.jpg" alt="" title="" id="wows3"/></a>
<a href="#"><imgsrc="data1/images/7.jpg" alt="" title="" id="wows4"/></a>
<a href="#"><imgsrc="data1/images/9.jpg" alt="" title="" id="wows5"/></a>
</div>
<div class="ws_bullets"><div>
<a href="#wows0" title=""><imgsrc="data1/tooltips/12.jpg" alt=""/>1</a>
<a href="#wows1" title=""><imgsrc="data1/tooltips/6.jpg" alt=""/>2</a>
<a href="#wows2" title=""><imgsrc="data1/tooltips/5.jpg" alt=""/>3</a>
<a href="#wows3" title=""><imgsrc="data1/tooltips/13.jpg" alt=""/>4</a>
<a href="#wows4" title=""><imgsrc="data1/tooltips/7.jpg" alt=""/>5</a>
<a href="#wows5" title=""><imgsrc="data1/tooltips/9.jpg" alt=""/>6</a>
</div></div>
</div>
<script type="text/javascript" src="engine1/script.js"></script>--%></div>
<%-- <div id="login">
<table class="style2">
<tr>
<td width="45%">
<table class="style3">
<tr>
<td>
SEARCH HERE :</td>
<td>
<asp:TextBox ID="txtsearch" runat="server" CssClass="txt"
Width="180px"></asp:TextBox></td>
<td>
<asp:Button ID="Button2" runat="server" Text="Search" onclick="Button2_Click"
Width="78px" CssClass="btn" CausesValidation="False"
/></td>
</tr>
</table>
</td>
<td>
<table class="style4">
<tr>
<td style="text-align: right">
UserName :</td>
<td>
<asp:TextBox ID="txtuname" runat="server"
CssClass="txt"></asp:TextBox></td> <td style="text-align: right">
Password :</td>
<td>
<asp:TextBox ID="txtupass" runat="server" CssClass="txt"
TextMode="Password"></asp:TextBox></td>
<td>
<asp:Button ID="btnlogin" runat="server" CssClass="btn" Text="Login"
onclick="btnlogin_Click" CausesValidation="False" />
<asp:Label ID="lbll" runat="server" ForeColor="Red"></asp:Label>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>--%>

<%-- <div id="main">


<div id="item">
<asp:DataList ID="DataList1" runat="server" RepeatColumns="5"
RepeatDirection="Horizontal" onitemcommand="DataList1_ItemCommand1">
<ItemTemplate>
<table style="border: thin solid #369"
width="199"> <tr>
<td height="30"
style="color: #369; font-weight: bold; border-bottom-style: solid; border-bottom-width: thin;
border-bottom-color: #369;">
<asp:Label ID="lblname" runat="server" Text='<%#Eval("iname") %>'></asp:Label>
</td>
</tr>
<tr>
<td>
&nbsp;</td>
</tr>
<tr>
<td style="text-align: center">
<asp:Image ID="Image4" runat="server" Height="135px"
ImageUrl='<%#Eval("image") %>' style="text-align: center"
Width="90px" />
</td>
</tr>
<tr>
<td style="border-top-style: solid; border-top-width: thin; border-top-color:
#339966"> <asp:Button ID="Button9" runat="server"
CommandArgument='<%#Eval("iid") %>' CssClass="btnmenu" Height="30px"
Text="Buy Now !" Width="193px" /> </td>
</tr>
</table>
</ItemTemplate>
</asp:DataList>
</div>
</div>--%>
<div id="foot">All Rights Reserved @online Mobile Shop</div>

</form>
</body>
</html>
Product.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/User.master*"


AutoEventWireup="true" CodeFile="PRODUCT.aspx.cs" Inherits="PRODUCT" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">


<style type="text/css">

.style6
{
width: 122px;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table class="tbl">
<tr>
<td class="tblhead">
PRODUCT</td>
</tr>
<tr>
<td>
&nbsp;</td>
</tr>
<tr>
<td>
<asp:DataList ID="DataList1" runat="server" RepeatColumns="4"
RepeatDirection="Horizontal" onitemcommand="DataList1_ItemCommand1">
<ItemTemplate>
<table style="border: thin solid #339966" width="180">
<tr>
<td class="tblhead">
<asp:Label ID="lblname" runat="server" Text='<%#Eval("iname") %>'></asp:Label>
</td>
</tr>
<tr>
<td>
&nbsp;</td>
</tr>
<tr>
<td style="text-align: center">
<asp:Image ID="Image4" runat="server" Height="135px" ImageUrl='<%#Eval("image") %>'
style="text-align: center"
Width="112px" />
</td>
</tr>
<tr>
<td style="border-top-style: solid; border-top-width: thin; border-top-color: #339966">
<table width="100%">
<tr>
<td class="style6">
Price :
<asp:Label ID="lblprice" runat="server" Text='<%#Eval("price") %>'></asp:Label>
</td>
<td>
<asp:Button ID="Button9" runat="server" CssClass="btnmenu"
CommandArgument='<%#Eval("iid") %>' Height="25px"
Text="View" Width="70px" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</ItemTemplate>
</asp:DataList>
</td>
</tr>
</table>
</asp:Content>
OUTPUT:

RESULT:

Thus the above program is verified.


EX.NO: 10

DATE: 22.03.2018 10.ONLINE REGISTRATION FORM

AIM:
To create an web application for Online Registration Form using ASP.net

ALGORITHM:

Step1: Start -All program-MS visual studio2008-visual studio2008

Step2: In File menu-New- Web Site

Step3: Under Visual Studio template-Choose Asp.Net Web Site-Choose File


System-Set the path - Choose the language from the Language as
Visual C#

Step4: Click OK button

Step5: Click on Design tab and drag controls for Online Registration Form , it
contains First Name,Last Name,Address,Phone number.

Step6: Add javascript for validation.

Step7: For run the application,Right click the mouse and select “Run in Web browser”
option.

Step7: Stop the process.


Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" %>

<!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>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<div>
<strong><span style="font-size: 14pt; color: #0000ff">Simple Application Form In
ASP.Net</span></strong><br />
<br />
<br />
<br />
<table>
<tr>
<td style="width: 123px">
First Name</td>
<td style="width: 63px">
:</td>
<td style="width: 193px">
<asp:TextBox ID="fname" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 123px">
Last Name</td>
<td style="width: 63px">
:</td>
<td style="width: 193px">
<asp:TextBox ID="lname" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 123px">
Date of Birth</td>
<td style="width: 63px">
:</td>
<td style="width: 193px">
<asp:TextBox ID="dob" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 123px">
Gender</td>
<td style="width: 63px">
:</td>
<td style="width: 193px">
<asp:TextBox ID="gender" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 123px">
Father's Name</td>
<td style="width: 63px">
:</td>
<td style="width: 193px">
<asp:TextBox ID="fathername" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 123px">
Contact Number</td>
<td style="width: 63px">
:</td>
<td style="width: 193px">
<asp:TextBox ID="contact" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 123px">
Address</td>
<td style="width: 63px">
:</td>
<td style="width: 193px">
<asp:TextBox ID="address" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 123px; height: 21px">
married status</td>
<td style="width: 63px; height: 21px">
:</td>
<td style="width: 193px; height: 21px">
<asp:RadioButton ID="male" runat="server" />
<asp:RadioButton ID="female" runat="server" /></td>
</tr>
<tr>
<td style="width: 123px; height: 62px;">
Known Language</td>
<td style="width: 63px; text-align: center; height: 62px;">
:</td>
<td style="width: 193px; height: 62px;">
<asp:TextBox ID="TextBox1" runat="server" Height="46px" Rows="3"
Width="180px"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 123px; height: 62px">
</td>
<td style="width: 63px; height: 62px; text-align: center">
</td>
<td style="width: 193px; height: 62px">
<asp:Button ID="submit" runat="server" Text="Submit"
OnClick="submit_Click" /></td>
</tr>
</table>
<br />
</div>
<br />
<br />

<br />

</div>

</form>
</body>
</html>

Default.aspx.cs

using System;
using System.Data;
using System.Configuration;
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 _Default : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void submit_Click(object sender, EventArgs e)
{
//Here is the command inside the click event of button
if (fname.Text == "")
{
Response.Write("Please fill the firstname.");
}
else if(lname.Text=="")
{
Response.Write("Please fill the lastname.");
}
else
Response.Write("Form submit successfully.");

}
}
OUTPUT:

RESULT:

Thus the above program is verified.

You might also like