Hyperlinks vs Buttons ?

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
 
J

Joerg Jooss

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,
 
J

Jeppe Dige Jespersen

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
 
G

Guest

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
 
G

Guest

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
 

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,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top