A "wait" screen between pages in C # ASP.NET. Best practice

I have a gridview with some image buttons, each of which launches a report page for this element. The report will take 10-15 seconds, so I would like to see the pop-up message "Creating a report, please wait." I can think of several ways, but I would like the opinions of those who were more experienced than me. The options that I have considered are:

a) associate my image button with an intermediate page that says “please wait”, and then send it to the report page. Seems a bit awkward b) Explore the use of jquery or similar. I have telerik control, they have a few things, but it is not clear if they are suitable. c) Define some CSS layer with a request to wait for the warning and make it visible as part of the onclick event button d) Look at jquery or similar

Any thoughts?

Thank!

+3
source share
3 answers

I use Div with transparency, and it's pretty cool and simple. Give it a try.

 <div id="ModalPopup" style="visibility: hidden;">
  <div style="position: fixed; width: 100%; height: 100%; z-index: 10002; background-color: Gray;
    filter: alpha(opacity=70); opacity: 0.7;">
    &nbsp;
  </div>
  <table style="position: fixed; width: 100%; height: 100%; z-index: 10003;">
    <tr>
      <td align="center" valign="middle">
        <div style="color: Black; font-weight: bolder; background-color: White; padding: 15px;
          width: 200px;">
          <asp:Image ID="Image3" runat="server" ImageUrl="~/Images/progress.gif" />
          Procesando....
        </div>
      </td>
    </tr>
  </table>
  </div>

To display a div, use this JavaScript:

document.getElementById ('ModalPopup'). style.visibility = 'visible';

+4

, , AJAX Server Control UpdateProgress . UpdateProgress.

+1

you may have <iframe>on the page for which styleit matters display:none. the button (which you will use to complete the action) will execute a javascript function that will set the style <iframe>on display:blockwhen clicked.

0
source

Source: https://habr.com/ru/post/1741877/


All Articles