AWP_registration

 a. Aim : Create a simple web page with various server controls to demonstrate


setting and use of their properties.


 Code:

 Page_Load Function:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

namespace WebApplication6

{

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

{

protected void Page_Load(object sender, EventArgs e)

{

for(int i=1;i<=31;i++)

{

DropDownList6.Items.Add(i.ToString());

}

for (int i = 1; i <= 10; i++)

{

DropDownList4.Items.Add(i.ToString());

}

for (int i = 2000; i <=2005; i++)

{

DropDownList3.Items.Add(i.ToString());

}

}


T.Y.B.Sc.IT ADVANCE WEB PROGRAMMING


25


 Button_Click Function :

protected void Button1_Click(object sender, EventArgs e)

{

String str = "";

str = "Your Name is : " + TextBox1.Text + "\n";

str = str + "Your Address is :" + TextBox2.Text + "\n";

if (RadioButton1.Checked)

{

str = str + RadioButton1.Text + "\n";

}

else

{

str = str + RadioButton2.Text + "\n";

}

if (CheckBox1.Checked)

{

str = str + "Your Hobbies are : " + CheckBox1.Text + "\n";

}

if (CheckBox2.Checked)

{

str = str + "" + CheckBox2.Text + "\n";

}

if (CheckBox3.Checked)

{

str = str + "" + CheckBox3.Text + "\n";

}

if (CheckBox4.Checked)

{

str = str + "" + CheckBox4.Text + "\n";

}

str = str + "Your DOB is : " + DropDownList6.Text + "/" + DropDownList4.Text +

"/" + DropDownList3.Text + "\n";

str = str + "Your Subject is : " + DropDownList5.Text + "\n";

TextBox3.Text = str;

}


Comments

Popular posts from this blog

python(BI)

Prac_8(AMP)

LSA10