locked
BLOCK UI while Pressing SAVE button RRS feed

  • Question

  • User-2108369543 posted

    I have a partial view starting with

    <% using (Html.BeginForm("Create", "Unit",FormMethod.Post))
       {%>
    ...........

            <input type="submit" value="Save" title="Save" style="font-size: 12px; color: Black;
                padding-top: 1px; padding-bottom: 1px" id="btnSave"/>

    <%} %>

    i am currently not using Ajax.BeginForm or any ajax request($.ajax()).How can i block the UI when i press Save button and if it save successfully Unblock the UI.Please help me

    Thursday, May 19, 2011 10:45 PM

Answers

  • User-474980206 posted

    the block is done with javascript, there are dozens of methods, the unblock will be done by the refresh. a easy one is a opaque/transparent div covering the page. use absolute and z-order to cover.  attach the block javascript to form onsubmit event.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, May 20, 2011 1:23 AM

All replies

  • User1682618242 posted

    When you click the Save button the entire page will be refreshed not only the partial view so I don't see any use to block the UI.

     

    Friday, May 20, 2011 12:54 AM
  • User-474980206 posted

    the block is done with javascript, there are dozens of methods, the unblock will be done by the refresh. a easy one is a opaque/transparent div covering the page. use absolute and z-order to cover.  attach the block javascript to form onsubmit event.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, May 20, 2011 1:23 AM