gridview和ajax [英] gridview and ajax

查看:151
本文介绍了gridview和ajax的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


在我的应用程序中,我在其中使用一个自动完成扩展器,我们选择了一个客户端,并通过使用此隐藏字段将选定的客户端ID保留在隐藏字段中,我们在网格视图中填充了一些客户端列表,为此,我得到了从隐藏字段中获取客户端ID并从列表中的数据库中获取所需的记录,我们尝试分配网格视图的数据源和绑定,但是在数据绑定后网格未填充,并且在脚本错误中得到了以下错误然后我调试应用程序,一切正常,但页面中未填充网格.

如果有人知道原因,或者对此有任何解决方案,请在这里发布

我在网上搜索了一些开发人员建议的ValidateRequest ="false",但它也无法正常运行


错误消息:
Sys.Webforms.PageRequestManagerServerErrorException:在服务器上处理请求时发生未知错误.服务器返回的状态码为:500

大家好,

感谢您的建议,我实现了这一点,但是它在我的应用程序中不起作用.我将会话状态模式用作状态服务器",并且当我将模式更改为"inproc"时它正在工作,但是当我将模式用作"inproc"时,它将导致会话超时提前过期.

因此,当我使用会话模式作为状态服务器并且必须解决该错误时,请提供一种解决方案.请问有什么办法可以解决这个问题

再次感谢您的答复,我认为您可以解决此问题

谢谢并感谢大家

在此先感谢...早期解决方案对我们很有帮助.

谢谢与问候
V.S.R.K. Raju ...

Hi All,


In my application i am using an auto complete extender in this we select an client and we hold the selected client id in hidden field by using this hidden field we populate the some list of clients in the grid view, for this requirement i am getting the client id from the hidden field and getting the required records from database in the list and we try assign grid view''s data source and binding but the grid is not populating after data binding and we are getting the following error in i.e like script error and i debug the application every thing works fine but grid was not populating in the page.

please if any body knows the reason for this please or any solution to this please post here

and i am searched on the net some of developers suggested ValidateRequest="false" but it also not working


Error Message:
Sys.Webforms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was : 500

Hi All,

Thanks for you suggestion and i implemented this but it is not working and here in my application. i am using the session state mode as "state server" and when i am changing the mode to "inproc" it is working but when i am using the mode as "inproc" it causes session timeout expiring early.

so please provide an solution when i am using the session mode as state server and the error must be resolved. please is there any way to solve this problem

and once again thanks for your reply and i think u give solution to this problem

Thanks and regard to all

Thanks in advance... early solutions are helpful to us.

Thanks and Regards
V.S.R.K.Raju...

推荐答案

以下是最常见的原因以及发生PageRequestManagerParserErrorException的原因:
1.Response.Write()的调用:
通过直接调用Response.Write(),您可以绕过ASP.NET控件的常规呈现机制.您编写的位将直接发送给客户端,而无需进一步处理(嗯,主要是...).这意味着UpdatePanel无法以其特殊格式对数据进行编码.
2.响应过滤器:
与Response.Write()类似,响应筛选器可以以不知道UpdatePanel的方式更改呈现.
3.HttpModules:
同样,与Response.Write()和响应过滤器相同.
4.启用服务器跟踪:
如果我要再次实现跟踪,那么我会做不同的事情.使用Response.Write()可以有效地记录跟踪,从而弄乱了我们用于UpdatePanel的特殊格式.
5.对Server.Transfer()的调用:
不幸的是,无法检测到Server.Transfer()被调用.这意味着当有人调用Server.Transfer()时,UpdatePanel无法执行任何智能操作.发送回客户端的响应是您传输到的页面的HTML标记.由于其HTML格式而非特殊格式,因此无法对其进行解析,并且会出现错误.

避免它们,它将得到解决!

另外:
一个人有这个问题,因为在ObjectDataSource中,他正在实际的ASPX代码背后调用方法,而代码背后却在执行类似UpdatePanel.Update()之类的事情,所以整个事情都搞砸了.只要检查您是否有类似的问题?您是在执行选择或更新方法的调用代码,而代码又对控件做了什么?
Here are the most common reasons and why PageRequestManagerParserErrorException occurs:
1.Calls to Response.Write():
By calling Response.Write() directly you are bypassing the normal rendering mechanism of ASP.NET controls. The bits you write are going straight out to the client without further processing (well, mostly...). This means that UpdatePanel can''t encode the data in its special format.
2.Response filters:
Similar to Response.Write(), response filters can change the rendering in such a way that the UpdatePanel won''t know.
3.HttpModules:
Again, the same deal as Response.Write() and response filters.
4.Server trace is enabled:
If I were going to implement trace again, I''d do it differently. Trace is effectively written out using Response.Write(), and as such messes up the special format that we use for UpdatePanel.
5.Calls to Server.Transfer():
Unfortunately, there''s no way to detect that Server.Transfer() was called. This means that UpdatePanel can''t do anything intelligent when someone calls Server.Transfer(). The response sent back to the client is the HTML markup from the page to which you transferred. Since its HTML and not the special format, it can''t be parsed, and you get the error.

Avoid them and it will be resolved!

Also:
A guy has this problem because, in the ObjectDataSource he was calling methods on the actual ASPX codebehind and the codebehind was doing something like UpdatePanel.Update() so the whole thing was getting screwed up. Just check if you have a similar problem? Are your doing a select or update method calling code that is in turn doing something to the controls?


您能不能把代码放在....

abraheem abulubbad
can u put the code please ....

abraheem abulubbad


这篇关于gridview和ajax的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