Click here to Skip to main content
15,885,435 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
the following code i have given for the name text box of a webpage in that name text box the names which got stored in database at the time of registration has to be fetched and brought out as default in name text box of web page with help of session..help me please..the following code is not working out ..can anyone help me please..soon

My_Util util =new My_Util();
Dataset ds1;
Session["user1"]=textName.Text.ToString();
ds1=util.sendpwdcheck(textName.Text.trim());
if(ds1.Tables[0].Rows.Count>0)
{
Session["user1"]=ds1.Tables[0].Rows[0]["CustName"];
util.SetConnection();
util.sql_con.open();
da=new SqlDataAdapter("select CustName from offsale.OS_forSalelogin where email='"+session["user"]+"',util.sql_con);
da.Fill(ds1);
}
Posted
Comments
deepakdynamite 5-Nov-12 23:52pm    
Well!!! Looking at your code.. I will say you are using Session without any reason on 3rd line. And further it looks like a mess. Please elaborate your question
nityasri 6-Nov-12 0:09am    
actually the session given in third line is given in new user registration page...so that the name given in text box of register page will be defaultly thrown rite...so i used that

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900