LinkButton without Javascript???

Discussion in 'ASP .Net' started by domtam@hotmail.com, Jan 24, 2005.

  1. Guest

    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
     
    , Jan 24, 2005
    #1
    1. Advertising

  2. bruce barker Guest

    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)

    <> wrote in message
    news:...
    | 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
    |
     
    bruce barker, Jan 25, 2005
    #2
    1. Advertising

  3. Guest

    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)
    >
    > <> wrote in message
    > news:...
    > | 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
    > |
     
    , Jan 25, 2005
    #3
  4. David Jessee Guest

    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"

    <> wrote in message
    news:...
    > 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
    >
     
    David Jessee, Jan 25, 2005
    #4
  5. Jens Ansorg Guest

    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
     
    Jens Ansorg, Jan 26, 2005
    #5
  6. Dominic Guest

    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 <> wrote in message news:<>...
    > 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
     
    Dominic, Feb 15, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eamon

    LinkButton without DataGrid

    Eamon, Apr 28, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    437
    Martin Dechev
    Apr 28, 2004
  2. Sathyaish
    Replies:
    3
    Views:
    3,168
    Sathyaish
    Sep 8, 2005
  3. Replies:
    1
    Views:
    444
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    May 22, 2007
  4. Sathyaish

    Linkbutton does not look like a linkbutton

    Sathyaish, Sep 8, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    215
    Sathyaish
    Sep 8, 2005
  5. LinkButton without Javascript???

    , Jan 24, 2005, in forum: ASP .Net Web Controls
    Replies:
    5
    Views:
    195
    Dominic
    Feb 15, 2005
Loading...

Share This Page