473,377 Members | 1,119 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,377 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 4828
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.