0

How can I Open and Close Popup windows without Javascript in ASP.NET?

2
  • do you mean modal dialog boxes? Commented Dec 8, 2009 at 9:05
  • Yes. My application has lot of dialog boxes and I want to open and close from button clicks as a windows application Commented Dec 9, 2009 at 4:07

3 Answers 3

4

What do you mean "Popup windows".

JavaScript allows you to manipulate the properties of a window object allowing you to remove the status bar, address bar, set the size and position of the new window and other things.

The only other way (short of using VB script :) is to have links with target set to _blank. But then you can't customise the new window.

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

1 Comment

Yeap- just bear in mind _blank isn't valid with XHTML strict.
1

You can't.

Opening and closing popups implies javascript code execution on the client side.

You could eventually create an ASP.Net panel that looks like a popup and set it visible/invisible during the postback but it won't behave like a 'real' popup.

Comments

0

Unless otherwise but I conquer with @Olivier that you can't do that without using Javascript. Even with the solution given by @Avi, you are still using Javascript though it is kinda abstracted from you.

Maybe, you could explain why you don't want to use javascript because even without the AjaxControl, it is kinda pretty easy to open and specify other properties of pop up windows.

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.