PlaceHolder를 사용하는 ASP.NET 페이지가 있습니다. 그리드는 프로그래밍 방식으로 빌드되며 페이지가 실행될 때이 PlaceHolder에 추가됩니다. 예 :IE8에서 동적 PlaceHolder를 사용할 때 "웹 페이지를 표시 할 수 없습니다"라고 말합니다.
ASPX 코드 : 뒤에
<asp:PlaceHolder ID="myPlaceHolder" runat="server" />
코드 :
foreach (var country in Tables.Countries())
{
var nGrid = BuildGrid(country.Code);
if (nGrid.Rows.Count > 0)
{
var lTitle = new Literal();
lTitle.Text = "<h2>Stats for country " + country.Name + "</h2>";
myPlaceHolder.Controls.Add(lTitle);
myPlaceHolder.Controls.Add(nGrid);
}
nGrid.Dispose();
}
private GridView BuildGrid(short countryCode)
{
GridView nGrid = new GridView();
nGrid.ID = "gr_" + countryCode;
nGrid.SkinID = "rpSkin";
nGrid.AutoGenerateColumns = false;
nGrid.AllowPaging = false;
nGrid.AllowSorting = false;
nGrid.RowStyle.VerticalAlign = VerticalAlign.Top;
nGrid.EnableViewState = false;
var nField = new BoundField
{
HeaderText = "People",
DataField = "PeopleCount"
};
nGrid.Columns.Add(nField);
// more BoundFields of this type exist
// This is basically the GridViewHelper class that gets Row Totals
// Disabling this doesn't help, either
HelpGrid(nGrid);
nGrid.DataSource = Country.GetPeople(countryCode);
nGrid.DataBind();
return nGrid;
}
이 페이지는 오페라와 파이어 폭스에서 완벽하게 작동합니다. Internet Explorer 8에 "웹 페이지를 표시 할 수 없습니다"라는 메시지가 나타납니다.
아이디어가 있으십니까?
aspx 코드도 포함 할 수 있습니다. –
그냥 간단한 자리 표시 자 ... 포함하도록 게시물을 업데이트했습니다. – Jim
어떤 HTML이 IE를 먼저 위반하는지 식별해야합니다. 그런 다음 ASP.NET 요소가 원인 인 범위를 좁힐 수 있습니다. –