473,657 Members | 2,758 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4852
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***@discussi ons.microsoft.c om> wrote in message
news:5E******** *************** ***********@mic rosoft.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***@discussi ons.microsoft.c om> wrote in message
news:5E******** *************** ***********@mic rosoft.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***@discussi ons.microsoft.c om> wrote in message
news:CB******** *************** ***********@mic rosoft.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***@discussi ons.microsoft.c om> wrote in message
news:5E******** *************** ***********@mic rosoft.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
6524
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 function that will then put the value into a query and send it off the database.... and do some stuff with the return. What I have so far:
7
7726
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 which will be used to query sql server to repopulate the datagrid in the user control. I also wrapped the user control in a panel element so I could position it on the page. I'm clueless on how to get started with this.
1
1189
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
3704
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 the clicking of the LinkButton to call the click event handler to execute some code, then redirect to another page, but the other page is in the new browser window. And, we don't want to use JavaScript, such as:
0
887
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 those columns is a short description of the item. If there is extended information for the item, the text is a hyperlink to a static webpage. I found that the Literal control works great for just writing out the table, but slipping a linkbutton in...
4
259
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 metromilwaukee.com URL http://metromilwaukee.com/ URL http://clintongallagher.metromilwaukee.com/
7
1821
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
2558
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 link (1,2,3 so on). The code can be found in SubscriptionCart.aspx.cs. Default.aspx ------------
0
1165
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.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server">
0
8385
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8303
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8821
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8502
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8602
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7316
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.