Sunday, March 11, 2012

Globalization/Localisation and WebServices

Mark your web method with the following attribute:

[WebMethod(EnableSession =true)]


Thanks for this answer,

I am coding in vb.net, so it should look like this:

<WebMethod(EnableSession =True)> _

But this produces an error, VS2005 tells me that EnableSession has not been declared.


For VB it would be:
< WebMethod(EnableSession :=True)
Mark it as answer if it works.


the correct syntax was indeed

<WebMethod(enableSession:=True)> _

Thnaks a lot for your help

Globalization / localization at client side

Any thoughts?

Cool

Global.asax Application_Error not triggered

hello.

if i recall correctly, page errors are intercepted by the scriptmanager control. you can handle them by treating the pageerror event. as you might guess, those errors are cleaned by the ScriptManager and won't propagate to the global app error handler you've set up on global.asax

global exception handling with ajax.net

Hi! I has the same problem. I resolved to change the code from Application_Error to specialized class to catch the exception to eventlog. So, OnAsyncPostBackError of ScriptManager calls the same specialized class too.


the OnAsyncPostBackError event doesn't even fire i don't know what to do !!


The Application_Error works mainly when you replace your page - i.e when you actually
submit form and waits for the whole page to return (not an AJAX call)

If your application_error deals only with AJAX calls you shold throw your own exception to the client
and deal with it in your cient error handler. (Use window.location instead of redirect from the server)

Otherwise - throw yor own exception from the web method and deal with it on your error handler.


well that's cool i've thought of that although i think it's messy i still want to know what's wrong with OnAsyncPostBackError


I don′t use WebServices as you, but my event is fire (My using is very simple with UpdatePanel). I has been problem in Application_Error event, when I has setting the page error in web.config. In case, the HealthMonitoring dont′t was fired. Try remove any configuration of page error of WebConfig.


Hi bo2bo2,

Based on your description, I think the exact root cause is "OnAsyncPostBackError" running on server side and ajax calling web service on client side independently. So you should catch the errors that occurred while visiting webservice on client .Here is an useful url: http://ajax.asp.net/docs/mref/E_System_Web_UI_ScriptManager_AsyncPostBackError.aspx Hope it helps. If I misunderstood you, please let me know.

Given up trying to use Ajax

Nope, I found it very easy to use. Installed the framework, started a new AJAX enabled site, added a ScriptManager and UpdatePanel to my page and all worked as expected.


Hi Bopo,

Well i don't have any problems with using MS AJAX. just download v1.0:

http://www.microsoft.com/downloads/details.aspx?FamilyID=ca9d90fa-e8c9-42e3-aa19-08e2c027f5d6&displaylang=en

Run the msi and there is a ASP.NET Ajax enabled website available (VS2005) for you and there you go. It should work in a couple of minutes.

Regards,


Hi

I have already downloaded that several times, and it is installed, anyway I gave it another try using a different approach, at go a little father, I just open a new ajax template and dragged the rating tool onto the default page and ran it, but a diglouge box pops up looking for a file named 'ExtenderControlBase.cs' which is a little weird, as i am using VB.

Anyway does anyone know where this is located? I am looking through each folder within the Microsoft ASP.NET folder

Help appreciated


Hi Bopo,

This is probably a bug in your AjaxControltoolkit. The toolkit has an ExtenderControlBase.cs. What i would suggest is first create a simple page with a scriptmanager and an updatepanel to see if your Ajax project is working right. When this works like the way it should then reinstall the toolkit and try again some controls of the Ajax toolkit. Good luck!

Regards,


Found itBig Smile


Did you found the cs file? and what is the status of your Ajax projectConfused

Regards,

given a host who has not installed asp.net Ajax rc 1.0 how can i get an AJAX site to work

Install the current release on your Dev machine then place the release version of the DLLs in your remote /bin/ folder, finally update your root web.config file.

You can use the sample web.config, just add or make changes as needed.

Give a sign when data has changed in GridView

If u want to do something as the result of Partial Postback(in here the change of data in gridview) in a UpdatePanel,I think you could use a trigger.


Trigger's trigger the update panel to do something based on another event, they have nothing to do with monitoring the status of the updatepanel itself.

What you want to do is call Sys.WebForms.PageRequestManager.getInstance().add_endRequest(someFunction) where someFunction is custom code in javascript you want fired when the UpdatePanel is done. Conceivably, you could inspect the EndRequestEventArgs object that gets passed to someFunction as its first parameter to glean information about the request. You might have to maintain some kind of state on the client to pull this off.