ae 219
8
[ PRACTICAL ~3 }
practical - S(a) : Create a sii
demonstrate setting and use of their properties, (Example: AutoPostBack )
1. On click of 3 button control display the selected items from the list in
textbox. Also in the s, 0 F i
from the DropDownList! in Peet display. the name of the selected item
i in a label. Also change the font size of the same
label according to the font size Spm eae
selected fro1
fot control for photo, rom the dropdownlist2.
3, Check Boxes provides special format
4. Use of AutoPostBack property,
cntriUse.aspx
ple web page with various server controls to
‘ting and Radio Buttons provides colour.
ary
VizwState Dates]
| [estas |
Select Colo: C Red © Greea C Bloe
‘SclectSpecial Formatting : [Bold [7 Italic [7 Undestine
Select Size :[TOST
‘Select Name :[Yashashroe =]
entriUse.aspx.cs
public partial class _Default : System.Web.UI.Page
¢
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack)
{
string str = "Vedshree Sambare";
if (ViewState|"name"] == null)
{
ViewState["name"] = str;
}
}
Protected void btn_Click(object sender, EventArgs e)
{
IblStr.Text = ViewState["name"].ToString( );wLT,,
lopment (T-¥-BSe— £6) (Sem. _
ced Web Develo?”
Advar
220 ree
tArgs €)
} ick(object sender, Even!
protected void Button 1_Click(obj
(
TextBox1.Text = i+)
ts
for (int i = 0; i < ListBox1.Items.Coun!
‘ a
if (ListBox1.Items[i].Selected == true)
{
‘TextBox1.Text = TextBox1.Text +
}
Protected void
EventArgs e)
{
» 4 ListBox! -Items[i].Text + "\;
DropDownList]. SelectedIndexChanged(object sender,
Labell.Text = DropDownList 1.SelectedItem.Text;
}
Protected void DropDownList2_SelectedIndexChanged (object sender,
EventArgs e)
{
}
Protected void RadioButton 1_CheckedChan;
{
Labell.Font Size = int.Parse(DropDownList2.Selectedltem. Text);
iged(object sender, EventArgs e)
Labell.BackColor = System.Drawing.Color.Red;
}
{
Protected void RadioButton2_CheckedChanged{object sender, EventArgs e)
Labell.BackColor = System.Drawing.Color.Green;
}
Protected void RadioButton3
'-CheckedChanged(object sender, EventArgs e)
{
Labell.BackColor =
Labell Font.Italic = true;
}
Protected void CheckB,
System.Drawing.Color Blue;
'0x3_CheckedC} i
ecked hanged(object Sender, EventArgs e)t+
poets ree 221
abell.Font.Underline = true;
V0 mesccstniowoss + ES
€ > © [D tocamoseees2/enttUseaspe
Hi Appr @ tet hymoad hin) Tenda NN Wien
‘ViewState Data:Vedshree Sembare
Seve
Select Color: @Red Green © Blue
Formatting : @Bold @ Italic @ Underline
Select Size
Select Name
Practical - 3{b) : Create a simple application to demonstrate your vacation
using calendar control.
calndrCtrLaspx
‘acation Planner
‘San Mon Tue Wed Thu
30 1 2 3 4
7 8 9 10 1 12
14 15 16 17 18 19
21 22 23 24 25 26 27
28 29 30 31 2
6 9
45
iVacation Details:
|prabetResutt]
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs"
Inherits="Default2" %>
Advanced Web Development (T.¥.B.Se. ~ 1.7.) (5,
222 ror
«head runat="server">
Codestin Search App
i