DISPLAYING VEHICLE DETAILS USING TREE VIEW CONTROL

AIM:

To write an ASP.NET program to display the vehicle details using Tree view control.

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.Iinclude the xml file :
Solution explorer right click -> add -> new item -> xml file.
6.write the necessary coding in C#
7. Run the application.

VEHICAL_DETAILS.xml

                <htmlxmlns="http://www.w3.org/1999/xhtml">
            

VEHICAL_DETAILS.ASPX.CS


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Text;
namespace multiplication_table
{
publicpartialclassWebForm1 : System.Web.UI.Page
{
protectedvoid Page_Load(object sender, EventArgs e)
{

}

protectedvoid Button1_Click(object sender, EventArgs e)
{

{
int number, limit;
StringBuilder sb = newStringBuilder();

number = Convert.ToInt32(txtinputno.Text);
limit = Convert.ToInt32(txtlimit.Text);

for (int i = 1; i <= limit; i++)
{
string tableFormat = "{0} * {1} = {2} ";
sb.Append(string.Format(tableFormat, number, i, number * i)).Append(Environment.NewLine).Append("
");
}
Label1 .Text =sb.ToString();
}
}
}
}

OUTPUT:

program 8 output

RESULT:

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

NEXT PROGRAM
PREVIOUS PROGRAM