Showing posts with label process. Show all posts
Showing posts with label process. Show all posts

Wednesday, March 28, 2012

UpdateProgress on top and dimming of page

I have seen this used in several places but have yet to see how to do it. When a process is initiated and the UpdateProgress is shown, it is shown on top of everything else on the page and it dims the whole page and everything else on it to bring attention to the progress control. I am assuming that it is just some layer made to be transparent but like I said, I can't find anything about it. Can someone give me some more information or better yet, point me to a tutorial?

Thanks in advance!

Try to take a look at this reading to?get?some?ideas?-?http://ajax.asp.net/docs/overview/UpdateProgressOverview.aspx#HowTheyWork.
You?can?implement the progression through?threading?sleep,asp:UpdatePanel and asp:UpdateProgress.
Wish the above can help you.

Updateprogress on page_load ?

I have a long running process that might take several seconds to populate a control. Id like to show a progress indicator while this is being done. Anyone got an example of showing an updateprogress during page_load ? Maybe I can just use javascript to invoke a button click event on a non-visible button and have it start off the process ?
 here's a quick example:
var $user_updateProgress=Sys.Application.findComponent('ctl00_WorkingArea_Container_User_list1_UserLookupProgress');
 I had an UpdateProgress control named UserLookupProgress which I wanted to display. When the page loads, the control gets loaded into a javascript Sys.UI.Control.
So I needed to access it and it was driving me nuts! so I took a look at the source and figured out how they were doing it. Ultimately you need to use the findComponent method
of the Sys.Application class. The thing I could not figure out is why I had to reference the fully qualified ClientID in order to gain reference to my control.
From there I was able to show/hide the control.
 Hope this helps.
 P.S. if anyone has a better way , PLEASE chime in ;)


I want to show a updateprogress while my page loads. There is a tree that is populated with a large amount of data.

i have encounter same problem b4, that need to load a large data on the page load

but the interface will hang untill all the data was process.

i did a silly job to solve this problem

add a timer that run only once, set it to false by default, then on pageload and Ispostback=false, enable the timer run only once.

in the timer tick event bind the data.

thus, the databind is start after page load, and updateprogress working in this way too.

Monday, March 26, 2012

Updating progress ?

Hi!

Is it possible to write such page that will be updating [rendering] itself during some long running process ?
For example:

void ExecuteLongRunning()
{

for(int i=0; i < 50 ; i++){
RenderSomeText();
Thread.Sleep(10000);

}

}

I'd like to see the text after each execution of RenderSomeText is it possible and how to do it :)

Jarod

I think it is possible to implement it. Here are some sample codes for your reference.
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="lblUpdateProgress" runat="server" Text="This is a asp:UpdateProgress testing"></asp:Label>
<asp:Button ID="btnUpdate" runat="server" Text="Update" OnClick="btnUpdate_Click" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnUpdate" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
<span style="display: block;">
<asp:UpdateProgress ID="UpdateProgressOne" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
<ProgressTemplate>
<asp:Image ID="Image1" runat="server" ImageUrl="~/images/airplane.bmp" />
</ProgressTemplate>
</asp:UpdateProgress>
</span>
</div>

Behind Codes:

protected void btnUpdate_Click(object sender, EventArgs e)
{
???for(int i=0; i < 50 ; i++){
???RenderSomeText();
???Thread.Sleep(10000);
???}
}

Wish the above can help you.

I'll use your example :) To show you what I really need so take a look at implementation of my RenderSomeText()

protected

void btnUpdate_Click(object sender,EventArgs e)

{

for (int i = 0; i < 50; i++)

{

RenderSomeText();

Thread.Sleep(10000);

}

}

privatevoid RenderSomeText()

{

lblUpdateProgress.Text +=

DateTime.Now.ToString();

lblUpdateProgress.Text =

"\r\n";

}

What I want to see on a page is updated "label" every time I press a button. So right after RenderSomeText() executes. My friend told me how to get such result using asynchronous delegate invocation. But maybe there is a better way of doing it ?

Jarod


I can't continue to help you for business.Try to post your issues with a new thread.This may?be?better?for you?to?solve?this?issue.

Wednesday, March 21, 2012

Use Class instead of Web Service?

Hello,

Can I use a class instead of a web service? If I communicated with only my page I would like to speed up the process by not using a web service.

TIA,

Clank

Clank

Take a look at this quickstart
http://atlas.asp.net/quickstart/atlas/doc/services/default.aspx#webpage

thanks
-jhawk