loading screen...

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
9/1/2008 4:58:00 PM
Gravatar
Total Posts 33

loading screen...

Hi Joe,

sorry for many questions, probably you want to go to sleep right now...

Anyway, could you please elaborate how to implement the setup page that shows the status of the installation? I had a look at the default page in setup folder, you are using HttpContext.Current.Response.Write to output the result to a page, and I have tried doing the similar thing, however, the page showup in one go, no step by step updating the content.

Could you please advise how to achieve that?

Cheers

James

9/1/2008 5:18:33 PM
Gravatar
Total Posts 18439

Re: loading screen...

I think what you are looking for is:

HttpContext.Current.Response.Flush();

Call that after each thing you want to show.

You can see where I used in in Setup/Default.aspx.cs in the WritePageContentMethod

Hope it helps,

Joe

9/1/2008 5:22:15 PM
Gravatar
Total Posts 33

Re: loading screen...

Hi Joe,

I did just the flush, but still doesn't work...

here is what i have

public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
HttpContext.Current.Response.Write("hello");
HttpContext.Current.Response.Flush();
for (int i = 0; i < 999999999; i=i)
{
}
HttpContext.Current.Response.Write("hello");
HttpContext.Current.Response.Flush();
}
}

as you can see I put the infinite loop to stop displaying the second hello, but the page hangs there without displaying the first hello

Cheers

James

9/1/2008 5:29:13 PM
Gravatar
Total Posts 18439

Re: loading screen...

Try adding this as the first thing in your page load event:

Response.Buffer = true;

The other thing to be aware of is Response.Write doesn't work in the normal context of rendering ASP.NET like with master pages and all that, or inside of controls or in button click events. If you're using Reponse.Write, you need to be creating the entire correct html content for your output from top to bottom in sequence, you can flush as you go to render sequential pieces.

The setup page in mojoportal is a special case where Response.Write is usefull, response.Write would not work in other places in mojoportal without just screwing up the rendering.

Hope it helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.