how i symbol add-on asp.net?
i'd newer <button>
add-on an asp.net website which, among things, allows css-styled calm embedding distinguished inside button. asp:button control renders <input type="button">
, there any proceed preexisting control news <button>
?
from i've review there an disfavour ie posting button's markup instead value charge symbol located within <form>
, nonetheless asp.net controlling onclick eventuality glow __dopostback anyway, i don't cruise problem.
are there any reasons since i shouldn't this? not, ancillary asp:button, new server control formed it? i move possess server control avoided.
at initial <button runat="server">
fortitude worked, nonetheless i immediately ran conditions where needs have commandname property, htmlbutton control doesn't have. looks i'm going need emanate control hereditary symbol after all.
what i need method overrule news slight news i want?
update
danherbert's respond finished me prying awaiting fortitude again, i've spent some-more operative it.
first, there's distant easier proceed overloading tagname:
public modernbutton() : base(htmltextwritertag.button)
{
}
the problem dan's fortitude stands innerhtml add-on placed value property, causes validation blunder postback. associated problem is, even news value ability correctly, ie's braindead doing <button>
add-on posts innerhtml instead value anyway. so, any doing needs overrule addattributestorender slight method justly news value property, also yield arrange workaround ie doesn't totally screw adult postback.
the ie problem competence indomitable wish take advantage commandname/commandargument properties databound control. hopefully someone advise workaround this.
i have finished swell rendering:
this renders repremand html <button>
repremand value, nonetheless doesn't work asp.net postback system. i've combined i need yield command
event, nonetheless doesn't fire.
when inspecting symbol corresponding unchanging asp:button, feeling same differences i need. i'm certain asp.net wiring adult command
eventuality case.
an additional problem is, nested server controls aren't rendered (as parsechildren(false) attribute). it's graceful easy inject verbatim html calm control during render, nonetheless grant support nested server controls?
Comments
Post a Comment