Font Application
Font Application
Font Application
NO: 1
1. FONT APPLICATION
DATE: 21.12.17
AIM:
ALGORITHM:
Step1: Start -All program-MS visual studio2008-visual studio.
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'
Step6: Double-click the Change Color button and modify the code of the Click
event.
TextBox1.ForeColor = FontDialog1.Color
TextBox1.Font = FontDialog1.Font
End If
OUTPUT:
RESULT:
AIM:
ALGORITHM:
Step1:Start -All program-MS visual studio2008-visual studio.
Step3: create one menu strips for make a note pad properties, like file,new,cut ,copy
menus
Step5: create a Font dialog control to change color and font style.
NEW:
TextBox1.Clear()
SaveFileDialog1.ShowDialog()
My.Computer.FileSystem.WriteAllText(SaveFileDialog1.FileName,
TextBox1.Text, False)
TextBox1.Clear()
End If
Else
TextBox1.Clear()
End If
End Sub
OPEN:
'If the text of notepad changed, the program will ask the user if they want to save
the changes
Dim ask As MsgBoxResult
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:
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
CUT:
CUPY:
End If
End Sub
PASTE:
FORMAT:
AIM:
ALGORITHM:
Step1: Start -All program-MS visual studio2008-visual studio.
Step3: Create a 12 button control for numeric numbers and basic add,
subtraction, multiplication, division on the form.
End Sub
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:
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
Step5: Set 1 Ok button control for display the details.Click the ok event to make a
End sub
OUTPUT:
RESULT:
Thus the above program is verified.
EX.NO: 5
AIM:
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
End If
End Sub
OUTPUT:
RESULT:
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.
Step4:Using stream writer open a text file writer and the file name as text box 1content.
file.WriteLine(TextBox2.Text)
file.Close()
End Sub
OUTPUT:
RESULT:
AIM:
ALGORITHM:
Step5: Click on Design tab and drag controls for College Website, it
Contains about College and courses.
Step8: For run the application,Right click the mouse and select “Run in Web browser “ option.
HomePage.aspx
RESULT:
AIM:
To create a Web Application program using ASP.net for Online Examination System
ALGORITHM:
Step5: Click on Design tab and drag controls for Online Examination System , it
Contains Student Register no. Name, and questions.
Step7: For run the application,Right click the mouse and select “Run in Web browser “ option.
Result.aspx
<div class="middle_border">
<div class="hori_border"></div>
<div class="congratulations">
</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="middle_border">
<div class="hori_border"></div>
<div class="fail">
</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
<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
</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">
RESULT:
AIM:
ALGORITHM:
Step5: Click on Design tab and drag controls for Online mobile shop , it
contains Customer details and mobile details.
Step8: For run the application,Right click the mouse and select “Run in Web browser “
option.
Login.aspx
using System;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Web;
usingSystem.Web.UI;
usingSystem.Web.UI.WebControls;
DS_USERTableAdapters.USER_SELECTTableAdapterUAdapter =
new DS_USERTableAdapters.USER_SELECTTableAdapter();
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
Product.aspx
using System;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Web;
usingSystem.Web.UI;
usingSystem.Web.UI.WebControls;
DS_CAT.CATEMST_SELECTDataTable CDT =
new DS_CAT.CATEMST_SELECTDataTable();
DS_CATTableAdapters.CATEMST_SELECTTableAdapterCAdapter =
new DS_CATTableAdapters.CATEMST_SELECTTableAdapter();
if (Page.IsPostBack == false)
IDT = IAdapter.SeleectTOP7();
DataList1.DataSource = IDT;
DataList1.DataBind();
Response.Redirect("View.aspx?idd=" + e.CommandArgument.ToString());
User.master
<html
xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</div><div id="menuu">
<asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" Width="100%"
onmenuitemclick="Menu1_MenuItemClick">
<DynamicMenuItemStyleCssClass="dmenu" /> <Items>
<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">
<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>
</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>--%>
</form>
</body>
</html>
Product.aspx
.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>
</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>
</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:
AIM:
To create an web application for Online Registration Form using ASP.net
ALGORITHM:
Step5: Click on Design tab and drag controls for Online Registration Form , it
contains First Name,Last Name,Address,Phone number.
Step7: For run the application,Right click the mouse and select “Run in Web browser”
option.
<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;
}
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: