Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > LinkButton without Javascript???

Reply
Thread Tools

LinkButton without Javascript???

 
 
domtam@hotmail.com
Guest
Posts: n/a
 
      01-24-2005
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

 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      01-25-2005
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)

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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
|


 
Reply With Quote
 
 
 
 
domtam@hotmail.com
Guest
Posts: n/a
 
      01-25-2005
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)
>
> <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) 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
> |


 
Reply With Quote
 
David Jessee
Guest
Posts: n/a
 
      01-25-2005
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"

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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
>



 
Reply With Quote
 
Jens Ansorg
Guest
Posts: n/a
 
      01-26-2005
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

cursorointer;

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



Jens
 
Reply With Quote
 
Dominic
Guest
Posts: n/a
 
      02-15-2005
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 <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> 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
>
> cursorointer;
>
> to be correct and have it working in non-IE Browsers
>
>
>
> Jens

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
binary write file to browser via linkbutton on GridView row (without querystring) robert@orisoft.co.uk ASP .Net 1 05-22-2007 08:14 PM
Linkbutton does not look like a linkbutton Sathyaish ASP .Net 3 09-08-2005 09:41 AM
Linkbutton does not look like a linkbutton Sathyaish ASP .Net Datagrid Control 1 09-08-2005 08:44 AM
LinkButton without Javascript??? domtam@hotmail.com ASP .Net Web Controls 5 02-15-2005 01:00 AM
LinkButton without DataGrid Eamon ASP .Net 1 04-28-2004 03:23 PM



Advertisments