如何理解动态HTML在Visual Studio 2008?动态、HTML、Visual、Studio

2023-09-11 00:41:28 作者:我没那么多精力讨好每个人

我想更新由其他人大约5年前做了一个VB.NET Web项目使用Visual Studio 2008。

I'm trying to update a VB.NET Web Project done by someone else about 5 years ago using Visual Studio 2008.

我难倒对现在的Web窗体有两个(2)的 ASP的GridView 控制,我似乎在告诉不能在的ImageButton 是评估(或失败)。

The webform I am stumped on now has two (2) ASP GridView controls, and I can't seem to tell how an ImageButton is evaluating (or failing).

我需要修复的故障部件!

I need to fix the failing part!

下面是一个的的GridView 控制在的ImageButton ibComplete 是失败的:

Below is a GridView control with the ImageButton ibComplete that is failing:

<asp:GridView ID="GridView1" Font-Size="Small" AllowPaging="true" PageSize="25" OnRowCommand="gridview1_RowCommand" OnSelectedIndexChanged="gridview1_SelectedIndexChanged" OnRowDataBound="gridview1_RowDataBound" runat="server" Visible="False" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" Width="950px" BackColor="White" DataKeyNames="partid,primary_vendor,PART_DESCRIPTION,PRI_VENDOR_NAME,MIN_REORD_QTY,PUOM,Revised_Date">
  <Columns>
    <asp:TemplateField HeaderText="">
      <ItemStyle Width="30px" />
    <ItemTemplate>
      <asp:ImageButton ID="ibComplete" CommandName="Complete" Width="17px" Height="15px" ImageUrl="~/Images/uncheck.jpg" runat="server" CommandArgument="<%# CType(Container,GridViewRow).RowIndex %>" />
    </ItemTemplate>
    <HeaderTemplate>
      <asp:LinkButton ID="lbaddAll" CommandName="AddAll" runat="server">All</asp:LinkButton>
    </HeaderTemplate>
  ...

确定,对于ImageButton的ibComplete,我已经在RowCommand设置断点:

OK, for the ImageButton ibComplete, I have set a breakpoint on the RowCommand:

Protected Sub gridview1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs)
  Try
    Dim GridView1 As GridView = CType(gvVendor.SelectedRow.FindControl("GridView1"), GridView)
    m_emp = m_master.Employee ' EmployeeManager.getEmployeeListByEmpLogin(empName.Trim)
    If e.CommandName = "Complete" Then

然而,它是不断打之前,我有一些奇怪的看着EVAL code的文件,该文件在这里抛出一个错误:

However, before it is ever hit, I have some odd looking "eval code" file that is throwing an error here:

_endPostBack: function PageRequestManager$_endPostBack(error, executor, data) {
    if (this._request === executor.get_webRequest()) {
        this._processingRequest = false;
        this._additionalInput = null;
        this._request = null;
    }

    var eventArgs = new Sys.WebForms.EndRequestEventArgs(error, data ? data.dataItems : {}, executor);
    Sys.Observer.raiseEvent(this, "endRequest", eventArgs);
    if (error && !eventArgs.get_errorHandled()) {
        throw error;
    }
},

该错误,通过VS2008 GUI报道,仅仅是这样的:

The error, reported through the VS2008 GUI, is simply this:

JavaScript的运行时错误:   Sys.WebForms.PageRequestManagerServerErrorException:输入字符串的不正确的格式

JavaScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Input string was not in a correct format.

这code甚至没有在我的文档存在,而在VS2008的选项卡它,它被称为 ScriptResource.a ... cf8d3f2 [动态] 。它,只要我停下我的项目消失了,所以我真的不能编辑它的任何。

This code doesn't even exist in my document, and on the tab for it in VS2008, it is called ScriptResource.a...cf8d3f2 [dynamic]. It vanishes as soon as I stop my project, so I can't really edit any of it.

我意识到这是非常困难的最了解,而且我很可能需要包括别的东西有人能够回答我。没关系!只要告诉我什么,我需要包括。

I realize this is very hard for most to understand, and that I'll likely need to include something else for someone to be able to answer me. That's fine! Just tell me what I need to include.

推荐答案

这可能是一个问题,在IE 10做出了改变,发送的图像输入坐标以十进制格式,而不是为整数。

This is likely an issue with a change made in IE 10 that sends the coordinates of Image inputs in decimal format instead of as integers.

一些建议的修复包括:

升级到.NET 4.5框架

设置兼容模式IE8 / 9 Upgrading to the .Net 4.5 Framework

Setting compatibility mode to IE8/9

META HTTP-当量=X-UA-Compatible的内容=IE = 8

meta http-equiv="X-UA-Compatible" content="IE=8"

应用这些补丁:

.NET 4.0中

http://support.microsoft.com/kb/2836939

NET 2.0

http://support.microsoft.com/kb/2836943

http://support.microsoft.com/kb/2836942

错误报告的网址是https://connect.microsoft.com/VisualStudio/feedback/details/755419/asp-net-4-0-and-ie10-click-on-imagebutton-in-updatepanel-produces-error-click-on-normal-button-does-not