//connect to database for UserSetting stable SqlConncetion conn = new SqlConncetion(@"Server=localhost; Database=LCLDatabase_DEV; Integrated Security=True); //Create DataAdapter Object SqlDataAdapter adapter = new SqlDataAdapter ("Select id,valueFrom user where UserName="Samantha",conn); //Create a Dataset DataSet ds=new DataSet(); //Fill dataset using the query defined for DataAdapter adapter.Fill(this.ds,"user ); foreach(DataRow row in ds.Tables["user "].Rows) { Session["id"]=value; }
foreach(controls ctrl in page. controls) { if(Session[ctrl.ID]!=null) ctrl.value= Session[ctrl.ID].value }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)