but i am not which one is better and how can i do this.
Please tell me that how can i do this.
Look here for details
You can call Js functions as a script registered on the codebehind itself.
key is the name you want to give the script eg. "PageClose" value is the;
here instead of using the window.close you coud append your js function as a string, ideally i put this string builder class and build the script in the constructor if i need it always in the page
Then use this in the event handler you want to execute the script
This would place the JS function after the opening tag of the page thats rendered
Hope this helps
Try the following in your codebehind
©2020 All rights reserved.