0% found this document useful (0 votes)
18 views5 pages

AWP Practical#3 Worksheet

this is practical of student

Uploaded by

ecd03335
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)
18 views5 pages

AWP Practical#3 Worksheet

this is practical of student

Uploaded by

ecd03335
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/ 5

Advanced Web Programming

Practical #3
Name Ganesh Sahu Roll Number 22302A0045
Subject/Course: Advanced Web Development Technologies
Topic Working with web form controls

1. Write the program for the following:

a) Create a simple web page with various server controls to demonstrate setting and use of their properties.
(Example : AutoPostBack)
Source Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace prac2
{
public partial class myform1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

protected void ListBox1_SelectedIndexChanged(object sender, EventArgs e)


{

protected void id1_TextChanged(object sender, EventArgs e)


{

protected void CheckBox1_CheckedChanged(object sender, EventArgs e)


{

protected void RadioButton3_CheckedChanged(object sender, EventArgs e)


{

}
Vidyalankar School of Information Technology
protected void LstBg_SelectedIndexChanged(object sender, EventArgs e)
{

protected void Lb1Msg_Click(object sender, EventArgs e)


{
//for bold,italic,underline
if (ChkBold.Checked == true)
Lb1Msg.Font.Bold = true;
else
Lb1Msg.Font.Bold = false;

if (ChkItalic.Checked == true)
Lb1Msg.Font.Italic = true;
else
Lb1Msg.Font.Italic = false;

if (ChkUnderline.Checked == true)
Lb1Msg.Font.Underline = true;
else
Lb1Msg.Font.Underline = false;

//update font color


if (RdbRed.Checked == true)
Lb1Msg.ForeColor = System.Drawing.Color.Red;
else if(RdbGreen.Checked == true)
Lb1Msg.ForeColor = System.Drawing.Color.Green;
else if (RdbBlue.Checked == true)
Lb1Msg.ForeColor = System.Drawing.Color.Blue;

//update font
Lb1Msg.Font.Name = LstFont.SelectedItem.Text;

//update font size


if(Int32.Parse(TxtFontSize.Text)>0)
{
Lb1Msg.Font.Size = FontUnit.Point(Int32.Parse(TxtFontSize.Text));
}

//update back color


Lb1Msg.BackColor = System.Drawing.Color.FromName(LstBg.SelectedItem.Text);

//display image
if(ChkPic.Checked)
{
Image1.Visible = true;
}
Vidyalankar School of Information Technology
else
{
Image1.Visible = false;
}

Lb1Msg.Text=TxtName.Text+ " "+TxtMsg.Text;


}
}
}

Output:

Vidyalankar School of Information Technology


b) Create a simple application to demonstrate your vacation using calendar control.

c) Demonstrate the use of Treeview operations on the web form.

Vidyalankar School of Information Technology


Vidyalankar School of Information Technology

You might also like