[Mono-bugs] [Bug 45658][Wis] Changed - XSP --> <asp:button> code gets executed but postback loads invalid page
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Tue, 1 Jul 2003 10:56:59 -0400 (EDT)
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 tpsoftware@users.sourceforge.net.
http://bugzilla.ximian.com/show_bug.cgi?id=45658
--- shadow/45658 Tue Jul 1 10:06:04 2003
+++ shadow/45658.tmp.17778 Tue Jul 1 10:56:58 2003
@@ -1,12 +1,12 @@
Bug#: 45658
Product: Mono/Runtime
Version: unspecified
OS: Debian Woody
OS Details: Bonzai 1.8
-Status: NEEDINFO
+Status: REOPENED
Resolution:
Severity: Unknown
Priority: Wishlist
Component: misc
AssignedTo: mono-bugs@ximian.com
ReportedBy: tpsoftware@users.sourceforge.net
@@ -86,6 +86,194 @@
Console.WriteLine).
Where's the GetObjects () method?
Also i need a self-contained sample to check that this is a bug and
fix it.
+
+------- Additional Comments From tpsoftware@users.sourceforge.net 2003-07-01 10:56 -------
+This is the full code of the page.
+I ran the same page against
+.NET: IIS6 and Cassini (Cassini is like XSP but by MS)
+Mono: XSP (cvs)
+
+On IIS6 and Cassini works fine but with XSP I get the
+"page not found" after postback.
+----------------------------------------------------------------
+
+
+<%@ Page Language="C#" %>
+<%@ import Namespace="System.Web" %>
+<%@ import Namespace="ByteFX.Data.MySQLClient" %>
+<%@ import Namespace="System.Data" %>
+<script runat="server">
+
+ // Insert page code here
+ //
+
+ string connectionString = @"Data
+Source=10.0.0.14;Port=3306;Database=xgdev;User
+ID=w9user;Password=45edzs;COMMAND LOGGIN=false";
+
+ void Page_Load(object sender, EventArgs e) {
+
+ if (!Page.IsPostBack)
+ GetObjects();
+
+ }
+
+ void GetObjects(){
+
+ //Create a new connection object
+ MySQLConnection dbConnection = new MySQLConnection
+(connectionString);
+
+ //Create the query string
+ string sqlQuery = "SELECT name, author,status FROM object";
+
+ //Create a new command object
+ MySQLCommand dbCommand = new MySQLCommand
+(sqlQuery,dbConnection);
+
+ //Open the connection
+ dbConnection.Open();
+
+ //Create a new DataAdapter
+ MySQLDataAdapter dbAdapter = new MySQLDataAdapter(dbCommand);
+
+ //Create a new DataSet
+ DataSet dbObjects = new DataSet();
+
+ //Fill it
+ dbAdapter.Fill(dbObjects,"objects");
+
+ //Close the data adapter
+ dbConnection.Close();
+
+ //Bind
+ dgrObjects.DataSource = dbObjects.Tables["objects"];
+ dgrObjects.DataBind();
+ }
+
+ void btnAdd_Click(object sender, EventArgs e) {
+
+ //Create a new connection object
+ MySQLConnection dbConnection = new MySQLConnection
+(connectionString);
+
+ //Create the query string
+ string sqlQuery = "INSERT INTO object
+(name,description,author) VALUES ('" + txtObjectname.Text.ToUpper()
++ "','" + txtDescription.Text + "','" + txtUsername.Text + "')";
+
+ //Create a new command object
+ MySQLCommand dbCommand = new MySQLCommand
+(sqlQuery,dbConnection);
+
+ //Open the connection
+ dbConnection.Open();
+
+ //Execute the query
+ dbCommand.ExecuteNonQuery();
+
+ //Close the connection
+ dbConnection.Close();
+
+
+ txtObjectname.Text = "";
+ txtDescription.Text = "";
+
+ GetObjects();
+
+ }
+
+ /* Structure of the table
+
+ id int(11) No Primary auto_increment
+ name varchar(50) Yes None
+ description text No None
+ status enum
+('pending','redundant','irrelevant','vague','nonquantifiable','attribu
+te','method','role') No None pending
+ author varchar(50)
+
+ */
+
+</script>
+<html>
+<head>
+</head>
+<body>
+ <form runat="server">
+ <p>
+ </p>
+ <h3><strong>XGS - Development Phase I - <em>Finding the
+objects</em></strong>
+ </h3>
+ <p>
+ </p>
+ <p>
+ <strong>Current objects:</strong>
+ </p>
+ <p>
+ <asp:DataGrid id="dgrObjects" runat="server" Width="100%"
+BorderStyle="None" BorderWidth="1px" BorderColor="#CCCCCC"
+BackColor="White" CellPadding="3">
+ <FooterStyle forecolor="#000066"
+backcolor="White"></FooterStyle>
+ <HeaderStyle font-bold="True" forecolor="White"
+backcolor="#006699"></HeaderStyle>
+ <PagerStyle horizontalalign="Left"
+forecolor="#000066" backcolor="White"
+mode="NumericPages"></PagerStyle>
+ <SelectedItemStyle font-bold="True" forecolor="White"
+backcolor="#669999"></SelectedItemStyle>
+ <ItemStyle forecolor="#000066"></ItemStyle>
+ </asp:DataGrid>
+ </p>
+ <hr align="center" color="steelblue" />
+ <!-- Insert content here -->
+ <p>
+ <strong>Add a new object:</strong>
+ </p>
+ <p>
+ <table cellspacing="2" cellpadding="2" width="100%">
+ <tbody>
+ <tr>
+ <td width="50%">
+ Object name:<br />
+ <asp:TextBox id="txtObjectname"
+runat="server" Width="100%"></asp:TextBox>
+ </td>
+ <td>
+ Your name:<br />
+ <asp:TextBox id="txtUsername"
+runat="server" Width="100%"></asp:TextBox>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Description:<br />
+ <asp:TextBox id="txtDescription"
+runat="server" Width="100%" Height="100px"
+TextMode="MultiLine"></asp:TextBox>
+ </td>
+ <td>
+ <p align="center">
+ * By default all objects will have
+the status "pending"<br />
+ <br />
+ <asp:Button id="btnAdd"
+onclick="btnAdd_Click" runat="server" Text="Add"></asp:Button>
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </p>
+ <hr align="center" color="steelblue" />
+ <p align="left">
+ </p>
+ </form>
+</body>
+</html>
+