newbie using ajaxpro library

Jan 19, 2007 at 1:32 AM
Hi I am studying this library and I did my first hello world application I did it:

I am using .net 1.1 C# Builder 2006

1 - I added to references ajaxpro.dll version 6.10.6.2
2- in the web.config I added

<system.web>
<httpHandlers>
<add verb="POST,GET" path="ajaxpro/*.ashx" type="AjaxPro.AjaxHandlerFactory,AjaxPro" />

3- in .cs load page event:

private void Page_Load(object sender, System.EventArgs e)
{
AjaxPro.Utility.RegisterTypeForAjax(typeof(FirmInformation));
}

4- I added this method:

AjaxPro.AjaxMethod
public string ChangeText()
{

// lbRecordCount.Text = "No items Found";

return "hello world";

}
5- In aspx page:

<head>
<title></title>
<script type="text/Javascript" language="Javascript">
function ChangeText() {
var response = ASFA.FirmInformation.ChangeText();
DynamicGrid.innerHTML = response.value;

}

</script>

</head>

<body>
<form id="form1" runat="server">

<input type="button" value="Button html" onclick="ChangeText()" id="myBtn">
<div id="DynamicGrid">
</div>
</form>
</body>
</html>

Using it all work ok when I click the button the div appear "hello world"

but I want to add more code in the method ChangeText() I removed the commment and always is return null I mean

I did it:

AjaxPro.AjaxMethod
public string ChangeText()
{

lbRecordCount.Text = "No items Found";

return "hello world";

}
I add a label (lbRecordCount) to aspx when I set a breakpoint the debugg stop here lbRecordCount.Text = "No items Found"; but don't continue to the return "hello world";, my doubt I am doing something wrong in the method that have AjaxPro.AjaxMethod I can change properties in the asp.net control?

any help is welcome

kind regards
Frank