<asp:ScriptManager id='scm' runat='server' EnablePartialRendering="true" />
Try that. If it still doesn' t work, post your markup.
Paul
I think I tried that, but let me try it again to be sure.
-Louis Sequin (Angel Child)
The following results in a postback of the entire page when button1 is clicked: screen flicker and all three labels times are updated. The thing I think is so odd is that I get no errors it's recognizing the namespace and, in fact, if I mess up a trigger in the triggers collection in the partial update panel, I get a handled exception telling me that there is no such control or there is no such event associated with that control. It's like the script manager isn't getting the client side scripts down to the browser at run time or something? I don't know. It seems to me as if I would get an error if that were happening though. Maybe not though.
<%@. Page Language="VB" AutoEventWireup="true" CodeFile="Default.aspx.vb" Inherits="_Default" %
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" />
<div>
<asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
<br />
<br />
<br />
<br />
<br />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Style="z-index: 100" Text="Label"></asp:Label><br />
<asp:Button ID="Button1" runat="server" Text="Button"/>
</ContentTemplate>
</asp:UpdatePanel>
<br />
<br />
<br />
<br />
<asp:Label ID="Label3" runat="server" Text="Label"></asp:Label>
<br />
<br />
<br />
<br />
</div>
</form>
</body>
</html>
Here is the web.config file.<configuration><configSections><sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"><sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"><section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/><sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"><section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/><section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/><section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/></sectionGroup></sectionGroup></sectionGroup></configSections><system.web><pages><controls><add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><add tagPrefix="asp" namespace="Microsoft.Web.Preview.UI" assembly="Microsoft.Web.Preview"/><add tagPrefix="asp" namespace="Microsoft.Web.Preview.UI.Controls" assembly="Microsoft.Web.Preview"/></controls></pages><!-- Set compilation debug="true" to insert debugging symbols into the compiled page. Because this affects performance, set this value to true only during development. --><compilation debug="true"><assemblies><add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/></assemblies><buildProviders><add extension="*.asbx" type="Microsoft.Web.Preview.Services.BridgeBuildProvider"/></buildProviders></compilation><httpHandlers><remove verb="*" path="*.asmx"/><add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/><add verb="GET,HEAD,POST" path="*.asbx" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/></httpHandlers><httpModules><add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/></httpModules></system.web><system.web.extensions><scripting><webServices><!-- Uncomment this line to customize maxJsonLength and add a custom converter --><!-- <jsonSerialization maxJsonLength="500"> <converters> <add name="DataSetConverter" type="Microsoft.Web.Preview.Script.Serialization.Converters.DataSetConverter, Microsoft.Web.Preview, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> <add name="DataRowConverter" type="Microsoft.Web.Preview.Script.Serialization.Converters.DataRowConverter, Microsoft.Web.Preview, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> <add name="DataTableConverter" type="Microsoft.Web.Preview.Script.Serialization.Converters.DataTableConverter, Microsoft.Web.Preview, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> </converters> </jsonSerialization> --><!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. --><!-- <authenticationService enabled="true" requireSSL = "true|false"/> --><!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and writeAccessProperties attributes. --><!-- <profileService enabled="true" readAccessProperties="propertyname1,propertyname2" writeAccessProperties="propertyname1,propertyname2" /> --></webServices><!-- <scriptResourceHandler enableCompression="true" enableCaching="true" /> --></scripting></system.web.extensions><system.webServer><validation validateIntegratedModeConfiguration="false"/><modules><add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/></modules><handlers><remove name="WebServiceHandlerFactory-Integrated"/><add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><add name="ASBXHandler" verb="GET,HEAD,POST" path="*.asbx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/></handlers></system.webServer></configuration>
I am encountering exact probnlem in a Windows 2003 server. I have installed Ajax.net 1.0. No beta version was ever installed. If you look at the source of the web page, you will see only two js from axd. Some missing.
The script for PageRequestManager Initialize is missing.
The same test site with same web.config in very similar servers work correctly. I have placed a couple of posts here earlier. Need help.
I forgot to mention that I also installed the latest Visual Studio service pack as well. And that I am running this in VWD and it's baby webserver and not IIS.
Same here.
Done everything by the book:
1. Created an AJAX enabled Website with VWD.
2. Drag n dropped the ScriptManager (use default settings)
3. Drag n dropped an UpdatePanel. (use default settings)
4. Made a page in the usual way, placing all controls inside the Update Panel.
5. Build then run. Get this error:
"Microsoft JScript runtime error: 'Sys' is undefined"
What's missing?
I had a similar problem once that was cleared up by re-downloading and reinstalling the ajax stuff. I suspect it was just a bad d/l.
Reinstalling the framework worked.

I am having the same problem about partial page postbacks not working so I posted similar just a bit ago.
None of the above mentioned worked. Other than reinstalling framework which I have not done because my site works fine on my local machine with Visual Studio 2005 but not once its up on DiscountASP server.
When you say, "reinstal the framework." Is that .net 2.0 or .net 3.0?
Reinstall the Ajax framework.
Perhaps you guys just should add a trigger which catches the click event:
<asp:AsyncPostBackTrigger ControlID="Button1" EventName="click" />
In you example this would look like this:
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Style="z-index: 100" Text="Label"></asp:Label><br />
<asp:Button ID="Button1" runat="server" Text="Button"/>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Button1" EventName="click" />
</Triggers>
</asp:UpdatePanel>
From my original post
9. Taking the button out of the partial update panel and wiring up a partial update panel trigger to the click event on the button still gives me a full page postback.
BTW, I have yet to reinstall the AJAX Framework. I have high hopes that will correct the problem. Very strange for a bad d/l to install at all though, much less to insall, and not cause exceptions up the wasoo. I mean, you can't just scramble the middle of a program and expect it to act like anything but complete garbage. The symptom is a completely error free install, and a completely error free execution that simply doesn't do any of the things it is supposed to do.
It looks to me like a missing DLL that the "framework" backs out of so gracefully that it doesn't even hiccup. It's as iff the framework is saying. "You know what, I'm supposed to pump all this stuff down to the client now and transfer execution to him, but I can't because I cannot find any of the stuff I am supposed to pump down to the client. The good news is that I can execute successfully without ever transfering control so I will just do complete postbacks so that I will still run and all my data will get taken care of any everything will be hunky dory."
That is usually a good assumption to make. And it's rare for software to face such a win win scenario. The only problem is that it leaves the befudled engineer with no clue as to what went wrong. Personally I'd rather see the stuff blow up with lots of information. If there are any MS people lurking about, please take note of this: what would be good behavior in a real time environment is not good behavior in a development environment. It would be nice if the AJAX "framework" could check the debug uptions in the web.config and blow up like an atom bomb if there is anything wrong, with lots of information, when debug is on.
Or, I could be all wet and it could be a completely different problem.
Still, if I am right about this, it probably points to an intermittent but in the installer script file. Again, if there are any lurkers from MS, you might want to take a look at this.
No comments:
Post a Comment