- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在我的一个页面上,我的动态链接在 IE10 中运行良好,但在 Chrome 或通过我的 Windows 手机上的资源管理器中不起作用。在 Chrome 中,当我尝试单击任何动态链接时,我得到“未定义 WebForm_DoPostBackWithOptions”。我做了很多研究,并尝试在 IIS 8 的处理程序映射中修改 ISAPI 过滤器的设置,但这没有用。请帮忙。我难住了。
更新:这在 Firefox 中也不起作用。此页面上的动态链接似乎仅在 IE10 中有效。链接是从我的代码隐藏生成的。奇怪的是,在其他页面上,链接的生成方式不同,href 上的 javascript 不同,但我在代码隐藏中创建 anchor 的方式完全相同。
这是“坏” anchor 的代码:
Dim anchName As New HtmlAnchor
anchName.ID = "bcrasodiuhf" & foo
AddHandler anchName.ServerClick, AddressOf HandleNameClick
anchName.Attributes.Add("style", "font-weight: bold; font-size: 14px;")
anchName.Attributes.Add("for", foo)
anchName.InnerText = foo
<a id="MainContent_bcrasodiuhf1" **href="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBac…0$MainContent$bcrasodiuhf1", "", true, "", "", false, true))**" for="1" style="font-weight: bold; font-size: 14px;"></a>
Dim ancJoe As New HtmlAnchor
ancJoe.ID = "pjancJoe" & foo
AddHandler ancJoe.ServerClick, AddressOf HandleJoeClick
ancJoe.InnerText = joe.Title
ancJoe.Attributes.Add("style", "font-size: 150%;")
ancJoe.Attributes.Add("jn", foo)
ancJoe.Attributes.Add("for", foo)
ancJoe.Attributes.Add("action", "actionA")
<a id="MainContent_pcancJoe19416" **href="javascript:__doPostBack('ctl00$MainContent$pcancJoe19416','')"** action="actionA" for="194" jn="foo foo" forc="16" style="font-size: 150%;"></a>
最佳答案
相应的 JS 代码(即 WebForm_DoPostBackWithOptions(options))是一个内置部分,并且是动态链接的。页面的 ScriptManager 正在生成正确的 URL。
考虑到您提到您正在使用 URL 重写,请尝试检查 WebResource.axd?d=XXX 之类的 URL 是否未被忽略/重写。
此外,可能值得查看 IIS 处理程序映射配置,以确保将 .axd 资源映射到标准 ISAPI 模块处理程序。
关于asp.net - WebForm_DoPostBackWithOptions 未使用 chrome 定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23184579/
我有一个这样声明的按钮: 但是如果我在浏览器中检查元素,它会显示如下: 我想知道onclick事件从何而来?它有什么作用? 感谢您提前提供的帮助。 最佳答案 如果您为 Button 服务器控件设
我下载并设置了 MS 的 Stock Trader 应用程序。我正在运行 Vista Ultimate、IIS7、VS 2008/.NET 3.5。整个应用程序大约有 120 MB,因此非常复杂,但在
我正在尝试使用 selenium 抓取显示搜索结果列表的 aspx 网站;当脚本“点击”一个按钮时,会弹出一个警报 - 我尝试使用 EC.alert_is_present“点击”警报按钮继续到下一页,
我需要我的页面在 JavaScript 被禁用时正常工作。但是我的按钮正在输出 onclick="WebForm_DoPostBackWithOptions..."。当我设置 CauseValidat
在我的页面上,此链接无效。 Update & Return 我如何调试以找出阻止此代码提交的字段,以便我修复错误? 最佳答案 Chrome 最适合我: 我点击了右上角的 Spanner 。 我
IE11 来了。我刚刚安装了开发者预览版。但是,如果我运行某些 Web 应用程序并收到错误 WebForm_DoPostBackWithOptions未定义。 当我玩自动回发时出现错误DropDown
我在 ASP.NET Webforms 登录页面上遇到了 iPhone/Droids/iPad 最奇怪的问题。 一切正常,用户名/密码 Javascript 验证触发一切......当用户按下提交时,
在我的一个页面上,我的动态链接在 IE10 中运行良好,但在 Chrome 或通过我的 Windows 手机上的资源管理器中不起作用。在 Chrome 中,当我尝试单击任何动态链接时,我得到“未定义
变量options.eventTarget从哪里来? 如果此函数是由 ASP.NET 代码生成的,我该如何为 Mozilla 修复此函数? 这个 JavaScript 函数有什么用? 当调用 anch
我们在我的专用服务器上设置了一个新域,我的旧域在其中运行良好。 我的网站是用 asp.net 构建的。 在新域上,我有一份在旧域上运行的代码副本。两个站点都在同一个专用服务器上。当我尝试在新站点上执行
我是一名优秀的程序员,十分优秀!