Coding
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.Mobile;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.MobileControls;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
public partial class applyjobs : System.Web.UI.MobileControls.MobilePage
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DataSet ds = new DataSet();
ds.ReadXml(MapPath("jobs1.xml"));
foreach (DataRow dr in ds.Tables[0].Rows)
{
List1.Items.Add(dr["catagory_Text"].ToString());
SelectionList1.Items.Add(dr["catagory_Text"].ToString());
}
}
}
protected void btnApply_Click(object sender, EventArgs e)
{
DataSet ds1 = new DataSet();
ds1.ReadXml(MapPath("Appiled.xml"));
DataRow dr = ds1.Tables[0].NewRow();
dr[0] = txtusername.Text;
dr[1] = txtEmail.Text;
dr[2] = SelectionList1.Items[SelectionList1.SelectedIndex].Value;
ds1.Tables[0].Rows.Add(dr);
ds1.WriteXml(MapPath ("Appiled.xml"));
lblmsg.Visible = true;
lblmsg.Text = "SucessFully Submitted Your Deatails";
}
}