dropdownlist with autopostback error


a dropdownlist with autopostback set to true inside of a UFrame, seems to cause a "Microsoft JScript runtime error: 'theForm.__EVENTTARGET' is null or not an object" error.


zhungtran wrote Feb 16, 2009 at 4:21 AM

i have tested but not see the error like that

wrote Sep 30, 2009 at 5:42 PM

KenPalmer wrote Sep 30, 2009 at 5:44 PM

I'm having the same problem. My current form is fairly complex with multiple tabs and user controls, so I'll try to narrow it down to limit the options first.

KenPalmer wrote Sep 30, 2009 at 7:44 PM

This problem is easy to replicate with the sample code. I'm working in VS 2008. Here are the steps:
  1. Download the following Version/Change Set from Codeplex: 17244 - Oct 19, 2008, and unzip it for step 3.
  2. Create a new C# web project.
  3. With the exception of the Solution file, drag the files from trunk/Examples/VS2005 into the new project.
  4. Set the Start Page to default.aspx and run the code in debugger to make sure it all works.
  5. Now in the Default.aspx file add the following:
    <asp:DropDownList runat="server" ID="ddlTest" AutoPostBack="true"
    <asp:ListItem Value="0" Text="[Please Select]" />
    <asp:ListItem Value="1" Text="Option 1" />
    <asp:ListItem Value="2" Text="Option 2" />
    <asp:ListItem Value="3" Text="Option 3" />
  6. In the Default.aspx.cs file add the following:
    protected void ddlTest_SelectedIndexChanged(object sender, EventArgs e)
    string x = string.Empty;
  7. Run the site again. You should see the dropdown list with the options indicated above.
  8. Select any option from that list.
  9. A javascript error will appear:
    Microsoft JScript runtime error: 'theForm.__EVENTTARGET' is null or not an object
  10. Select the "Break" button. Another alert will appear:
    There is no source code available for the current location.
The following post looked like it might fix the issue, but trying this did not solve my problem.

I hope you are able to correct this, because it appears to be a really great control. Thanks for your hard work on this.

wrote Feb 14, 2013 at 8:13 PM