2

How can i get the Page Close Event In ASP.NET?? but without Java script

1
  • Why do u need this? There will be alternatives for ur need Commented Jan 20, 2010 at 13:35

4 Answers 4

6

That is not possible as no request is sent to the server when you leave a page.

Sign up to request clarification or add additional context in comments.

Comments

3

The Page Close event is a broswer event. You can't interact with it directly in C#.

Comments

1

ASP.NET Handles Events by posting back to itself. Since this doesn't happen when a page is closed, ASP.NET can not handle this type of event.

Keep in mind though, that ASP.NET generates a good amount of Javascript on its pages by default, so you shouldn't be completely against handling this kind of Browser Event in Javascript.

Comments

0

There is a tutorial on how to do it here but it uses ajax and page methods. I don't think it is possible without using any javascript at all.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.