Async = "true"

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
1/28/2008 9:55:54 AM
Gravatar
Total Posts 26

Async = "true"

Hi - Hope you can help. I'm looking at implementing calls to web services asynchronously and need to set Async = "true" on the page definition's - I tried modifying the layout.master of with the skin but this gives parser error

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. 

Parser Error Message: Error parsing attribute 'async': Type 'mojoPortal.Web.layout' does not have a public property named 'async'.

Source Error:


Line 1: <%@ Master Language="C#" Async="true" AutoEventWireup="true" CodeBehind="~/App_MasterPages/layout.Master.cs" Inherits="mojoPortal.Web.layout" %>
Line 2:
Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 

Source File: /Data/Sites/1/skins/treeviewmenu1/layout.Master Line: 1

 

Any suggestions on how I can do this

 

 

1/28/2008 10:03:23 AM
Gravatar
Total Posts 18439

Re: Async = "true"

Hi,

There is no Async property on page or masterpage, where are you getting the idea this property exists?

If you want to make an async call to a web service to populate something in the page that is usually done client side from javascript.

I would not make an async call with server side code if the result is needed to render the page server side. You can do asynchronous tasks from the server code if its result is not required to render the page by queueing the taks on a new thread. This prevents the task form making it slow to render the page.

Hope it helps,

Joe

3/10/2011 10:19:42 AM
Gravatar
Total Posts 1

Re: Async = "true"

Hi

We would like to use Async web services in Mojo controls

However, for that Async = true attribute needs to be set at page level before render.

<%@ Page Async="true" ... %>.

Refer http://msdn.microsoft.com/en-us/magazine/cc163725.aspx

How to enable it in mojo?

Ajay

 

 

 

3/10/2011 12:21:32 PM
Gravatar
Total Posts 18439

Re: Async = "true"

Well the problem is it is an all or nothing thing to change it and I don't think we should have that for every page in the menu.

If it were possible to set that from code then I would add a web.config setting and code it up to accommodate you but it is not possible to do that it can only be set in the page directive.

So if you need that you'll have to edit the Default.aspx file in your copy and add that, and you will have to maintain that modification whenever you upgrade.

For supporting pages in custom features you have control over that, but in the main cms page which all are served from Default.aspx you would have to edit the file as mentioned above. And I have no idea what if any side effects that will create in mojoPortal existing features if you do that.

Best,

Joe

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