473,800 Members | 2,418 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Anchor <a name=... > tag

Hi,

I would like in runtime to create some sections of the page, and at the
beginning to put some links to these sections.

Lets say I have to provide some details for every city user will visit.
I fetch the cities from the DB, and details for every city. Now I want
to have a page like this:
<p><a href="#Minneapo lis">Minneapoli s</a></p>
<p><a href="#Seattle" >Seattle</a></p>
<p><a href="#Tokio">T okio</a></p>
<p><a href="#Moscow"> Moscow</a></p>

.........

<a name="Minneapol is"></a>
Data for Minneapolis
........

<a name="Seattle"> </a>
Data for Seattle
......

etc., etc.
So far, I create a PlaceHolders for both links and detail sections, and
while I iterate my data, I generate the anchor name, and I can add the
links using HyperLink control. But I can not figure out how to add the
anchors in the second PlaceHolder.

I taught to use Literal control, but this looks ugly. Any suggestions?

Thanks

Sunny
Nov 18 '05 #1
8 2256
Sunny wrote:
Hi,

I would like in runtime to create some sections of the page, and at the
beginning to put some links to these sections.

Lets say I have to provide some details for every city user will visit.
I fetch the cities from the DB, and details for every city. Now I want
to have a page like this:
<p><a href="#Minneapo lis">Minneapoli s</a></p>
<p><a href="#Seattle" >Seattle</a></p>
<p><a href="#Tokio">T okio</a></p>
<p><a href="#Moscow"> Moscow</a></p>

........

<a name="Minneapol is"></a>
Data for Minneapolis
.......

<a name="Seattle"> </a>
Data for Seattle
.....

etc., etc.
So far, I create a PlaceHolders for both links and detail sections, and
while I iterate my data, I generate the anchor name, and I can add the
links using HyperLink control. But I can not figure out how to add the
anchors in the second PlaceHolder.

I taught to use Literal control, but this looks ugly. Any suggestions?


Use the System.Web.UI.H tmlControls.Htm lAnchor control class.

--
mikeb
Nov 18 '05 #2
Thanks a lot.
It is not in the designer toolbox, and google found only pages with
HyperLink control.

I'll give it a try.

Sunny
Nov 18 '05 #3
Hi Sunny,

Here are some additional reference in the MSDN which may be helpful for
getting closer to the HtmlAnchor control and the entire Html Server
Controls group:

#HtmlAnchor Control
http://msdn.microsoft.com/library/en...lAnchorControl
.asp?frame=true

#HTML Server Controls Hierarchy
http://msdn.microsoft.com/library/en...controlshierar
chy.asp?frame=t rue

Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #4
Hi Steven,

thanks for the links.

A quick question - is there such a beast like <BR> control?

If I want to add some Literals in a PlaceHolder, every one on a new
line, do I have to add in the Text property the <BR> tag, or there is a
programmatic way?

Thanks

Sunny
Nov 18 '05 #5
Sunny wrote:
Hi Steven,

thanks for the links.

A quick question - is there such a beast like <BR> control?

If I want to add some Literals in a PlaceHolder, every one on a new
line, do I have to add in the Text property the <BR> tag, or there is a
programmatic way?


HtmlGenericCont rol

--
mikeb
Nov 18 '05 #6
Thanks for the tip.

But HtmlGeneralCont rol("BR") generates this:

<BR></BR>

which results in 2 linebreaks in the browser.

Sunny

In article <uB************ **@TK2MSFTNGP09 .phx.gbl>,
ma************@ nospam.mailnull .com says...
Sunny wrote:
Hi Steven,

thanks for the links.

A quick question - is there such a beast like <BR> control?

If I want to add some Literals in a PlaceHolder, every one on a new
line, do I have to add in the Text property the <BR> tag, or there is a
programmatic way?


HtmlGenericCont rol

Nov 18 '05 #7
"Sunny" <su***@newsgrou ps.nospam> wrote in message
news:ec******** ******@TK2MSFTN GP10.phx.gbl...
Thanks for the tip.

But HtmlGeneralCont rol("BR") generates this:

<BR></BR>

