[Mono-list] ASP.Net only partially working
Rui Fernandes
ruister@yahoo.com
Thu, 6 Jan 2005 23:09:56 -0800 (PST)
Hi,
I just began a project for which I would like to use ASP.Net and mono, but I am
having difficulties getting things to work on my system. I am running debian
2.6.9 and mono 1.0.4
I got code from a web tutorial and it worked fine, but when I put a simple
Response.Write line it failed. I believe the problem has to do with my
environment configuration, I am using XSP and it seems like it cannot find
something it needs in order to process the Response.write. I have include the
source code as well and the error message given by XSP.
Any help is greatly appreciated,
-Rui
+++++++++++++++ Source Code
<%@ Page Language="C#" %>
<script runat="server">
void Button1_Click(object sender, EventArgs e)
{
titleTag.InnerText = "You clicked the button!";
}
void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
titleTag.InnerText = "Page has loaded";
}
</script>
<html>
<head>
<title runat="server" id="titleTag"/>
</head>
<body>
<p><% Response.Write("Hello World!") %></p>
<form runat="server">
<asp:Button id="Button1" OnClick="Button1_Click" runat="server"
Text="Button"/>
</form>
</body>
+++++++++++++++++++++++++++++++++++
++++++++++++++ XSP Error message
Server Error in '/' Application
Compilation Error
Description: Error compiling a resource required to service this request.
Review your source file and modify it to fix this error.
Error message: /tmp/10335.0.cs(84,0) : error CS1002: ; expected
/tmp/10335.0.cs(84,0) : error CS1002: Expecting `;' (0,0) : error failed: 2
error(s), 0 warnings
File name: /home/ruister/xsp/index.aspx
Source File: /tmp/10335.0.cs
Line 1: //
------------------------------------------------------------------------------
Line 2: // <autogenerated>
Line 3: // This code was generated by a tool.
Line 4: // Mono Runtime Version: 1.1.4322.573
Line 5: //
Line 6: // Changes to this file may cause incorrect behavior and will be
lost if
Line 7: // the code is regenerated.
Line 8: // </autogenerated>
Line 9: //
------------------------------------------------------------------------------
Line 10:
Line 11: namespace ASP {
Line 12: using System;
Line 13: using System.Collections;
Line 14: using System.Collections.Specialized;
Line 15: using System.Configuration;
Line 16: using System.Text;
Line 17: using System.Text.RegularExpressions;
Line 18: using System.Web;
Line 19: using System.Web.Caching;
Line 20: using System.Web.Security;
Line 21: using System.Web.SessionState;
Line 22: using System.Web.UI;
Line 23: using System.Web.UI.WebControls;
Line 24: using System.Web.UI.HtmlControls;
Line 25:
Line 26: public class index_aspx : System.Web.UI.Page,
System.Web.SessionState.IRequiresSessionState {
Line 27:
Line 28: private static bool __intialized = false;
Line 29:
Line 30: private static int __autoHandlers;
Line 31:
Line 32: protected System.Web.UI.HtmlControls.HtmlGenericControl
titleTag;
Line 33:
Line 34: protected System.Web.UI.HtmlControls.HtmlForm _bctrl_3;
Line 35:
Line 36: protected System.Web.UI.WebControls.Button Button1;
Line 37:
Line 38:
Line 39:
Line 40: void Button1_Click(object sender, EventArgs e)
Line 41: {
Line 42: titleTag.InnerText = "You clicked the button!";
Line 43: }
Line 44:
Line 45: void Page_Load(object sender, EventArgs e)
Line 46: {
Line 47: if (!IsPostBack)
Line 48: titleTag.InnerText = "Page has loaded";
Line 49: }
Line 50:
Line 51:
Line 52: public index_aspx () {
Line 53: if ((ASP.index_aspx.__intialized == false)) {
Line 54: ASP.index_aspx.__intialized = true;
Line 55: }
Line 56: }
Line 57:
Line 58: protected override int AutoHandlers {
Line 59: get {
Line 60: return ASP.index_aspx.__autoHandlers;
Line 61: }
Line 62: set {
Line 63: ASP.index_aspx.__autoHandlers = value;
Line 64: }
Line 65: }
Line 66:
Line 67: protected System.Web.HttpApplication ApplicationInstance {
Line 68: get {
Line 69: return
((System.Web.HttpApplication)(this.Context.ApplicationInstance));
Line 70: }
Line 71: }
Line 72:
Line 73: public override string TemplateSourceDirectory {
Line 74: get {
Line 75: return "/";
Line 76: }
Line 77: }
Line 78:
Line 79: private void __RenderTree(System.Web.UI.HtmlTextWriter
__output, System.Web.UI.Control parameterContainer) {
Line 80: __output.Write(" \n<html> \n<head> \n");
Line 81: parameterContainer.Controls[0].RenderControl(__output);
Line 82: __output.Write(" \n</head> \n<body>\n<p>");
Line 83: Response.Write("Hello World!")
Line 84: __output.Write("</p> \n");
Line 85: parameterContainer.Controls[1].RenderControl(__output);
Line 86: __output.Write(" \n</body> \n</html>");
Line 87: }
Line 88:
Line 89: private void __BuildControlTree(System.Web.UI.Control __ctrl)
{
Line 90: this.__BuildControl_titleTag();
Line 91: System.Web.UI.IParserAccessor __parser =
((System.Web.UI.IParserAccessor)(__ctrl));
Line 92: __parser.AddParsedSubObject(this.titleTag);
Line 93: this.__BuildControl__bctrl_3();
Line 94: __parser.AddParsedSubObject(this._bctrl_3);
Line 95: __ctrl.SetRenderMethodDelegate(new
System.Web.UI.RenderMethod(this.__RenderTree));
Line 96: }
Line 97:
Line 98: private System.Web.UI.Control __BuildControl_titleTag() {
Line 99: System.Web.UI.HtmlControls.HtmlGenericControl __ctrl;
Line 100: __ctrl = new
System.Web.UI.HtmlControls.HtmlGenericControl("title");
Line 101: this.titleTag = __ctrl;
Line 102: __ctrl.ID = "titleTag";
Line 103: return __ctrl;
Line 104: }
Line 105:
Line 106: private System.Web.UI.Control __BuildControl__bctrl_3() {
Line 107: System.Web.UI.HtmlControls.HtmlForm __ctrl;
Line 108: __ctrl = new System.Web.UI.HtmlControls.HtmlForm();
Line 109: this._bctrl_3 = __ctrl;
Line 110: System.Web.UI.IParserAccessor __parser =
((System.Web.UI.IParserAccessor)(__ctrl));
Line 111: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl(" \n "));
Line 112: this.__BuildControl_Button1();
Line 113: __parser.AddParsedSubObject(this.Button1);
Line 114: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl(" \n"));
Line 115: return __ctrl;
Line 116: }
Line 117:
Line 118: private System.Web.UI.Control __BuildControl_Button1() {
Line 119: System.Web.UI.WebControls.Button __ctrl;
Line 120: __ctrl = new System.Web.UI.WebControls.Button();
Line 121: this.Button1 = __ctrl;
Line 122: __ctrl.ID = "Button1";
Line 123: __ctrl.Text = "Button";
Line 124: __ctrl.Click += new
System.EventHandler(this.Button1_Click);
Line 125: return __ctrl;
Line 126: }
Line 127:
Line 128: protected override void FrameworkInitialize() {
Line 129: this.TraceModeValue = System.Web.TraceMode.SortByTime;
Line 130: this.Request.ValidateInput();
Line 131: this.__BuildControlTree(this);
Line 132: }
Line 133:
Line 134: public override int GetTypeHashCode() {
Line 135: return 553470812;
Line 136: }
Line 137: }
Line 138:
Line 139: }
</html>
=====
-------------------------
Rui Fernandes
ruister@yahoo.com
Boston - USA
-------------------------
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com