REGISTERATION FORM

AIM:

To write an ASP.NET program to create a registration form.

ALGORITHM:

1. Open Microsoft Visual Studio 2010
2. Click new project -> Asp.net web application with C#
3. Solution explorer right click -> add -> new item -> webform with C#
4. Place required controls for the application
5. write the necessary coding in C#
6. Run the application.

FORE CLOR.ASPX :

FORE COLOR.ASPX.CS :

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebApplication14
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
message.Text = "Hello " + username.Text + " ! ";
message.Text = message.Text + "
You have successfuly Registered withthefollowing details.";
ShowUserName.Text = username.Text;
ShowEmail.Text = EmailID.Text;
if (RadioButton1.Checked)
{
ShowGender.Text = RadioButton1.Text;
}
else ShowGender.Text = RadioButton2.Text;
var courses = "";
if (CheckBox1.Checked)
{
courses = CheckBox1.Text + " ";
}
if (CheckBox2.Checked)
{
courses += CheckBox2.Text + " ";
}
if (CheckBox3.Checked)
{
courses += CheckBox3.Text;
}
ShowCourses.Text = courses;
ShowUserNameLabel.Text = "User Name";
ShowEmailIDLabel.Text = "Email ID";
ShowGenderLabel.Text = "Gender";
ShowCourseLabel.Text = "Courses";
username.Text = "";
EmailID.Text = "";
RadioButton1.Checked = false;
RadioButton2.Checked = false;
CheckBox1.Checked = false;
CheckBox2.Checked = false;
}
heckBox3.Checked = false;
}
}

OUTPUT:

program 2 output

RESULT:

Thus the above program has been executed sucessfully verified and output is shown.

NEXT PROGRAM