TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sreekanth Reddy
353
4.9k
423.3k
Binding 2nd row from table into gridview.
Oct 18 2013 2:07 PM
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...
Reply
Answers (
1
)
Redirect to another page using tabcontrolller in mvc4
MVC 4