472,796 Members | 1,460 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,796 software developers and data experts.

Which Control: Hyperlink or LinkButton?

Any folklore regarding the benefits of using one or the other of these
controls?
<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
Aug 17 '05 #1
4 4794
I think it's a matter of aesthetics and how much work you want your server to
do.

You should remember that a simple <a href="http://greyskin.co.uk>hyper
link</a> does not require a trip back to the server, whereas a sever control
(LinkButton) does.

I would say, use a LinkButton if you need to do some server-side processing
when the user navigates away (usually a LinkButton will have a link to a URL
within the same application), otherwise use a hyperlink.

--
Of all words of tongue and pen, the saddest are: "It might have been"

Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk
"clintonG" wrote:
Any folklore regarding the benefits of using one or the other of these
controls?
<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/

Aug 17 '05 #2
Hello Bill,

I was referring to the HyperLink and LinkButton web server controls.

I'm building tabbed navigation for the first time. Setting the CssClass
property in the Click event of a LinkButton leaves the LinkButton active.
When I set the LinkButton Enabled property to false the Text property
remains displayed (desireable) but is greyed out (undesireable) and at the
moment I have yet to determine how I might work around this.

<%= Clinton Gallagher

"billr" <bi***@discussions.microsoft.com> wrote in message
news:5E**********************************@microsof t.com...
I think it's a matter of aesthetics and how much work you want your server
to
do.

You should remember that a simple <a href="http://greyskin.co.uk>hyper
link</a> does not require a trip back to the server, whereas a sever
control
(LinkButton) does.

I would say, use a LinkButton if you need to do some server-side
processing
when the user navigates away (usually a LinkButton will have a link to a
URL
within the same application), otherwise use a hyperlink.

--
Of all words of tongue and pen, the saddest are: "It might have been"

Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk
"clintonG" wrote:
Any folklore regarding the benefits of using one or the other of these
controls?
<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/


Aug 18 '05 #3
> When I set the LinkButton Enabled property to false the Text property
remains displayed (desireable) but is greyed out (undesireable) and at the
Erm ... this is in keeping with windows (and other OS) controls, how else is
the user to know that the functionality is not available?
--
Of all words of tongue and pen, the saddest are: "It might have been"

Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk
"clintonG" wrote:
Hello Bill,

I was referring to the HyperLink and LinkButton web server controls.

I'm building tabbed navigation for the first time. Setting the CssClass
property in the Click event of a LinkButton leaves the LinkButton active.
When I set the LinkButton Enabled property to false the Text property
remains displayed (desireable) but is greyed out (undesireable) and at the
moment I have yet to determine how I might work around this.

<%= Clinton Gallagher

"billr" <bi***@discussions.microsoft.com> wrote in message
news:5E**********************************@microsof t.com...
I think it's a matter of aesthetics and how much work you want your server
to
do.

You should remember that a simple <a href="http://greyskin.co.uk>hyper
link</a> does not require a trip back to the server, whereas a sever
control
(LinkButton) does.

I would say, use a LinkButton if you need to do some server-side
processing
when the user navigates away (usually a LinkButton will have a link to a
URL
within the same application), otherwise use a hyperlink.

--
Of all words of tongue and pen, the saddest are: "It might have been"

Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk
"clintonG" wrote:
Any folklore regarding the benefits of using one or the other of these
controls?
<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/


Aug 18 '05 #4
I understand. I don't see greyed out properties used much in web forms. Not
at all that I have seen now that I think about it. The problem is the
properties of the control are all or nothing and can not be over-ridden
using CSS once the Enabled property is set to false.

After a quick review of the source I found what may be a solution [1]. For
now due to time constraints I can cope with the greyed out text properties.

<%= Clinton Gallagher

[1] http://altinoren.com/showhidebutton.htm
"billr" <bi***@discussions.microsoft.com> wrote in message
news:CB**********************************@microsof t.com...
When I set the LinkButton Enabled property to false the Text property
remains displayed (desireable) but is greyed out (undesireable) and at
the


Erm ... this is in keeping with windows (and other OS) controls, how else
is
the user to know that the functionality is not available?
--
Of all words of tongue and pen, the saddest are: "It might have been"

Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk
"clintonG" wrote:
Hello Bill,

I was referring to the HyperLink and LinkButton web server controls.

I'm building tabbed navigation for the first time. Setting the CssClass
property in the Click event of a LinkButton leaves the LinkButton active.
When I set the LinkButton Enabled property to false the Text property
remains displayed (desireable) but is greyed out (undesireable) and at
the
moment I have yet to determine how I might work around this.

<%= Clinton Gallagher

"billr" <bi***@discussions.microsoft.com> wrote in message
news:5E**********************************@microsof t.com...
>I think it's a matter of aesthetics and how much work you want your
>server
>to
> do.
>
> You should remember that a simple <a href="http://greyskin.co.uk>hyper
> link</a> does not require a trip back to the server, whereas a sever
> control
> (LinkButton) does.
>
> I would say, use a LinkButton if you need to do some server-side
> processing
> when the user navigates away (usually a LinkButton will have a link to
> a
> URL
> within the same application), otherwise use a hyperlink.
>
> --
> Of all words of tongue and pen, the saddest are: "It might have been"
>
> Bill.Richards @ greyskin .co .uk
> http://greyskin.co.uk
>
>
> "clintonG" wrote:
>
>> Any folklore regarding the benefits of using one or the other of these
>> controls?
>>
>>
>> <%= Clinton Gallagher
>> METROmilwaukee (sm) "A Regional Information Service"
>> NET csgallagher AT metromilwaukee.com
>> URL http://metromilwaukee.com/
>> URL http://clintongallagher.metromilwaukee.com/
>>
>>
>>


Aug 18 '05 #5

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

Similar topics

1
by: Pat | last post by:
All, What I want to do: ******************* Click on a hyperlink in the last column in a datagrid, have it grab a value in the fourth column in the same row and send it to the codehind into a...
7
by: moondaddy | last post by:
I have a user control being used instead of a frame page. when the user clicks on a menu item I need to send the ID (integer value) of that menu as a parameter in the postback of the user control...
1
by: Charlie | last post by:
Hi: I would just like to run some java script I have added to a linkbutton's attribute collection, but I don't want it to also post back. How do I stop it from posting back? Thanks, Charlie
1
by: nwa | last post by:
Using the LinkButton control on a web form, how can I make the clicking of it open a new browser instance? I know how to do it with the normal anchor tag, but not this ASP.NET control. I need...
0
by: dgk | last post by:
I'm adapting some code that wrote out html pages to work in dotnet and be dynamic rather than static. Currently, a page is presented with a table containing quite a few rows and columns. One of...
4
by: clintonG | last post by:
Any folklore regarding the benefits of using one or the other of these controls? <%= Clinton Gallagher METROmilwaukee (sm) "A Regional Information Service" NET csgallagher AT...
7
by: Arpan | last post by:
Both the Hyperlink web server control & the LinkButton web server control display text as links; so what are the differences between the 2 web server controls? Thanks, Arpan
0
by: Eugene Anthony | last post by:
The problem with my coding is that despite removing the records stored in the array list, the rptPages repeater control is still visible. The rptPages repeater control displayes the navigation...
0
by: Eugene Anthony | last post by:
BlogListingAll.aspx ------------------- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="user_BlogListingAll.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.