Hyperlinks vs Buttons ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi Guys,

I've got a simple question for all of you guys. I have just noticed that I
have alot of buttons on my screen. Is there any that those buttons be
replaced by anything more sophisticated ? e.g. HyperLinks, without getting
rid of the code that has been written on the click of the button.

Look forward to some valuable feedback.

Thanks,

I.A
 
Irfan said:
Hi Guys,

I've got a simple question for all of you guys. I have just noticed
that I have alot of buttons on my screen. Is there any that those
buttons be replaced by anything more sophisticated ? e.g. HyperLinks,
without getting rid of the code that has been written on the click of
the button.

What's wrong with your buttons? The fact that they *are* buttons (and
cause form submits) or the way they look? You can make buttons look
like hyperlinks using CSS, if that's what you want.

Cheers,
 
Yeah that will be wonderful, how can we achieve that ?>>

...or, instead of using Hyperlink or Button controls, you could use the
LinkButton control.

Jeppe Jespersen
 
Hi Irfan,

You can apply CSS styles to controls such as labels, linkbuttons, etc. Any
Control that contains a CssStyle property can be stylesheet(ed).

<asp:Button id="Button2" Text="Hi" CssClass="buttonStyle" runat="server"/>

You can either use an external file for getting stylesheet info or use the
<STYLE> Tag in HTML Code for the same.

A sample one can be like this.. Chenge the values to suite your need.

..buttonStyle
{ FONT-WEIGHT: bold;
FONT-SIZE: 9pt;
TEXT-TRANSFORM: capitalize;
COLOR: white;
FONT-FAMILY: Verdana;
BACKGROUND-COLOR: navy }


BTW, Instead of this as Jeppe pointed out, you can use the linkbutton

Hope this helps..

Need any help, do post a msg back...


Happy Coding
 
Thanks for that....


Vishnu-Chivukula said:
Hi Irfan,

You can apply CSS styles to controls such as labels, linkbuttons, etc. Any
Control that contains a CssStyle property can be stylesheet(ed).

<asp:Button id="Button2" Text="Hi" CssClass="buttonStyle" runat="server"/>

You can either use an external file for getting stylesheet info or use the
<STYLE> Tag in HTML Code for the same.

A sample one can be like this.. Chenge the values to suite your need.

.buttonStyle
{ FONT-WEIGHT: bold;
FONT-SIZE: 9pt;
TEXT-TRANSFORM: capitalize;
COLOR: white;
FONT-FAMILY: Verdana;
BACKGROUND-COLOR: navy }


BTW, Instead of this as Jeppe pointed out, you can use the linkbutton

Hope this helps..

Need any help, do post a msg back...


Happy Coding
 
Back
Top