hi i have an asp button ,when i click this button ,first i want to run code behing progress such as data delete , update.. after this progress i want to jquery function run related this button?
how can i do?
hi i have an asp button ,when i click this button ,first i want to run code behing progress such as data delete , update.. after this progress i want to jquery function run related this button?
how can i do?
If I interpret your question correctly, you want to post back to the server so you can run your code, and when you return, you want to run some jquery. Is that correct?
If so, you'll need to inject some jquery into the response after you do your work.
So your code-behind will delete a record or run an update, then write some jquery to the response which will run when the page is built on the client. You might want to use the Page.RegisterStartupScript
method to do this.
An alternative is to go down the ajax route, but that's a bit more complicated.
Your server-side event handler can call ScriptManager.RegisterStartupScript to invoke jQuery in the browser.