protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //username = (string)Session["username"]; //userid = (string)Session["userid"]; dml ob = new dml(); DataTable dt = new DataTable(); dt = ob.sliderimages(); if (dt.Rows.Count > 0) { img1.Src = "http://localhost:49447/Images/" + dt.Rows[0]["PICTURE1"].ToString(); img2.Src = "http://localhost:49447/Images/" + dt.Rows[0]["PICTURE2"].ToString(); img3.Src = "http://localhost:49447/Images/" + dt.Rows[0]["PICTURE3"].ToString(); img4.Src = "http://localhost:49447/Images/" + dt.Rows[0]["PICTURE4"].ToString(); } DataList1.DataSource = ob.getmodeldetails(); DataList1.DataBind(); } }