vb.net - ASP.NET sync issues -
I am going to be a strange issue with a web form I'm working on some async stuff Sounds related. Basically, what I need to do: This code runs as a result of clicking a button on all web forms. Call GetResults (ResultsSet) is a long, thus the panel is required to show the progress panel problem is that my Prgtipanel is actually calling GetResults before it appears in. If I comment on the call to follow GetResults and lines, then no problem appears in the progress panel How can I apply the first two rows to execute and show on page before calling GetResults?
UserInputPanel.Visible = false ProgressPanel.Visible = true ResultsSet = new DataSet () GetResults (ResultsSet) FillOutput () ProgressPanel.Visible = false OutputPanel .Visible = true
It seems that you have to use control instead of trying to provide your own pace the wanted. When you click the form button, the server all the code on the side click handler runs before sending any response customer If you need something like this instead of your ProgressPanel :. To hide To
& lt; Asp: UpdateProgress ID = "UpdateProgress1" runat = "server" & gt; & Lt; ProgressTemplate & gt; & Lt; / ProgressTemplate & gt; & Lt; / ASP: UpdateProgress & gt; The contents of the
progress template
will be automatically displayed when the asynchronous postback starts, and then it will hide when it is done. UserInputPanel
, create JavaScript functions as follows (use jQuery or some other client-side JS framework for more powerful cross-browser codes): < / P>
and give the attribute of your button the following: function hideUserInput () {document.getElementById ('& lt;% = UserInputPanel.ClientID% & gt;'. Style.visibility = "hidden"; }
Comments
Post a Comment