开发者

Strange IE8 postback issues with ASP.Net form

I have the following form that works as expected in chrome and firefox but in IE on postback the forms values get lo开发者_JS百科st.

An example is the Email textboxes .Text property comes back empty from IE but not FF.

http://www.openawards.org.uk/CalendarEventRegister.aspx?cid=10

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            SqlCommand sql = new SqlCommand("Select PageTitle from tbContent where Script_Name = 'News.aspx'");
            DataRow dr = Connector.ExecuteDataRow(sql);
            if (dr != null)
                this.Header.Text = dr["PageTitle"].ToString();
            BindMenu();

            PopulateView();
        }
    }

Here is an example textbox

 <asp:TextBox ID="Name" runat="server" />
 <asp:RequiredFieldValidator ID="NameRequiredField" runat="server" ControlToValidate="Name" Text="*" ForeColor="Red" />

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CalendarEventRegister.aspx.cs" Inherits="OCNNWR.CalendarEventRegister" %>

Here is the top of the code behind

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">

I have never seen this bug before can anyone help please?

Thanks


It truns out there was embedded form tags on the page. Firefox and Chrome seemed to handle it fine but IE didn't like it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