473,399 Members | 2,858 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,399 software developers and data experts.

LinkButton without Javascript???

First of all, my ASP.NET application has to support browser with
Javascript disabled. In the application There is a control that looks
like a text hyperlink, but the server-side has to do some-processing
when the control is clicked. In other words, it has to generate a
postback.

I'd like to use a <asp:LinkButton> to do this control because it looks
like a text hyperlink and it generates postback for server-side
processing. However, I just realize that its implementation depends on
Javascript. So, it won't work if users disable Javascript on their
browser.

Obviously, <asp:HyperLink> won't work either because it doesn't
generate postback for server-side processing.

Does <asp:Button> provide any formatting property such that it can be
rendered like a text hyperlink?

Another alternative is to use <asp:ImageButton> and create an image
that looks like a text hyperlink. However, is it true that this
approach won't work in Mozilla / Netscape when Javascript is disabled?

Do I have any other alternatives? How about 3rd party control?
Thanks
Dom

Nov 19 '05 #1
6 10364
if you need to support all browsers with client script off, then you can use
<asp:button> safely.

currently .net has a bug where <asp:image> will not work in non ie browsers
if the keyboard is used instead of the mouse for the submit. (they look for
the x and y values which are not sent without a mouse click ).

you can use <input type=image src="myimage.gif" value="submit"
name="myImage"> and dispatch the event your self by checking if the image
did a postback.

-- bruce (sqlwork.com)

<do****@hotmail.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
| First of all, my ASP.NET application has to support browser with
| Javascript disabled. In the application There is a control that looks
| like a text hyperlink, but the server-side has to do some-processing
| when the control is clicked. In other words, it has to generate a
| postback.
|
| I'd like to use a <asp:LinkButton> to do this control because it looks
| like a text hyperlink and it generates postback for server-side
| processing. However, I just realize that its implementation depends on
| Javascript. So, it won't work if users disable Javascript on their
| browser.
|
| Obviously, <asp:HyperLink> won't work either because it doesn't
| generate postback for server-side processing.
|
| Does <asp:Button> provide any formatting property such that it can be
| rendered like a text hyperlink?
|
| Another alternative is to use <asp:ImageButton> and create an image
| that looks like a text hyperlink. However, is it true that this
| approach won't work in Mozilla / Netscape when Javascript is disabled?
|
| Do I have any other alternatives? How about 3rd party control?
| Thanks
| Dom
|
Nov 19 '05 #2
Thank you, bruce. Please see below....

bruce barker wrote:
if you need to support all browsers with client script off, then you can use <asp:button> safely.
If I want to use <asp:button>, how can I make it render like a text
hyperlink (instead of a button-like style)? Is there such a property
/attribute that I can set?

currently .net has a bug where <asp:image> will not work in non ie browsers if the keyboard is used instead of the mouse for the submit. (they look for the x and y values which are not sent without a mouse click ).

you can use <input type=image src="myimage.gif" value="submit"
name="myImage"> and dispatch the event your self by checking if the image did a postback.
Could you please elaborate a bit on how to dispatch the event to do the
postback? (Any reference on MSDN on how to do it?)

Thanks
Dom -- bruce (sqlwork.com)

<do****@hotmail.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
| First of all, my ASP.NET application has to support browser with
| Javascript disabled. In the application There is a control that looks | like a text hyperlink, but the server-side has to do some-processing | when the control is clicked. In other words, it has to generate a
| postback.
|
| I'd like to use a <asp:LinkButton> to do this control because it looks | like a text hyperlink and it generates postback for server-side
| processing. However, I just realize that its implementation depends on | Javascript. So, it won't work if users disable Javascript on their
| browser.
|
| Obviously, <asp:HyperLink> won't work either because it doesn't
| generate postback for server-side processing.
|
| Does <asp:Button> provide any formatting property such that it can be | rendered like a text hyperlink?
|
| Another alternative is to use <asp:ImageButton> and create an image
| that looks like a text hyperlink. However, is it true that this
| approach won't work in Mozilla / Netscape when Javascript is disabled? |
| Do I have any other alternatives? How about 3rd party control?
| Thanks
| Dom
|


Nov 19 '05 #3
this is close...you'll want to play with it a little.....

<style>
..linkLookingButton {
background-color: #FFFFFF;
border: 0px solid;
color: #0000FF;
text-decoration: underline;
cursor:hand
}
</style>

this make a regular button....set its CssClass property to
"linkLookingButton"

