Introduction:
In this post I have try to explain how to bind Gridview in Asp.net.
Description:
I have create a table name STUDENT_DETAIL and insert data into table.
Description:
I have create a table name STUDENT_DETAIL and insert data into table.
STUDENT_ID
|
int
|
STUDENT_NAME
|
varchar(50)
|
STUDENT_ADDRESS
|
varchar(50)
|
STUDENT_CLASS
|
varchar(50)
|
STUDENT_ID is primary key.
Now open the Visual Studio>Go to File>New>Website.
Add the Connectionstring in web.config file of website.
<configuration>
<connectionStrings>
<add name="connection" connectionString="Data Source=SYS-1F78031ED0A;Initial
Catalog=TestBlog;Integrated Security=True"/>
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
</configuration>
After that add new web form to website, drag and drop the
Gridview data control from