acts like an anchor, i.e., links to another page, but looks like a button

A

AAaron123

I like something that acts like an anchor, i.e., links to another page, but
looks like a button.

I can use this: asp:LinkButton but the corners are square so it looks
different that a regular button.



I tried defined a css class and do this:

<a class="button" href="whatever.com">Anchor Button</a>

I did not succeed (yet), but I'm quite sure it to will not look like a
normal button because the border will have square corners.



Is there a solution without using themes?



Any answer, especially "No" so I stop trying, would be appreciated.
 
T

teddysnips

I like something that acts like an anchor, i.e., links to another page, but
looks like a button.

 I can use this: asp:LinkButton but the corners are square so it looks
different that a regular button.

I tried defined a css class and do this:

<a class="button" href="whatever.com">Anchor Button</a>

I did not succeed (yet), but I'm quite sure it to will not look like a
normal button because the border will have square corners.

Is there a solution without using themes?

Any answer, especially "No" so I stop trying, would be appreciated.

An image? You can attach an href to an image element.

Edward
 
H

Hillbilly

To create the look and feel you need to learn more about CSS; pseudo-classes
in particular and also how to make buttons. Thirdly you need to learn
ASP.NET and understand we can add runat="server" to any HTML element and
process it on the server. Finally learn how to read Backus-Naur format and
naming conventions as its how software developers document and discuss
examples as this one that follows...

// ASP.NET HTML Control
<a href="[hrefValue]" class="[className]" runat="server">[anchorText]</a>
 
A

AAaron123

I don't know if I want to laugh or cry.

Thanks

Mark Rae said:
Hmm - something which looks like a button, eh? How about a button...?

<input type="button" value="Anchor Button"
onclick="window.location='whichever.com';" />
 
A

AAaron123

thanks
Hillbilly said:
To create the look and feel you need to learn more about CSS;
pseudo-classes in particular and also how to make buttons. Thirdly you
need to learn ASP.NET and understand we can add runat="server" to any HTML
element and process it on the server. Finally learn how to read
Backus-Naur format and naming conventions as its how software developers
document and discuss examples as this one that follows...

// ASP.NET HTML Control
<a href="[hrefValue]" class="[className]" runat="server">[anchorText]</a>



AAaron123 said:
I like something that acts like an anchor, i.e., links to another page,
but looks like a button.

I can use this: asp:LinkButton but the corners are square so it looks
different that a regular button.



I tried defined a css class and do this:

<a class="button" href="whatever.com">Anchor Button</a>

I did not succeed (yet), but I'm quite sure it to will not look like a
normal button because the border will have square corners.



Is there a solution without using themes?



Any answer, especially "No" so I stop trying, would be appreciated.
 
A

AAaron123

thanks
I like something that acts like an anchor, i.e., links to another page,
but
looks like a button.

I can use this: asp:LinkButton but the corners are square so it looks
different that a regular button.

I tried defined a css class and do this:

<a class="button" href="whatever.com">Anchor Button</a>

I did not succeed (yet), but I'm quite sure it to will not look like a
normal button because the border will have square corners.

Is there a solution without using themes?

Any answer, especially "No" so I stop trying, would be appreciated.

An image? You can attach an href to an image element.

Edward
 
B

bruce barker

unlike an anchor, this requires javascript be enabled. an anchor with an
image is probably a better choice.

-- bruce (sqlwork.com)
 
A

AAaron123

I'd like ask a couple of questions just to be sure:

To get the rounded corners I'd have to make a .gif with transparent color in
the corners?

The text would be part of the image so I'd need an image for each different
text?

Are there many people with JavaScript disabled (this impacts other things)?

Thanks for the suggestion
 
A

AAaron123

Mark Rae said:
Yes, pretty much.


Or create the image dynamically at runtime...


About 6%: http://www.thecounter.com/stats/2008/October/javas.php

How do most developers handle the 6%?

Ignore that fact that their site will not function perfectly on those
browsers?

Not use javascript?

Check to see if it is supported and provide alternate code?

??


Thanks


PS Do you have any idea why some people would use a javascript non-enabled
browser?
 
B

bruce barker

whether you can ignore javascript being disabled depends on your site
and its users. if there is there a monetary reward to use your site,
then you can have more control. maybe you can just blow them off.

you can use a sniffer, to detect no javascript, and have two versions.
you can code your pages to gracefully degrade when javascript is
disabled. (unfortunately asp.net webforms gave no thought to this
approach, so many of the control fail without javascript).

when dealing with transparent images check the limitations of IE 6.0
(only 8 bit).

-- bruce (sqlwork.com)
 
A

AAaron123

Thanks for the insight

bruce barker said:
whether you can ignore javascript being disabled depends on your site and
its users. if there is there a monetary reward to use your site, then you
can have more control. maybe you can just blow them off.

you can use a sniffer, to detect no javascript, and have two versions. you
can code your pages to gracefully degrade when javascript is disabled.
(unfortunately asp.net webforms gave no thought to this approach, so many
of the control fail without javascript).

when dealing with transparent images check the limitations of IE 6.0 (only
8 bit).

-- bruce (sqlwork.com)
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top