protected void Page_Load(object sender, EventArgs e) { ServiceReference2.Service1Client c = new ServiceReference2.Service1Client("BasicHttpBinding_IService1"); GridView1.DataSource = c.GetSingleCompanyData(Session["username"].ToString()); // Label1.Text = Session["companyname"].ToString(); GridView1.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { Label1.Text = "Select JobId"; if (!IsPostBack) { ServiceReference2.Service1Client s = new ServiceReference2.Service1Client("BasicHttpBinding_IService1"); DataSet ds = s.GetSingleCompanyData(Session["username"].ToString()); DataTable dt = ds.Tables[0]; List <string> l = (from DataRow dr in dt.Rows select(string) dr["jobid"]).ToList <string>(); DropDownList1.DataSource = l; DropDownList1.DataBind(); } }