English 中文(简体)
在 SharePoint 中,UpdatePanel 抛出错误。
原标题:UpdatePanel in SharePoint throws an error

在我点击网站部分陈词时,我有以下几点:。 用ID UpdatePanel1进行控制,需要在网页上安装一个文本。 文本管理必须出现在任何需要控制之前。 如果我使用网站,电能进行搜索,我就会发现一个流行错误:Sys.WebForms.PageRequestManagerServerErrorException: 在处理服务器上的请求时出现了一个未知的错误。 从服务器返回的状态代码为:500

此 Web 零件从文本框获取搜索字符串,将其传递给 BL/DAL,并从 DB 返回数据。我已经集成了 UpdatePanel 以进行部分回发 - 使用此博客作为指南,但它不起作用。

我已经按照博客建议使用MSSP设计师将ScriptManager添加到default.master页面中,但奇怪的是,脚本管理器会引起错误(红色下划线)在Internet Explorer 6.0中,不允许使用标记<asp:ScriptManager>

问题回答

我并不完全确定那是怎么回事,但这里有一个替代方案。永远不要使用 MS Ajax,jQuery 更简单、更快、更好、更强、更性感!

这是我通常做这些事情的方式:

  1. add jQuery to your master page head
  2. create a user control that implements your web part ui. This should use Page.ScriptManager.RegistryScriptInclude or .RegistryScriptBlock to insert script for the control. Eg, methods to do your callback using jQuery.Ajax.
  3. create a web part wrapper for the user control
  4. create an aspx in _layouts that acts as the service for your callback. The page load can use the parameters passed from the ajax call to return some json or text

你可以创建一个 Web 服务来代替 #4,但是使用 SharePoint 进行此操作会更加困难——使用 apx 就足够好了。

HTH:希望有帮助

干杯 (gān bēi)





相关问题
SharePoint - Approaching Website Storage Limit Email

How can i go about changing the distribution list as well as the email text for the email that goes out to site collection admin when a site collection approaches it s size limit? Thanks for your ...

UI automated testing within SharePoint

I m looking for automated Functional Testing tools that can manipulate SharePoint sites, libraries, and documents thought the web interface. It needs to be extensible enough to handle any custom ...

Enable authorization on sitemap provider

I want to enable Authorization on the Site map provider. We have enabled anonymous access to the site and we want the Site map provider to be visible only to authorized users. I tried ...

SharePoint : web service permission error

I have a sharepoint site, and I am calling a standard sharepoint web service. I create the web service request like this : wsDws.Url = this.SiteAddress + @"/_vti_bin/Dws.asmx"; When I use ...

Sharepoint 2007 Data view Webpart custom parameters

I m sort of new to the custom parameters that can be setup on a DataView Webpart. There are 6 options: - None - Control - Cookie - Form - QueryString - Server Variable I think that None, Cookie and ...