[Mono-dev] Regression in System.Web
Joe Audette
joe_audette at yahoo.com
Wed Mar 22 21:48:50 EST 2006
Hi Gonzalo,
>Ok. Then I need to know how to reproduce this. Can we get a bug report
filed?
-Gonzalo
<
Through a process of elimination by commenting out code, rebuilding and deploying I was able to pin down the line of code that was raising the error, putting it in a try catch did not stop the error but I found a workaround to fix my page.
It was blowing up on this line even inside a try catch:
ddAvatars.SelectedValue = user.AvatarUrl;
changing to this code resolved the problem:
ListItem itemToSelect = ddAvatars.Items.FindByValue(user.AvatarUrl);
if(itemToSelect != null)
itemToSelect.Selected = true;
ddAvatars is databound to a FileInfo[] of .gif files and the value of user.AvatarUrl was a valid item in the list.
The original code has worked for a long time and does work on windows but currently on mono it produces this error:
System.Web.HttpException: DropDownList only may have a single selected item
in <0x00188> System.Web.UI.WebControls.DropDownList:RenderContents (System.Web.UI.HtmlTextWriter writer)
in <0x00023> System.Web.UI.WebControls.WebControl:Render (System.Web.UI.HtmlTextWriter writer)
in <0x00099> System.Web.UI.Control:RenderControl (System.Web.UI.HtmlTextWriter writer)
in <0x00074> System.Web.UI.Control:RenderChildren (System.Web.UI.HtmlTextWriter writer)
in <0x00011> System.Web.UI.Control:Render (System.Web.UI.HtmlTextWriter writer)
in <0x0000d> System.Web.UI.WebControls.WebControl:RenderContents (System.Web.UI.HtmlTextWriter writer)
in <0x00023> System.Web.UI.WebControls.WebControl:Render (System.Web.UI.HtmlTextWriter writer)
in <0x00099> System.Web.UI.Control:RenderControl (System.Web.UI.HtmlTextWriter writer)
in <0x00074> System.Web.UI.Control:RenderChildren (System.Web.UI.HtmlTextWriter writer)
in <0x00011> System.Web.UI.Control:Render (System.Web.UI.HtmlTextWriter writer)
in <0x0000d> System.Web.UI.WebControls.WebControl:RenderContents (System.Web.UI.HtmlTextWriter writer)
in <0x00023> System.Web.UI.WebControls.WebControl:Render (System.Web.UI.HtmlTextWriter writer)
in <0x00099> System.Web.UI.Control:RenderControl (System.Web.UI.HtmlTextWriter writer)
in <0x00074> System.Web.UI.Control:RenderChildren (System.Web.UI.HtmlTextWriter writer)
in <0x00023> System.Web.UI.HtmlControls.HtmlContainerControl:Render (System.Web.UI.HtmlTextWriter writer)
in <0x00099> System.Web.UI.Control:RenderControl (System.Web.UI.HtmlTextWriter writer)
in <0x00278> ASP.layout_ascx:__Render_frmMain (System.Web.UI.HtmlTextWriter __output, System.Web.UI.Control parameterContainer)
in (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_HtmlTextWriter_Control (System.Web.UI.HtmlTextWriter,System.Web.UI.Control)
in <0x00026> System.Web.UI.Control:RenderChildren (System.Web.UI.HtmlTextWriter writer)
in <0x00055> System.Web.UI.HtmlControls.HtmlForm:RenderChildren (System.Web.UI.HtmlTextWriter w)
in <0x00023> System.Web.UI.HtmlControls.HtmlContainerControl:Render (System.Web.UI.HtmlTextWriter writer)
in <0x0000d> System.Web.UI.HtmlControls.HtmlForm:Render (System.Web.UI.HtmlTextWriter w)
in <0x00099> System.Web.UI.Control:RenderControl (System.Web.UI.HtmlTextWriter writer)
in <0x00074> System.Web.UI.Control:RenderChildren (System.Web.UI.HtmlTextWriter writer)
in <0x00023> System.Web.UI.HtmlControls.HtmlContainerControl:Render (System.Web.UI.HtmlTextWriter writer)
in <0x00099> System.Web.UI.Control:RenderControl (System.Web.UI.HtmlTextWriter writer)
in <0x00074> System.Web.UI.Control:RenderChildren (System.Web.UI.HtmlTextWriter writer)
in <0x00011> System.Web.UI.Control:Render (System.Web.UI.HtmlTextWriter writer)
in <0x00099> System.Web.UI.Control:RenderControl (System.Web.UI.HtmlTextWriter writer)
in <0x002f1> System.Web.UI.Page:InternalProcessRequest ()
in <0x000a4> System.Web.UI.Page:ProcessRequest (System.Web.HttpContext context)
If I get a chance this weekend I will try and produce a test case for the error but thought I would pass along my findings
Cheers,
Joe
More information about the Mono-devel-list
mailing list