没有自动回发功能在 ASP.NET 页面上运行

发布于 2024-11-17 12:23:36 字数 261 浏览 6 评论 0原文

我有一个 asp.net 页面,存在某种数据加载问题。我试图找到坏数据,但坏数据的结果是页面上没有控件会自动回发。页面上的链接按钮、下拉列表等在单击时绝对不会执行任何操作。我只是想知道,有谁知道页面上的 javascript 或 html 会出现什么问题,导致控件不再工作?我什至在页面上有一个来自 Telerik 的 radtabbar,单击时它也没有任何反应。如果有人对我应该寻找什么有任何想法,我将非常感激。如果我能看到页面上有什么问题,那将帮助我找出数据失败的地方......

谢谢!

I have an asp.net page that has some sort of data load problem. I'm trying to find the bad data, but the result of the bad data is that no control on the page will autopostback. Linkbuttons, Dropdown Lists, etc. on the page do absolutely nothing when clicked. I was just wanting to know, does anyone know what would be wrong as far as javascript or html, on the page that could cause no controls to work anymore? I even have a radtabbar from Telerik on the page and it does nothing when clicked as well. If anyone has any ideas of what I should look for, I'd be very appreciative. If I can maybe see what's wrong on the page, that would help me track down where the data is failing...

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

很糊涂小朋友 2024-11-24 12:23:36

没有什么比 5000 多行代码更糟糕的了,它们都可能是罪魁祸首(据您所知)。我会检查标记或代码隐藏中发生的所有 JavaScript。可能存在 JavaScript 处理任何表单提交并取消它们的情况。这将导致不会发生回发。

还要检查您的代码背后是否实现了接口IPostBackHandler。该接口所需的方法是RaisePostBackEvent(string args)。此方法中可能存在错误,或多或少会吞掉回发。

底线是,有很多很多的可能性。

Nothing worse than 5000+ lines of code that could all be the culprit (as far as you are aware). I would examine all the javascript that is occurring in either the markup or code behind. It may be the case that there is javascript handling any form submits and cancelling them. This would cause no post backs to occur.

Also check if your code behind implements the interface IPostBackHandler. The method required by the interface is RaisePostBackEvent(string args). There could be bugs in this method somehow swallowing post backs more or less.

Bottom line, lots and lots of possibilities.

无可置疑 2024-11-24 12:23:36

我遇到了类似的问题,一个流氓“div”与我的控件重叠而不可见,并使它们无法使用。

I had a similiar problem with a rogue 'div' overlapping my controls without being visible and rendered them unusable.

月下伊人醉 2024-11-24 12:23:36

确保在您的 @Page 中 AutoEventWireup="true"

Make sure in your @Page that AutoEventWireup="true"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文