Im starting to pull my hair over this.
Im trying to append jQuery UI's button appearance on my regular button, however it doesn't get appended. Doesnt even get a class..
<asp:UpdatePanel ID="CartUpdPanel" UpdateMode="Conditional" ChildrenAsTriggers="true" runat="server">
<button runat="server" ID="CheckoutCartButton" CausesValidation="False" EnableViewState="False">Checkout</button>
<Triggers>
<asp:PostBackTrigger ControlID="CheckoutCartButton" />
</Triggers>
</asp:UpdatePanel>
I want the button to have a secondary icon. I usually know how to make this happen. But I'm running into problems..
This is the checkout button for my cart (I had the disabling working fine before I wanted to make it look fancy), and in the code behind it checks if you have enough credit to checkout or not, enabling/disabling the button.
I cant create the button in a in the ascx file because it will over-write the disabling of the button, making it enabled:
ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "disable button", "console.log('disabled'); $('#" + CheckoutCartButton.ClientID + "').button({ icons: { secondary: 'ui-icon-circle-arrow-e' }, disabled: true });", true);
I've tried using the updatepanel's id as control, but to no further success. And while writing this I thought it was a page-life cycle problem, since the cart credit is being checked OnInit. But even though I changed it to PageLoad, no difference.
Any wise people out there see my problem?