0

我有一个 ASP.NET Web 应用程序,它有一个下拉列表,可以拉出学生记录。这适用于所有浏览器、Android OS 和 IOS,除了 windows 平板电脑上的新 IE。有谁知道为什么它不加载或提取信息?

这是一些代码:

<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" 
        DataSourceID="SqlDataSource3"  DataTextField="zName" DataValueField="Id" 
        AppendDataBoundItems="True" 
        onselectedindexchanged="DropDownList1_SelectedIndexChanged">
        <asp:ListItem Value="0">Select</asp:ListItem>
    </asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource3" runat="server" 
        ConnectionString="<%$ ConnectionStrings:TestDBConnectionString1 %>" 
        SelectCommand="SELECT Id, (lName + ', ' + fName) AS zName FROM bleaTest"></asp:SqlDataSource>


<asp:FormView ID="FormView1" runat="server" 
        DataSourceID="SqlDataSource1">
<ItemTemplate>
            <span class="style1">Id:
            <asp:Label ID="IdLabel" runat="server" CssClass="bold" 
                Text='<%# Bind("Id") %>' />
            <br />
            First Name:
            <asp:Label ID="fNameLabel" runat="server" CssClass="bold" 
                Text='<%# Bind("fName") %>' />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Last Name:
            <asp:Label ID="lNameLabel" runat="server" CssClass="bold" 
                Text='<%# Bind("lName") %>' />
            &nbsp;<br /> Gender:
            <asp:Label ID="genLabel" runat="server" CssClass="bold" 
                Text='<%# Bind("gen") %>' />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Agency:
            <asp:Label ID="agencyLabel" runat="server" CssClass="bold" 
                Text='<%# Bind("agency") %>' />
            <br />
            Title:
            <asp:Label ID="titleLabel" runat="server" CssClass="bold" 
                Text='<%# Bind("title") %>' />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </span>
            <br />
        </ItemTemplate>
</asp:FormView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:TestDBConnectionString1 %>" 
        DeleteCommand="DELETE FROM [bleaTest] WHERE [Id] = @Id" 
        SelectCommand="SELECT Id, fName, lName, agency, title, gen, hired, AppS, course, Location, SessNum, SDate, EDate, Hours, SitUps, pushUps, rTime, Grade FROM bleaTest WHERE (Id = @Id)"


        UpdateCommand="UPDATE [bleaTest] SET [fName] = @fName, [lName] = @lName, [agency] = @agency, [title] = @title, [gen] = @gen, [hired] = @hired, [AppS] = @Apps, [course] = @course, [Location] = @Location, [SDate] = @SDate, [EDate] = @EDate, [Hours] = @Hours WHERE [Id] = @Id">
        <DeleteParameters>
            <asp:Parameter Name="Id" Type="Int32" />
        </DeleteParameters>
        <SelectParameters> 
            <asp:ControlParameter ControlID="DropDownList1" Name="Id"  
                PropertyName="SelectedValue" Type="String" /> 

        </SelectParameters>
        <UpdateParameters>
            <asp:Parameter Name="fName" Type="String" />
            <asp:Parameter Name="lName" Type="String" />
            <asp:Parameter Name="Agency" Type="String" />
            <asp:Parameter Name="title" />
            <asp:Parameter Name="gen" />
            <asp:Parameter Name="hired" />
            <asp:Parameter Name="Apps" />
            <asp:Parameter Name="course" />
            <asp:Parameter Name="Location" />
            <asp:Parameter Name="SDate" />
            <asp:Parameter Name="EDate" />
            <asp:Parameter Name="Hours" />
            <asp:Parameter Name="Id" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>

先感谢您!!

4

1 回答 1

1

做了更多的研究并弄清楚了(最后)。出于某种原因或者可能是出于安全原因,IE10 有一个问题,postback 我发现一个很好的链接可能会帮助一些人。

http://www.hanselman.com/blog/BugAndFixASPNETFailsToDetectIE10CausingDoPostBackIsUndefinedJavaScriptErrorOrMaintainFF5ScrollbarPosition.aspx

希望这可以帮助!

于 2012-11-15T17:54:18.317 回答