Click here to Skip to main content
16,016,678 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to bind data in the formview control
post solution for this
thanks in advance
Posted

Same like GridView.......

SqlConnection myConnection = new SqlConnection(ConnectionString);

SqlDataAdapter ad = new SqlDataAdapter("SELECT * FROM Users", myConnection);

DataSet ds = new DataSet();

ad.Fill(ds);

FormView1.DataSource = ds;

FormView1.DataBind();
 
Share this answer
 
v2
Comments
rajrprk 2-Dec-11 4:50am    
i added the code but i didn't get data
whether i want to add the field in itemtemplate
RaviRanjanKr 2-Dec-11 18:33pm    
Always wrap your code in pre tag

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