3rd REPOST! Solutions Only Please

A

AC

Trying to get anchor names to work - a simple html
concept - why so difficult?

original post:
 
C

Chris Jackson

I'm not sure what you are trying to do exactly. By default, ASP.NET uses
grid layout, which is designed to make web forms behave a lot like windows
forms do, thus making for a familiar form design experience. It achieves
this using absolute positioning, as you have observed. Because of the nature
of absolute positioning, the order in which items will be rendered is not
meaningful. If you don't like the order in which they are placed there by
the designer, just head in to the HTML view and change things around. If you
don't like using absolute positioning, it's easy enough to switch back to
the way straight HTML works by switching to flow layout. As for anchor names
not "working" - are they being rendered? What do you expect them to do that
they aren't doing?
 
G

Guest

Your best bet is to write the markup by hand or re-arrange it in the HTML pane rather than relying on the designer to do things for you

Sad but true, WSYIWYG editors for HTML suck. If you want more control over your HTML, you have to write it by hand instead of using the crutch
 
A

AC

I'm just trying to make a name anchor in an aspx form.
How do you position the anchor in the html if it's not in
the actual flow of the page - it's just after all of the
asp controls that have their absolute position...

you can't specify a TOP: 100; LEFT 100; (example) for a <a
name="whatever"> tag so how does it know where to jump to
on an aspx form?

here is code snippet:

HERE'S A LABEL
<asp:image id="Image3" style="Z-INDEX: 120; LEFT: 20px;
POSITION: absolute; TOP: 980px" runat="server"></asp:image>

HERE'S A LABEL
<asp:label id="lblExhaust" style="Z-INDEX: 119; LEFT:
356px; POSITION: absolute; TOP: 972px"runat="server"
Width="452px" Height="20px" Font-Names="Verdana" Font-
Size="8pt" ForeColor="White">asp:label>

NOW WHERE DOES THIS NAME GO IF I WANT IT AFTER THE ABOVE
LABELS?????
<a name="Exhaust"></a>
 
P

Polux

Quick and simple:

1)Drag two hypelinks to your page.(HyperLink1 and HyperLink2, for example)

2)Add names for them. For example, in Page_Load:

HyperLink2.Attributes.Add("name",HyperLink2.ID);
HyperLink1.Attributes.Add("name",HyperLink1.ID);

3) Ready. You have your anchors. If you don't want text in your anchors,
just clear the Text property of the HyperLinks.

Does it help you?
 
A

AC

Yes - that is helpful.
-----Original Message-----
Quick and simple:

1)Drag two hypelinks to your page.(HyperLink1 and HyperLink2, for example)

2)Add names for them. For example, in Page_Load:

HyperLink2.Attributes.Add("name",HyperLink2.ID);
HyperLink1.Attributes.Add("name",HyperLink1.ID);

3) Ready. You have your anchors. If you don't want text in your anchors,
just clear the Text property of the HyperLinks.

Does it help you?







.
 

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,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top