acts like an anchor, i.e., links to another page, but looks like a button

Discussion in 'ASP .Net' started by AAaron123, Nov 26, 2008.

  1. AAaron123

    AAaron123 Guest

    I like something that acts like an anchor, i.e., links to another page, but
    looks like a button.

    I can use this: asp:LinkButton but the corners are square so it looks
    different that a regular button.



    I tried defined a css class and do this:

    <a class="button" href="whatever.com">Anchor Button</a>

    I did not succeed (yet), but I'm quite sure it to will not look like a
    normal button because the border will have square corners.



    Is there a solution without using themes?



    Any answer, especially "No" so I stop trying, would be appreciated.
     
    AAaron123, Nov 26, 2008
    #1
    1. Advertising

  2. AAaron123

    Guest

    Re: acts like an anchor, i.e., links to another page, but looks likea button

    On Nov 26, 4:44 pm, "AAaron123" <> wrote:
    > I like something that acts like an anchor, i.e., links to another page, but
    > looks like a button.
    >
    >  I can use this: asp:LinkButton but the corners are square so it looks
    > different that a regular button.
    >
    > I tried defined a css class and do this:
    >
    > <a class="button" href="whatever.com">Anchor Button</a>
    >
    > I did not succeed (yet), but I'm quite sure it to will not look like a
    > normal button because the border will have square corners.
    >
    > Is there a solution without using themes?
    >
    > Any answer, especially "No" so I stop trying, would be appreciated.


    An image? You can attach an href to an image element.

    Edward
     
    , Nov 26, 2008
    #2
    1. Advertising

  3. AAaron123

    Hillbilly Guest

    To create the look and feel you need to learn more about CSS; pseudo-classes
    in particular and also how to make buttons. Thirdly you need to learn
    ASP.NET and understand we can add runat="server" to any HTML element and
    process it on the server. Finally learn how to read Backus-Naur format and
    naming conventions as its how software developers document and discuss
    examples as this one that follows...

    // ASP.NET HTML Control
    <a href="[hrefValue]" class="[className]" runat="server">[anchorText]</a>



    "AAaron123" <> wrote in message
    news:eMWc4Y%...
    >I like something that acts like an anchor, i.e., links to another page, but
    >looks like a button.
    >
    > I can use this: asp:LinkButton but the corners are square so it looks
    > different that a regular button.
    >
    >
    >
    > I tried defined a css class and do this:
    >
    > <a class="button" href="whatever.com">Anchor Button</a>
    >
    > I did not succeed (yet), but I'm quite sure it to will not look like a
    > normal button because the border will have square corners.
    >
    >
    >
    > Is there a solution without using themes?
    >
    >
    >
    > Any answer, especially "No" so I stop trying, would be appreciated.
    >
    >
    >
    >
    >
    >
    >
    >
     
    Hillbilly, Nov 26, 2008
    #3
  4. AAaron123

    AAaron123 Guest

    I don't know if I want to laugh or cry.

    Thanks

    "Mark Rae [MVP]" <> wrote in message
    news:egix71%...
    > "AAaron123" <> wrote in message
    > news:eMWc4Y%...
    >
    >> I like something that acts like an anchor, i.e., links to another page,
    >> but looks like a button.

    >
    > Hmm - something which looks like a button, eh? How about a button...?
    >
    > <input type="button" value="Anchor Button"
    > onclick="window.location='whichever.com';" />
    >
    >
    > --
    > Mark Rae
    > ASP.NET MVP
    > http://www.markrae.net
     
    AAaron123, Nov 26, 2008
    #4
  5. AAaron123

    AAaron123 Guest

    thanks
    "Hillbilly" <> wrote in message
    news:eId9Kf%...
    > To create the look and feel you need to learn more about CSS;
    > pseudo-classes in particular and also how to make buttons. Thirdly you
    > need to learn ASP.NET and understand we can add runat="server" to any HTML
    > element and process it on the server. Finally learn how to read
    > Backus-Naur format and naming conventions as its how software developers
    > document and discuss examples as this one that follows...
    >
    > // ASP.NET HTML Control
    > <a href="[hrefValue]" class="[className]" runat="server">[anchorText]</a>
    >
    >
    >
    > "AAaron123" <> wrote in message
    > news:eMWc4Y%...
    >>I like something that acts like an anchor, i.e., links to another page,
    >>but looks like a button.
    >>
    >> I can use this: asp:LinkButton but the corners are square so it looks
    >> different that a regular button.
    >>
    >>
    >>
    >> I tried defined a css class and do this:
    >>
    >> <a class="button" href="whatever.com">Anchor Button</a>
    >>
    >> I did not succeed (yet), but I'm quite sure it to will not look like a
    >> normal button because the border will have square corners.
    >>
    >>
    >>
    >> Is there a solution without using themes?
    >>
    >>
    >>
    >> Any answer, especially "No" so I stop trying, would be appreciated.
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>

    >
     
    AAaron123, Nov 26, 2008
    #5
  6. AAaron123

    AAaron123 Guest

    thanks
    <> wrote in message
    news:...
    On Nov 26, 4:44 pm, "AAaron123" <> wrote:
    > I like something that acts like an anchor, i.e., links to another page,
    > but
    > looks like a button.
    >
    > I can use this: asp:LinkButton but the corners are square so it looks
    > different that a regular button.
    >
    > I tried defined a css class and do this:
    >
    > <a class="button" href="whatever.com">Anchor Button</a>
    >
    > I did not succeed (yet), but I'm quite sure it to will not look like a
    > normal button because the border will have square corners.
    >
    > Is there a solution without using themes?
    >
    > Any answer, especially "No" so I stop trying, would be appreciated.


    An image? You can attach an href to an image element.

    Edward
     
    AAaron123, Nov 26, 2008
    #6
  7. AAaron123

    AAaron123 Guest


    > "Mark Rae [MVP]" <> wrote in message
    > news:egix71%...
    >> "AAaron123" <> wrote in message
    >> news:eMWc4Y%...
    >>
    >>> I like something that acts like an anchor, i.e., links to another page,
    >>> but looks like a button.

    >>
    >> Hmm - something which looks like a button, eh? How about a button...?
    >>
    >> <input type="button" value="Anchor Button"
    >> onclick="window.location='whichever.com';" />
    >>
    >>
    >> --
    >> Mark Rae
    >> ASP.NET MVP
    >> http://www.markrae.net

    >



    "AAaron123" <> wrote in message
    news:eUqEN%23%...
    >I don't know if I want to laugh or cry.
    >
    > Thanks
    > >

    Habits are hard to break
     
    AAaron123, Nov 26, 2008
    #7
  8. AAaron123

    bruce barker Guest

    Re: acts like an anchor, i.e., links to another page, but looks li

    unlike an anchor, this requires javascript be enabled. an anchor with an
    image is probably a better choice.

    -- bruce (sqlwork.com)


    "Mark Rae [MVP]" wrote:

    > "AAaron123" <> wrote in message
    > news:eMWc4Y%...
    >
    > > I like something that acts like an anchor, i.e., links to another page,
    > > but looks like a button.

    >
    > Hmm - something which looks like a button, eh? How about a button...?
    >
    > <input type="button" value="Anchor Button"
    > onclick="window.location='whichever.com';" />
    >
    >
    > --
    > Mark Rae
    > ASP.NET MVP
    > http://www.markrae.net
    >
    >
     
    bruce barker, Nov 26, 2008
    #8
  9. AAaron123

    AAaron123 Guest

    Re: acts like an anchor, i.e., links to another page, but looks li

    I'd like ask a couple of questions just to be sure:

    To get the rounded corners I'd have to make a .gif with transparent color in
    the corners?

    The text would be part of the image so I'd need an image for each different
    text?

    Are there many people with JavaScript disabled (this impacts other things)?

    Thanks for the suggestion


    "bruce barker" <> wrote in message
    news:...
    > unlike an anchor, this requires javascript be enabled. an anchor with an
    > image is probably a better choice.
    >
    > -- bruce (sqlwork.com)
    >
    >
    > "Mark Rae [MVP]" wrote:
    >
    >> "AAaron123" <> wrote in message
    >> news:eMWc4Y%...
    >>
    >> > I like something that acts like an anchor, i.e., links to another page,
    >> > but looks like a button.

    >>
    >> Hmm - something which looks like a button, eh? How about a button...?
    >>
    >> <input type="button" value="Anchor Button"
    >> onclick="window.location='whichever.com';" />
    >>
    >>
    >> --
    >> Mark Rae
    >> ASP.NET MVP
    >> http://www.markrae.net
    >>
    >>
     
    AAaron123, Nov 26, 2008
    #9
  10. AAaron123

    AAaron123 Guest

    Re: acts like an anchor, i.e., links to another page, but looks li

    "Mark Rae [MVP]" <> wrote in message
    news:...
    > "AAaron123" <> wrote in message
    > news:%...
    >
    >>>>> I like something that acts like an anchor, i.e., links to another
    >>>>> page,
    >>>>> but looks like a button.
    >>>>
    >>>> Hmm - something which looks like a button, eh? How about a button...?
    >>>>
    >>>> <input type="button" value="Anchor Button"
    >>>> onclick="window.location='whichever.com';" />
    >>>
    >>> Unlike an anchor, this requires JavaScript be enabled. An anchor with an
    >>> image is probably a better choice.

    >>
    >> To get the rounded corners I'd have to make a .gif with transparent color
    >> in the corners?

    >
    > Yes, pretty much.
    >
    >> The text would be part of the image so I'd need an image for each
    >> different text?

    >
    > Or create the image dynamically at runtime...
    >
    >> Are there many people with JavaScript disabled (this impacts other
    >> things)?

    >
    > About 6%: http://www.thecounter.com/stats/2008/October/javas.php
    >
    >
    > --
    > Mark Rae
    > ASP.NET MVP
    > http://www.markrae.net


    How do most developers handle the 6%?

    Ignore that fact that their site will not function perfectly on those
    browsers?

    Not use javascript?

    Check to see if it is supported and provide alternate code?

    ??


    Thanks


    PS Do you have any idea why some people would use a javascript non-enabled
    browser?
     
    AAaron123, Nov 26, 2008
    #10
  11. AAaron123

    bruce barker Guest

    Re: acts like an anchor, i.e., links to another page, but looks li

    whether you can ignore javascript being disabled depends on your site
    and its users. if there is there a monetary reward to use your site,
    then you can have more control. maybe you can just blow them off.

    you can use a sniffer, to detect no javascript, and have two versions.
    you can code your pages to gracefully degrade when javascript is
    disabled. (unfortunately asp.net webforms gave no thought to this
    approach, so many of the control fail without javascript).

    when dealing with transparent images check the limitations of IE 6.0
    (only 8 bit).

    -- bruce (sqlwork.com)


    AAaron123 wrote:
    > "Mark Rae [MVP]" <> wrote in message
    > news:...
    >> "AAaron123" <> wrote in message
    >> news:%...
    >>
    >>>>>> I like something that acts like an anchor, i.e., links to another
    >>>>>> page,
    >>>>>> but looks like a button.
    >>>>> Hmm - something which looks like a button, eh? How about a button...?
    >>>>>
    >>>>> <input type="button" value="Anchor Button"
    >>>>> onclick="window.location='whichever.com';" />
    >>>> Unlike an anchor, this requires JavaScript be enabled. An anchor with an
    >>>> image is probably a better choice.
    >>> To get the rounded corners I'd have to make a .gif with transparent color
    >>> in the corners?

    >> Yes, pretty much.
    >>
    >>> The text would be part of the image so I'd need an image for each
    >>> different text?

    >> Or create the image dynamically at runtime...
    >>
    >>> Are there many people with JavaScript disabled (this impacts other
    >>> things)?

    >> About 6%: http://www.thecounter.com/stats/2008/October/javas.php
    >>
    >>
    >> --
    >> Mark Rae
    >> ASP.NET MVP
    >> http://www.markrae.net

    >
    > How do most developers handle the 6%?
    >
    > Ignore that fact that their site will not function perfectly on those
    > browsers?
    >
    > Not use javascript?
    >
    > Check to see if it is supported and provide alternate code?
    >
    > ??
    >
    >
    > Thanks
    >
    >
    > PS Do you have any idea why some people would use a javascript non-enabled
    > browser?
    >
    >
    >
    >
    >
     
    bruce barker, Nov 27, 2008
    #11
  12. AAaron123

    AAaron123 Guest

    Re: acts like an anchor, i.e., links to another page, but looks li

    Thanks for the insight

    "bruce barker" <> wrote in message
    news:...
    > whether you can ignore javascript being disabled depends on your site and
    > its users. if there is there a monetary reward to use your site, then you
    > can have more control. maybe you can just blow them off.
    >
    > you can use a sniffer, to detect no javascript, and have two versions. you
    > can code your pages to gracefully degrade when javascript is disabled.
    > (unfortunately asp.net webforms gave no thought to this approach, so many
    > of the control fail without javascript).
    >
    > when dealing with transparent images check the limitations of IE 6.0 (only
    > 8 bit).
    >
    > -- bruce (sqlwork.com)
    >
    >
    > AAaron123 wrote:
    >> "Mark Rae [MVP]" <> wrote in message
    >> news:...
    >>> "AAaron123" <> wrote in message
    >>> news:%...
    >>>
    >>>>>>> I like something that acts like an anchor, i.e., links to another
    >>>>>>> page,
    >>>>>>> but looks like a button.
    >>>>>> Hmm - something which looks like a button, eh? How about a button...?
    >>>>>>
    >>>>>> <input type="button" value="Anchor Button"
    >>>>>> onclick="window.location='whichever.com';" />
    >>>>> Unlike an anchor, this requires JavaScript be enabled. An anchor with
    >>>>> an
    >>>>> image is probably a better choice.
    >>>> To get the rounded corners I'd have to make a .gif with transparent
    >>>> color in the corners?
    >>> Yes, pretty much.
    >>>
    >>>> The text would be part of the image so I'd need an image for each
    >>>> different text?
    >>> Or create the image dynamically at runtime...
    >>>
    >>>> Are there many people with JavaScript disabled (this impacts other
    >>>> things)?
    >>> About 6%: http://www.thecounter.com/stats/2008/October/javas.php
    >>>
    >>>
    >>> --
    >>> Mark Rae
    >>> ASP.NET MVP
    >>> http://www.markrae.net

    >>
    >> How do most developers handle the 6%?
    >>
    >> Ignore that fact that their site will not function perfectly on those
    >> browsers?
    >>
    >> Not use javascript?
    >>
    >> Check to see if it is supported and provide alternate code?
    >>
    >> ??
    >>
    >>
    >> Thanks
    >>
    >>
    >> PS Do you have any idea why some people would use a javascript
    >> non-enabled browser?
    >>
    >>
    >>
    >>
     
    AAaron123, Nov 27, 2008
    #12
    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. John  Fullman
    Replies:
    12
    Views:
    498
    Protoman
    Sep 22, 2005
  2. Utku Altinkaya

    RPC Client acts like a server

    Utku Altinkaya, Jul 14, 2008, in forum: Python
    Replies:
    0
    Views:
    235
    Utku Altinkaya
    Jul 14, 2008
  3. Rafe
    Replies:
    5
    Views:
    300
    Wolfgang Grafen
    Aug 15, 2008
  4. Martin
    Replies:
    8
    Views:
    3,471
    Jan C. Faerber
    Nov 24, 2009
  5. RichardOnRails
    Replies:
    6
    Views:
    198
    RichardOnRails
    May 11, 2011
Loading...

Share This Page