[CLOSED] Razor Syntax for Button LoadingState

  1. #1

    [CLOSED] Razor Syntax for Button LoadingState

    Hi,

    Can you please give me the syntax for the MVC (Razor) version of this:

    2. Button with custom <LoadingState> configuration
    
        <ext:Button runat="server" Text="Click Me" OnDirectClick="Button1_Click">
            <LoadingState Text="Please Wait..." />
        </ext:Button>
    Thanks!
    Leo
    Last edited by Daniil; Apr 04, 2014 at 4:42 PM. Reason: [CLOSED]
  2. #2
    Hi @leonardm,

    Example
    @Html.X().Button().LoadingState(ls => ls.Text = "Please Wait...")
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi @leonardm,

    Example
    @Html.X().Button().LoadingState(ls => ls.Text = "Please Wait...")
    This is failing for me

    X.Button().Text("Save").Icon(Icon.Disk).LoadingState(ls => ls.Text = "Saving...")
    with message: Object reference not set to an instance of an object.

    Do I need to "New up" anything first?

    Thanks,
    Leo
    Last edited by leonardm; Mar 31, 2014 at 7:28 PM.
  4. #4
    Sorry. Please update from the SVN trunk (revision #5743) and use:
    @Html.X().Button().LoadingState(new ButtonLoadingState() { Text = "Saving..." })
    or
    @Html.X().Button().LoadingState(X.ButtonLoadingState().Text("Saving..."))
    Last edited by Daniil; Apr 01, 2014 at 2:31 AM.

Similar Threads

  1. [CLOSED] What's the Razor syntax for InputMask?
    By AmitM in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Sep 26, 2013, 1:31 AM
  2. [ASK] tabPanel.add razor syntax
    By 4L4Y in forum 2.x Help
    Replies: 2
    Last Post: May 21, 2013, 9:29 AM
  3. [CLOSED] autocomplete example with razor syntax ?
    By zwf in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Oct 19, 2012, 3:56 PM
  4. MVC 4 razor syntax and remotevalidation problem
    By ITReppert in forum 2.x Help
    Replies: 7
    Last Post: Sep 10, 2012, 3:05 PM
  5. Replies: 1
    Last Post: Feb 22, 2012, 6:41 AM

Tags for this Thread

Posting Permissions