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
Sally
NA
1
0
html array from dataset
Feb 7 2006 6:24 AM
Hi Does anyone have an example of how to populate an array or collection from a dataset and display it in a table as html links? I have a name search button, user enters text and searches. I run a stored procedure to find the results and currently I display them in a listbox thus, foreach (DataRow DR in DS.Tables["Search"].Rows) { LoadBuffers(DR); //populates vars FN,LN,Key this.ListBox1.Items.Add(new ListItem (Key + "\t\t" + FN + "\t\t" + LN,Key )); } What I’d like to do is display the results as html links in a table instead. I think I need to declare a hyperlink array something like ; HyperLink[] HL = new HyperLink[something!]; And then in the foreach loop do something like person=(DR["FN"].ToString()+" "+DR["LN"].ToString()); HL[DR].Text=person; TableRow TR = new TableRow(); TR.Controls.Add(HL[DR]); this.SomeTable.Controls.Add(TR); I think I’m close but cannot quite get this to work – any advice greatly appreciated. Many thanks.
Reply
Answers (
0
)
hi.
Weekday Datagrid