<body>
<form id="form1" runat="server">
<div>
<a href="javascript:test1()">test1</a><br /><br />
<a href="javascript:test2()">test2</a>
<script type="text/javascript">
function test1()
{
Test.TestFunction(1, test_callback);
}
function test_callback(r)
{
alert(r);
alert(r.value);
}
function test2()
{
Test.TestFunction2(test2_callback);
}
function test2_callback(r)
{
alert(r.value);
}
</script>
</div>
</form>
</body>
///Code Behind File
[AjaxMethod]
public HtmlSelect TestFunction(int c)
{
HtmlSelect r = new HtmlSelect();
r.ID = "TestSelect";
for( int i = 0; i < c; i++ )
{
ListItem li = new ListItem( "hello", i.ToString() );
r.Items.Add( li );
}
return r;
}
[AjaxMethod]
public string TestFunction2()
{
return ( "4" );
}
When i execute this page it shows two link, test1 and test2, when i
press test1 two message box appears, first message box is saying
"[object Object]", second one is saying "null", when press test2 one
message box appearing and saying me "4", suppose they are my old
functions and if i prepare two new function same as the above
functions, they will work correctly as expected.
I couldn't use fiddler because i couldn't understand it, i installed
fiddler and ajax fiddler dll and made request to the server but it
didn't work, fiddler shows nothing whether the ajax is running
correctly or not
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ajax.NET Professional" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/ajaxpro
The latest downloads of Ajax.NET Professional can be found at
http://www.ajaxpro.info
-~----------~----~----~----~------~----~------~--~---