<do****@hotmail.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
First of all, my ASP.NET application has to support browser with
Javascript disabled. In the application There is a control that looks
like a text hyperlink, but the server-side has to do some-processing
when the control is clicked. In other words, it has to generate a
postback.

I'd like to use a <asp:LinkButton> to do this control because it looks
like a text hyperlink and it generates postback for server-side
processing. However, I just realize that its implementation depends on
Javascript. So, it won't work if users disable Javascript on their
browser.

Obviously, <asp:HyperLink> won't work either because it doesn't
generate postback for server-side processing.

Does <asp:Button> provide any formatting property such that it can be
rendered like a text hyperlink?

Another alternative is to use <asp:ImageButton> and create an image
that looks like a text hyperlink. However, is it true that this
approach won't work in Mozilla / Netscape when Javascript is disabled?

Do I have any other alternatives? How about 3rd party control?
Thanks
Dom

Nov 19 '05 #4
David Jessee wrote:
this is close...you'll want to play with it a little.....

<style>
.linkLookingButton {
background-color: #FFFFFF;
border: 0px solid;
color: #0000FF;
text-decoration: underline;
cursor:hand
}
</style>


make that

cursor:pointer;

to be correct and have it working in non-IE Browsers

Jens
Nov 19 '05 #5
That's great.....but the underline and the hand-cursor do not appear
in Opera 7. Any idea on how to fix this one?

Thanks
Dominic

Jens Ansorg <je**@ja-web.de> wrote in message news:<e5**************@TK2MSFTNGP12.phx.gbl>...
David Jessee wrote:
this is close...you'll want to play with it a little.....

<style>
.linkLookingButton {
background-color: #FFFFFF;
border: 0px solid;
color: #0000FF;
text-decoration: underline;
cursor:hand
}
</style>


make that

cursor:pointer;

to be correct and have it working in non-IE Browsers

Jens

Nov 19 '05 #6
That's great.....but the underline and the hand-cursor do not appear
in Opera 7. Any idea on how to fix this one?

Thanks
Dominic

Jens Ansorg <je**@ja-web.de> wrote in message news:<e5**************@TK2MSFTNGP12.phx.gbl>...
David Jessee wrote:
this is close...you'll want to play with it a little.....

<style>
.linkLookingButton {
background-color: #FFFFFF;
border: 0px solid;
color: #0000FF;
text-decoration: underline;
cursor:hand
}
</style>


make that

cursor:pointer;

to be correct and have it working in non-IE Browsers

Jens

Nov 19 '05 #7

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

Similar topics

5
by: Fresh Air Rider | last post by:
Hello Could anyone please explain how I can pass more than one arguement/parameter value to a function using <asp:linkbutton> or is this a major shortfall of the language ? Consider the...
1
by: Nevyn Twyll | last post by:
I have a DataList; in the DataList's , I have a LinkButton and a few listboxes. When the LinkButton is pressed, I need to get the ID of the selected item in one of the Listbox controls. Then I...
2
by: Dave | last post by:
Hi, I have a datagrid with a Templated column below. I want to execute some javascript before the postback to show a hidden "div" tag with static message of "Please Wait..." since the query takes...
6
by: Shivakumar | last post by:
Hi all, Recently i have updated my vs.net 2003 project to vs.net 2005 and i have successfully converted my code and found no problem with all my controls except the one which is the linkbutton. ...
3
by: Learner | last post by:
Hello, I have two buttons on one of my VehicleDetails.aspx page. Obiviously these two buttons takes the user to two different pages. Now my client is interested in having a linkbutton instead of...
3
by: John | last post by:
Hi I have been trying to change the css class of a linkbutton without succes ( I dont want to change the cssclass property). Maybe somebody knowshow to do this?? th.John <%@ Page...
3
by: DanG | last post by:
Hi I used to have an ImageButton in my datagrid, and referenced the control in the javascript with: var fld = document.getElementById('datagrid__ctl2_btnEdit'); alert(fld); //returns "" >Good...
4
by: RN1 | last post by:
An ASPX page, named LinkButton.aspx, has a single LinkButton & nothing else. The code is very simple: <form runat="server"> <asp:LinkButton ID="lnk" PostBackUrl="Page1.aspx" Text="CLICK"...
2
by: =?Utf-8?B?TWFyYyBXaWNrZW5z?= | last post by:
Hi I have noticed that the LinkButton creates a hyperklink to a javascript location .e.g. <a href="javascript:__dopostback" This is bad for accessability because browsers without Javascript...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...
0
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,...
0
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...

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.