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.
精彩评论