[Mono-bugs] [Bug 55978][Wis] New - System.Web.UI.WebControls.DataList not working
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Tue, 23 Mar 2004 18:44:54 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by chris@turchin.net.
http://bugzilla.ximian.com/show_bug.cgi?id=55978
--- shadow/55978 2004-03-23 18:44:54.000000000 -0500
+++ shadow/55978.tmp.19909 2004-03-23 18:44:54.000000000 -0500
@@ -0,0 +1,168 @@
+Bug#: 55978
+Product: Mono: Class Libraries
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: Sys.Web
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: chris@turchin.net
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: System.Web.UI.WebControls.DataList not working
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+System.Web.UI.WebControls.DataList not working - running from cvs on
+mandrake 9.1 --- updated mono/mcs/xsp modules all on 2004-03-23...
+
+Steps to reproduce the problem:
+1. add asp:DataList to form
+2. view form in browser
+3. enjoy Error 500 while contemplating another solution without a datalist....
+
+Actual Results:
+
+System.NullReferenceException: Object reference not set to an instance of
+an object
+in <0x0000f> System.Int32:FindSign
+(int&,string,System.Globalization.NumberFormatInfo,bool&,bool&)
+in <0x00430> System.Int32:Parse
+(string,System.Globalization.NumberStyles,System.IFormatProvider)
+in <0x00013> System.Int32:Parse (string,System.IFormatProvider)
+in <0x0001f> System.Convert:ToInt32 (string,System.IFormatProvider)
+in <0x0000e> System.String:System.IConvertible.ToInt32 (System.IFormatProvider)
+in <0x004e8> System.Convert:ToType (object,System.Type,System.IFormatProvider)
+in <0x0003a> System.Convert:ChangeType (object,System.Type)
+in <0x00211>
+System.Web.Compilation.TemplateControlCompiler:GetExpressionFromString
+(System.Type,string)
+in <0x000eb>
+System.Web.Compilation.TemplateControlCompiler:AddCodeForPropertyOrField
+(System.Web.UI.ControlBuilder,System.Type,string,string,bool)
+in <0x00207>
+System.Web.Compilation.TemplateControlCompiler:ProcessPropertiesAndFields
+(System.Web.UI.ControlBuilder,System.Reflection.MemberInfo,string,string)
+in <0x003f8>
+System.Web.Compilation.TemplateControlCompiler:CreateAssignStatementsFromAttributes
+(System.Web.UI.ControlBuilder)
+in <0x0014b>
+System.Web.Compilation.TemplateControlCompiler:CreateControlTree
+(System.Web.UI.ControlBuilder,bool,bool)
+in <0x004b4>
+System.Web.Compilation.TemplateControlCompiler:CreateControlTree
+(System.Web.UI.ControlBuilder,bool,bool)
+in <0x004b4>
+System.Web.Compilation.TemplateControlCompiler:CreateControlTree
+(System.Web.UI.ControlBuilder,bool,bool)
+in <0x00050> System.Web.Compilation.TemplateControlCompiler:CreateMethods ()
+in <0x0000a> System.Web.Compilation.PageCompiler:CreateMethods ()
+in <0x00197> System.Web.Compilation.BaseCompiler:GetCompiledType ()
+in <0x001d8> System.Web.Compilation.AspGenerator:GetCompiledType ()
+in <0x00036> System.Web.UI.PageParser:CompileIntoType ()
+in <0x0001f> System.Web.UI.TemplateControlParser:GetCompiledInstance ()
+in <0x00057> System.Web.UI.PageParser:GetCompiledPageInstance
+(string,string,System.Web.HttpContext)
+in <0x00011> System.Web.UI.PageHandlerFactory:GetHandler
+(System.Web.HttpContext,string,string,string)
+in <0x00395> System.Web.HttpApplication:CreateHttpHandler
+(System.Web.HttpContext,string,string,string)
+in <0x0011f> CreateHandlerState:Execute ()
+in <0x0007e> StateMachine:ExecuteState
+(System.Web.HttpApplication/IStateHandler,bool&)
+
+Expected Results:
+
+three broken images and three links to some file...
+
+How often does this happen?
+
+always... same code compiles and runs in Framework 1.1... this error
+happened with the tabcontrol2.aspx sample as well, i think. its probably
+more fundemental than the datalist itself...
+
+Additional Information:
+
+Sample Code: this (or similar code) could be checked in to the xsp/test/
+folder
+
+########################################################################
+
+<%@ Page Language="C#" %>
+
+<HTML>
+
+ <HEAD>
+
+ <title>DataList</title>
+
+ <script runat="server">
+ void Page_Load (object o, EventArgs e)
+ {
+ if (!IsPostBack) {
+ ArrayList list = new ArrayList ();
+ list.Add (new Data ("Spain"));
+ list.Add (new Data ("Japan"));
+ list.Add (new Data ("Mexico"));
+ dl.DataSource = list;
+ dl.DataBind ();
+ }
+ }
+
+ public class Data
+ {
+ private string name;
+
+ public Data (string testname)
+ {
+ this.name = testname;
+ }
+
+ public string Name
+ {
+ get { return name; }
+ }
+
+ public override string ToString ()
+ {
+ return name;
+ }
+ }
+</script>
+
+ </HEAD>
+
+ <body>
+
+ <h3>Datalist sample</h3>
+
+ <form runat="server" ID="Form1">
+
+ <asp:DataList id="dl" runat="server" RepeatDirection="Horizontal"
+RepeatColumns="5">
+
+ <ItemTemplate>
+
+ <asp:HyperLink id=Hyperlink1 NavigateUrl='<%#
+DataBinder.Eval(Container.DataItem,"Name") %>' ImageUrl='<%#
+string.Concat("thumbnail.ashx?filename=",DataBinder.Eval(Container.DataItem,"Name"))
+%>' Runat="server">
+
+ </asp:HyperLink>
+
+ </ItemTemplate>
+
+ </asp:DataList>
+
+ </form>
+
+ </body>
+
+</HTML>