For the sake of completeness, here is the reply I got from the ASP.NET support folks
Subject: SRX04020960045
*** Problem Description **
Customer has an asp.net application with a dropdown menu and enable autopostback in
a fram
When users selects an item, it will do a postback to server. Before the postback
completes and the page refreshes, click the dropdown menu agai
the frame page will become blank out
Repro files
Main.ht
<html><frameset cols="150,*"><frame name="contents" src=""><frame name="main" src="WebForm1.aspx"></frameset></html
WebForm1.aspx
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false"
Inherits="nastyBug.WebForm1" %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" ><HTML><body MS_POSITIONING="GridLayout" bgColor="lime"><form id="Form1" method="post" runat="server"><asp:DropDownList id="DropDownList1" style="Z-INDEX: 101; LEFT: 29px; POSITION:
absolute; TOP: 27px" runat="server" Width="122px" AutoPostBack="True"><asp:ListItem Value="one">one</asp:ListItem><asp:ListItem Value="two">two</asp:ListItem><asp:ListItem Value="three">three</asp:ListItem><asp:ListItem Value="four">four</asp:ListItem></asp:DropDownList></form></body></HTML><><><><><><><><><><><><><><><><><><><><><><>< ><><><><><><><><><><><><><><><><>
*** Resolution *** Jul 18 2003 12:16PM Amylu
Cause/Resolution
This is a bug with Internet explorer 6.0 sp1.
The original bug, it is closed and moved to longhorn and customer accept
workaroun
http://bugcheck/default.asp?URL=/Bugs/IEOESE/24828.as
New bug: windows bug: 74346
http://bugcheck/default.asp?URL=/Bug...Bugs/743465.as
In the meanwhile, we can workaround the problem by creating a client side onchange
event handler and delay the postback of a second
A better sample suggest by earlb
//need this using for the stringbuilder clas
using System.Text
private void Page_Load(object sender, System.EventArgs e
DropDownList1.Attributes.Add("onchange","testdelay ();")
Page.RegisterClientScriptBlock("dropdown1",CreateC lientFunction(DropDownList1.Uniqu
ID));
private string CreateClientFunction(string str
StringBuilder func = new StringBuilder()
func.Append("<script language=\"jscript\">")
func.Append("function testdelay(){")
func.Append("setTimeout(\"__doPostBack('" + str + "','')\", 1);")
func.Append("}")
func.Append("</script>")
return func.ToString()
================================================== =================================
==============================================
Another code sample snippet (SRX020516602444) to workaround this problem, this puts
the script function at the before the starting HTML tag
private void Page_Load(object sender, System.EventArgs e
//create client site onchange even
DropDownList1.Attributes.Add("onchange","testdelay ()")
WriteFunction(DropDownList1.UniqueID)
// Put user code to initialize the page her
private void WriteFunction(string str
Response.Write("<script
language=\"jscript\">")
Response.Write("function testdelay(){")
Response.Write("setTimeout(\"__doPostBack('" +
str + "','')\", 1);")
Response.Write("}")
Response.Write("</script>")
VB.NET code Snippet
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Loa
'Put user code to initialize the page her
ListBox1.Attributes.Add("onchange", "testdelay()"
WriteFunction(ListBox1.UniqueID
End Su
Private Sub WriteFunction(ByVal str As System.String
Response.Write("<script language=""jscript"">"
Response.Write("function testdelay()")
Response.Write("{")
Response.Write("setTimeout(")
Response.Write("""__doPostBack('DropDownList1','') "", 1);")
Response.Write("}")
Response.Write("</script>")
End Sub
Michael Graham, MCSD
Microsoft Developer Support
(980) 776-9966
mg*****@microsoft.com
Delighting our customers is our top priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please mail us at
ma******@microsoft.com. You can also contact my manager:
Jeremy Chapman
Middleware Team Manager
Office (469) 775-6360
Email -
je*****@microsoft.com
Recent viruses on the Internet underscore the threat to all computer users and highlight challenges facing the entire industry in providing security that everyone needs to conduct business. I encourage you to sign up to receive automatic notification of Microsoft Security Bulletins by visiting
http://www.microsoft.com/technet/tre...tin/notify.asp. For more information on security, our Strategic Technology Protection Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security. We will be happy to answer any questions or provide assistance with your security needs.