[Mono-bugs] [Bug 449793] New: Font info not serialized in the viewstate
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Nov 27 10:56:35 EST 2008
https://bugzilla.novell.com/show_bug.cgi?id=449793
Summary: Font info not serialized in the viewstate
Product: Mono: Class Libraries
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Sys.Web
AssignedTo: mhabersack at novell.com
ReportedBy: informatique.internet at fiducial.fr
QAContact: mono-bugs at lists.ximian.com
Found By: ---
This bug cause problems when dealing with datagrid on our workflow
application...
It seems that the font information of a style isn't serialized in the viewstate
Step to reproduce
try this aspx
<%@ Page language="c#" %>
<script language="C#" runat="server">
void Page_Load(object sender, System.EventArgs e)
{
if (!IsPostBack) {
myLbl.Text="ok";
Style myStyle = new Style();
myStyle.ForeColor = System.Drawing.Color.Red;
myStyle.Font.Bold=true;
myLbl.ApplyStyle(myStyle);
}
}
</script>
<html>
<head>
</head>
<body>
<form runat="server">
<asp:Label id="myLbl"
runat="server"></asp:Label>
<asp:Button id="myButton"
runat="server"></asp:Button>
</form>
</body>
</html>
Run xsp
a red fold ok should appear :
Click on ok and boom:
Server Error in '/' Application
Object reference not set to an instance of an object
Description: HTTP 500. Error processing request.
Stack Trace:
System.NullReferenceException: Object reference not set to an instance of an
object
at System.Web.UI.WebControls.Style.WriteStyleAttributes
(System.Web.UI.HtmlTextWriter writer) [0x00000]
at System.Web.UI.WebControls.Style.AddAttributesToRender
(System.Web.UI.HtmlTextWriter writer, System.Web.UI.WebControls.WebControl
owner) [0x00000]
at System.Web.UI.WebControls.WebControl.AddAttributesToRender
(System.Web.UI.HtmlTextWriter writer) [0x00000]
at System.Web.UI.WebControls.Label.AddAttributesToRender
(System.Web.UI.HtmlTextWriter writer) [0x00000]
at System.Web.UI.WebControls.WebControl.RenderBeginTag
(System.Web.UI.HtmlTextWriter writer) [0x00000]
at System.Web.UI.WebControls.WebControl.Render (System.Web.UI.HtmlTextWriter
writer) [0x00000]
at System.Web.UI.Control.RenderControl (System.Web.UI.HtmlTextWriter writer)
[0x00000]
at System.Web.UI.Control.RenderChildren (System.Web.UI.HtmlTextWriter writer)
[0x00000]
at System.Web.UI.HtmlControls.HtmlForm.RenderChildren
(System.Web.UI.HtmlTextWriter w) [0x00000]
at System.Web.UI.HtmlControls.HtmlContainerControl.Render
(System.Web.UI.HtmlTextWriter writer) [0x00000]
at System.Web.UI.HtmlControls.HtmlForm.Render (System.Web.UI.HtmlTextWriter
w) [0x00000]
at System.Web.UI.Control.RenderControl (System.Web.UI.HtmlTextWriter writer)
[0x00000]
at System.Web.UI.Control.RenderChildren (System.Web.UI.HtmlTextWriter writer)
[0x00000]
at System.Web.UI.Control.Render (System.Web.UI.HtmlTextWriter writer)
[0x00000]
at System.Web.UI.Control.RenderControl (System.Web.UI.HtmlTextWriter writer)
[0x00000]
at System.Web.UI.Page.RenderPage () [0x00000]
at System.Web.UI.Page.InternalProcessRequest () [0x00000]
at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context)
[0x00000]
Version information: Mono Version: 1.1.4322.2032; ASP.NET Version:
1.1.4322.2032
Could you fix this and provide a patch for 2.0 and 2.2 branch please
Thanks
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list