which results in 2 linebreaks in the browser.


Then perhaps you should surround your lines with a <div>, or else add <p>
tags in between the lines.
--
John Saunders
johnwsaundersii i at hotmail
Nov 18 '05 #8
Thanks John,

it seems that I should start with HTML at first :)

<p> is not suitable, as it makes a blank line.
The only HTML tag I knew that makes line breaks was <BR>, thanks for the
<div> suggestion, exactly what I needed.

Sunny

In article <eZ************ **@TK2MSFTNGP11 .phx.gbl>,
jo************* *@notcoldmail.c om says...
"Sunny" <su***@newsgrou ps.nospam> wrote in message
news:ec******** ******@TK2MSFTN GP10.phx.gbl...
Thanks for the tip.

But HtmlGeneralCont rol("BR") generates this:

<BR></BR>

which results in 2 linebreaks in the browser.


Then perhaps you should surround your lines with a <div>, or else add <p>
tags in between the lines.

Nov 18 '05 #9

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

Similar topics

1
6830
by: Christian Schmidbauer | last post by:
Hello! I prepare my XML document like this way: ------------------------------------------------------- PrintWriter writer; Document domDocument; Element domElement; // Root tag
2
3232
by: Eshrath | last post by:
Hi, What I am trying to do: ======================= I need to form a table in html using the xsl but the table that is formed is quite long and cannot be viewed in our application. So we are writing one object in C# which will take the entire table tag contents and renders. Ie., we need to pass "<table>………… <thead>……</thead>. <tr>.<td> <td>..<tr>.<td> <td> </table>" content to
2
10569
by: Donald Firesmith | last post by:
I am having trouble having Google Adsense code stored in XSL converted properly into HTML. The <> unfortunately become &lt; and &gt; and then no longer work. XSL code is: <script type="text/javascript"> <!]> </script> <script type="text/javascript"
4
62117
by: higabe | last post by:
Three questions 1) I have a string function that works perfectly but according to W3C.org web site is syntactically flawed because it contains the characters </ in sequence. So how am I supposed to write this function? String.replace(/</g,'&lt;');
6
6194
by: Michael Hamm | last post by:
Hi, I'm trying to write a <form> whihc will retrieve a Web page on another server. I have (essentially) this: <form action="http://cgi.cs.indiana.edu/~oracle/digest.cgi"> <input type="submit"><select name="N"> <option value="1234#1234-01">foo <option value="1010#1010-02">bar <option value="1001#1001-03">baz
129
64599
by: Torbjørn Pettersen | last post by:
I've started cleaning up my HTML and implementing CSS. So far I've used FrontPage, but am switching over to DreamWeaver. Reading a bit on W3Schools.com and W3.org I see there are a lot of HTML code I never even knew existed. Among these are <em> and <strong>. What's the difference between these two and <i> and <b>? -- Torbjørn Pettersen Editor/Webmaster
4
11914
by: bengee | last post by:
Hi First off - by the word "anchor" i DON'T mean a link, i.e. <a></a> tags I'm trying to position a <select> box inside a <div>. I can use relative positioning to set where the box should appear using "left: ?px; top: ?px;". What i'd like to do though, is set the box so that it's dead horizontally center inside the <div> (don't forget that the width of the select box can change depending on what options i have listed in it).
11
13727
by: Les Paul | last post by:
I'm trying to design an HTML page that can edit itself. In essence, it's just like a Wiki page, but my own very simple version. It's a page full of plain old HTML content, and then at the bottom, there's an "Edit" link. So the page itself looks something like this: <HTML><HEAD><TITLE>blah</TITLE></HEAD><BODY> <!-- TEXT STARTS HERE --> <H1>Hello World!</H1> <P>More stuff here...</P>
5
1945
by: Nathan Sokalski | last post by:
My Web.config file contains the following section to register some of my UserControls: <pages> <controls> <add tagPrefix="NATE" tagName="Banner" src="~/Banner.ascx"/> <add tagPrefix="NATE" tagName="Navigation" src="~/Navigation.ascx"/> </controls> </pages>
0
9551
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10505
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10275
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10033
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9085
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7576
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5471
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.