targeting a response.write to a section of a web page

S

Stephen

I have a function that calls:

response.Write("<a href='www.yadda.com >Hello</a><br />")

multiple times, creating hyperlinks like so:

Hello
Hello
Hello
Hello
Hello
Hello

Anyway, I want the values above to be put in a specific location of my
web page (inside a table cell), instead of the top, which pushes all my
content down.

Basically, I am using xquery in a search field to go through an xml
document that contains my web site navigation info, returning a url
attribute. I have the url string from the xml doc converted to a
hyperlink using the code above.

Any suggestions are appreciated.
 
J

jeffrobbins

Can you drop label members where you want the links and just add this
code to your method?

label.Text = "<a href='www.yadda.com'>Hello</a>";

Hope this helps.
 
S

Stephen

I ended up hiding a table within the table and appended rows and cells
with the urls.

for each book in nodeList
Dim tempRow As New TableRow()
Dim tempCell As New TableCell()
tempCell.Text = "<a class='HoverStyle' href=" &
book.Attributes("url").Value & " target='_blank' a>" &
book.Attributes("title").Value & "</a>"
tempRow.Cells.Add(tempCell)
tblSearchResults.Rows.Add(tempRow)
next

thanks.
 
S

sreejith.ram

simple solution...
1) Make the table Cell Server control . <td id="cell1" runat="server"
2) keep adding all links to the cell
cell1.InnerHtml += "<a href='www.yadda.com >Hello</a><br />"

better solution.. this way u will have better control on the layout of
links
1) Make the table a Server control . <table id="table1" runat="server"
2) keep adding rows HtmlTableRow and HtmlTableCell objects to the table
for each link
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top