0

I am opening a child window using window.showModalDialog() method. In the child page i have few server side controls whenever a postback happens the child page opens in a new window.

I have also set in my head tag,but it is not working.

<base target ="_self/>

For example In Page 1: i have an anchor on whose click i open a child page(page2). In my child page Page2: I have an asp.net button to search based on the criteria. when i enter the criteria and click search, the search results are show in new window rather then the same window.

similar to the post http://forums.asp.net/p/1246676/2297583.aspx

2
  • What is your question? Try and describe what you're trying to do in detail, show some of the code involved and any scripting errors you might be receiving. Commented Aug 24, 2010 at 12:39
  • Window.showDialog() is a Winforms Method and does not work in ASP.Net Commented Aug 24, 2010 at 12:42

2 Answers 2

1

If you want to open child window in new window then you need to add

< base target="_blank" /> instead of < base target="_self" />

which opens ModelDialog in parent window.

Hope this clarifies your question.

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

Comments

0

Not really sure what you are wanting since you are not asking a question, but I think you want to use Javascript's Alert() method to get a messagebox like what the Window.ShowDialog() method does.

1 Comment

It's alert() not Alert().

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.