Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
Binding 2nd row from table into gridview.
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Srikanth Reddy
10y
884
1
Reply
How to display only second row from table to gridview?
I had written the code as follows: protected void Page_Load(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("server=.;database=test;trusted_connection=true");
SqlCommand cmd = new SqlCommand("select * from employee", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds, "newemp");
GridView2.DataSource = ds.Tables[0].Rows[1].ToString();
GridView2.DataBind();
}
But it is not giving correct output...
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
EF 4.0 Vs Linq2Sql
Scrap Management system Table Design