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
MR alaa
NA
631
21.4k
show all data in html table
Mar 30 2016 12:46 PM
hi every body
i have a page that i need to show searched data in it my database is excel suppose i don't know how many columns and rows i need to show all data in a table depend on number of columns if there is one column in excel sheet it drew a table with on columns um if they are column i excel sheet it draw 10 columns in page and so on the header of the table should be the same in excel
how can it be done in asp.net c# ?
use something like that but i need to know how to appened data to html
foreach (DataColumn column in ds.Tables[0].Columns)
{
lblresult.Text = column.ColumnName;
}
to be like that
html.Append("<td>" + ds.Tables[0].Rows[i]["ID"] + "</td>");
this gets me header what about data in rows
foreach (DataRow row in ds.Tables[0].Rows)
{
lblresult.Text = ??? to get values;
}
Reply
Answers (
3
)
when we use data reader or when we use data set in asp.net?
how to insert