Hello,
First.. let me apologize if this is not MonoX specific error because I am just starting to learn jquery.
I was going thru a turtorial online on how to use jquery to simulate panel behavior in asp.net by loading pages into <div areas>
This looks like it could solve a lot of my odd issues but my biggest issue with it is that so far I have been unable to get it to work inside Monox..
Its a very simple concept.. and the jquery code appears to fire but the MonoX side.. where I have my code behind.. does not seem to be reading my input.
First I have a simple aspx page in Monox.
<%@ Page Title="" Language="C#" MasterPageFile="/MonoX/MasterPages/MonoX.master" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="ProjectName.Web.WebForm1" %>
<
asp:Content
ID
=
"Content1"
ContentPlaceHolderID
=
"cp"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function test() {
$("#divResult").load("testpanels.aspx",
{ testreq: $("#txttest").val() });
}
</
script
>
<
div
class
=
"containercontent"
>
Test Input:
<
asp:TextBox
runat
=
"server"
ID
=
"txttest"
Text
=
"testinput.."
/>
<
input
type
=
"button"
id
=
"btnSubmit"
value
=
"Test"
onclick
=
"test();"
/>
<
hr
/>
<
div
id
=
"divResult"
</div>
</
div
>
</
asp:Content
>
Then i have a 2nd page..
testpanels.aspx with a very simple markup and some code behind to attempt to read the jquery input.
markup..
<%@ Page Title="" Language="C#" MasterPageFile="/MonoX/MasterPages/MonoX.master" AutoEventWireup="true" CodeBehind="testpanels.aspx.cs" Inherits="ProjectName.Web.TestDisplay" %>
<
asp:Content
ID
=
"Content1"
ContentPlaceHolderID
=
"cp"
runat
=
"server"
>
<
asp:TextBox
ID
=
"TextBox1"
runat
=
"server"
></
asp:TextBox
>
</
asp:Content
>
code behind..
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace ProjectName.Web
{
public partial class TestDisplay : MonoSoftware.MonoX.BasePage
{
protected void Page_Load(object sender, EventArgs e)
{
TestCallBack();
}
protected void TestCallBack()
{
string symbol = Request.Params["testreq"] ?? "";
//read all keys..
foreach (string key in this.Request.QueryString.AllKeys)
{
this.Response.Write(String.Format("{0} = {1}<
br
/>", key, Request[key]));
this.TextBox1.Text = this.TextBox1.Text + key + "-" + Request[key] + "<
br
>";
}
}
}
}
But.. I cant seem to get anything to read the Request.Params["testreq"] ?? in MonoX..