Hi John,
Are you calling the web service, or do you get this error even without calling it? Also, what kind of post are you referring to? Are you using an update panel?
David
Thanks for the reply. I'm not getting this error when I don't call the web service. I don't use an update panel and I'm using a form.submit() thru javascript to post the data. Here's what I have: a web form in a master page that has drop-down lists that call the web service to pull data from sql on the fly without posting back and fill in other inputs on the form. I had a clientscript that would update these fields on postback running in the form page. When I took that out, the error was gone, but now I can't retrieve the data that's been posted. So it's either no error and no posted/calculated fields or error. I know the form is posting because there are some inputs that are set up using the Request and they're being pulled in fine. It's like any input being filled via the web service is not getting posted. I can't pull it back by using Request. I hope this makes sense. Thanks for listening at least.
John
One possible thing that could cause these errors is if you're trying to make web service calls from top level Javascript logic. If you do this, the web service proxy may not yet be loaded, and you could get this error. The way to fix this is to move the logic to happen on the application's 'load' event. e.g.
<components>
<application id="application" load="FUnctionThatDoesYourInitialWork" />
</components>
Thanks for the reply again, David. I believe that is what's happening because on the initial load there are no drop-downs chosen to call the web service, so after the page has been fully loaded, it does what it's supposed to. However, I am able to duplicate the error if I choose a drop-down and the page posts/reloads whereas I get no error if the page posts without any drop-downs chosen that use the web service. I'm assuming you're tallking about the web.config file for the app load event. Any articles with samples of exactly where to put it in web.config (ex: in <system.web>??)?
Thanks again,
John
Hi John,
Sorry, I wasn't clear. I was not referring to config entried, but to Atlas client side markup. e.g.
<scripttype="text/xml-script">
<page xmlns:script="http://schemas.microsoft.com/xml-script/2005">
<components>
<application id="application" load="YourFunction" />
</components>
</page>
</script>
Sweet!! I put the code into the master page, and, voila! It worked! Muchos Gracias!
I'm glad the solution was so simple!
No comments:
Post a Comment