Take the 2-minute tour ×

I am using Ajax's EnablePageMethods way to call server side code using javascript. The problem is that in IE8 the page automatically refreshes after the ajax call has been completed i.e. the server side function has been executed successfully. I want the same to happen with Chrome and Firefox but it doesnt refresh the page once the server side function has been executed.

Any idea or suggestion how to achieve that?

I am using this way to call server side code from Javascript -- http://www.codeproject.com/KB/ajax/Ajax_Call_using_AjaxNet.aspx

this is the javascript function:

   function editNode(note) {              

and this is the server side function:

public static void deleteNote(int noteId)
string test = noteId.ToString();
Note note = new Note(noteId);
note.IsDeleted = true;

this is where i am calling the javascript event:

<a href='myPageName.aspx' onclick='javascript:editNode(1);return false;'>Delete</a>
share|improve this question
Please show us specifically your code. –  deceze Apr 5 '11 at 8:40
I have tried using Response.Redirect to the same page inside the server side function but it doesnt work –  ria Apr 5 '11 at 8:47
added the code, please check –  ria Apr 5 '11 at 8:51
add comment

1 Answer

up vote 0 down vote accepted

Here is how I did it:

     function editNode(note) {              

        function OnSuccess() {         
        if (!navigator.appName == 'Microsoft Internet Explorer')
        function OnFailure(error) {             

I found this solution on this link:


share|improve this answer
add comment

Your Answer


