Button always renders as submit

Discussion in 'ASP .Net Web Controls' started by Marcin, Feb 7, 2005.

  1. Marcin

    Marcin Guest

    Hi,

    Can anybody tell me why asp Button control always renders as <input
    type="submit" ...>??? Or, what is more important for me, how to force it to
    render as <input type="button" ...>? Any solution?

    thanx
    Marcin
     
    Marcin, Feb 7, 2005
    #1
    1. Advertising

  2. <input type="button" runat="server" ...>

    Eliyahu

    "Marcin" <> wrote in message
    news:cu8mmp$81c$...
    > Hi,
    >
    > Can anybody tell me why asp Button control always renders as <input
    > type="submit" ...>??? Or, what is more important for me, how to force it

    to
    > render as <input type="button" ...>? Any solution?
    >
    > thanx
    > Marcin
    >
    >
     
    Eliyahu Goldin, Feb 7, 2005
    #2
    1. Advertising

  3. Marcin

    Marcin Guest

    Thanx, but I have to do it from the code, not in the aspx file. So I need
    something like that:
    Button b= new Button();
    b.RenderType = "button";

    greets
    M.

    U¿ytkownik "Eliyahu Goldin" <> napisa³ w
    wiadomo¶ci news:O%...
    > <input type="button" runat="server" ...>
    >
    > Eliyahu
    >
    > "Marcin" <> wrote in message
    > news:cu8mmp$81c$...
    > > Hi,
    > >
    > > Can anybody tell me why asp Button control always renders as <input
    > > type="submit" ...>??? Or, what is more important for me, how to force it

    > to
    > > render as <input type="button" ...>? Any solution?
    > >
    > > thanx
    > > Marcin
    > >
    > >

    >
    >
     
    Marcin, Feb 8, 2005
    #3
  4. System.Web.UI.HtmlControls.HtmlButton b = new
    System.Web.UI.HtmlControls.HtmlButton();

    Regards,
    Anthony


    "Marcin" <> wrote in message
    news:cu9mro$lm2$...
    > Thanx, but I have to do it from the code, not in the aspx file. So I need
    > something like that:
    > Button b= new Button();
    > b.RenderType = "button";
    >
    > greets
    > M.
    >
    > U¿ytkownik "Eliyahu Goldin" <> napisa³ w
    > wiadomo¶ci news:O%...
    >> <input type="button" runat="server" ...>
    >>
    >> Eliyahu
    >>
    >> "Marcin" <> wrote in message
    >> news:cu8mmp$81c$...
    >> > Hi,
    >> >
    >> > Can anybody tell me why asp Button control always renders as <input
    >> > type="submit" ...>??? Or, what is more important for me, how to force
    >> > it

    >> to
    >> > render as <input type="button" ...>? Any solution?
    >> >
    >> > thanx
    >> > Marcin
    >> >
    >> >

    >>
    >>

    >
    >
     
    Anthony Williams, Feb 8, 2005
    #4
    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. Mark
    Replies:
    1
    Views:
    1,796
  2. Ghafran Abbas
    Replies:
    0
    Views:
    4,310
    Ghafran Abbas
    Oct 12, 2004
  3. Marcin

    Button always renders as submit

    Marcin, Feb 7, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    873
    Anthony Williams
    Feb 8, 2005
  4. JJ

    LinkButton renders as button

    JJ, Feb 7, 2006, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    132
  5. Sam
    Replies:
    1
    Views:
    1,225
    Brian Kenneth Nielsen
    Nov 25, 2008
Loading...

Share This Page