473,395 Members | 1,437 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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

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.

Nov 19 '05 #1
3 1117
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.

Nov 19 '05 #2
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.

Nov 19 '05 #3
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

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Rob McLennan - ZETLAND | last post by:
Hi, I'm relatively clueless when it comes to correct ASP syntax. I'm testing out a search form for my company's website which is done in ASP. The results are displayed as per the code shown at the...
13
by: TinyTim | last post by:
I'm a newbie at ASP & HTML. It seems that when you use server side code and you're going to return a customized HTML form with several fields and labels, you have to do an extensive amount of...
11
by: Russ | last post by:
My web app writes some binary data to a file at the client site via Response.Write and Response.BinaryWrite. This action is accomplished in response to a button click, with C# code behind as...
4
by: mtv | last post by:
Hi all, I have a page default.aspx and lots of user controls (Top.ascx, LeftNav.ascx, Page1Content.ascx, Page2Content.ascx...). The default.aspx contains Top.ascx, LeftNav.ascx at design time,...
22
by: EMW | last post by:
Hi, When I use Response.Write "something" it is placed at the top op de html document above the <HTML> tag. I need it to be put in the BODY part. How can I do this? rg,
4
by: evgenyg | last post by:
Hello ! We have the following situation - when Ajax request is sent what's being returned by the server is usually an XML (which is used for DOM updates) but sometimes it's HTML which is a whole...
4
by: cbtechlists | last post by:
I have an ASP app that we've moved from a Windows 2000 to a Windows 2003 server (sql server 2000 to sql server 2005). The job runs fine on the old servers. Part of the app takes a recordset and...
4
by: pbd22 | last post by:
Hi. I have an ajax question. I am wondering if it is possible to get the response from a method within a given page, and that function alone? Traditionally, I have been getting the response...
5
by: satyabhaskar | last post by:
hi all, In my web page i have created radio buttons dynamically on to the page .....following is my code string Course, Semester, Section; int rowsCount; string con =...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.