mardi 21 mars 2017

How to make return to the current url to stay the same or should not postback after executing from an ActionResult method?

I have an actionresult which I used to call for saving something as shown below

  public async Task<ActionResult> GenerateData() 
    {
     //...my code to save something here

    return ???? // from here, after executing the statements above, 
// I want to return to the current url which should not post back and will just stay the same so that the user's inputs will remain. 

    }

In this case, my current url here that I want to stay the same is Home/Index. By looking at the code sample I shown above with its comment, how do I achieve this in order for me to return to the current url which will not postback or will stay the same after executing the statements before the return command? Thanks

Aucun commentaire:

Enregistrer un commentaire