ASP.NET 1.0 and 1.1 BasicsASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
I should create a link "Go to Page2" in page1.aspx and if user clicks it, it should open a popup window with page2.aspx (which pulls records from db). If I redirect from page1 to page2 it works but it I couldnt open as popup window from page1. I tried to use javascript (window.open with popup) but didnt work, got server error. could anybody please help me with complete code of this? i would really appreciate your help.
I am absolutely sure some one else has a much better solution than what follows. What is below works for me. So please everyone excuse me if what follows is to convoluted, not the best solution etc. etc.
I have tried this and it works for me.
I included a javascript that opens up a pop up window:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<a href="Name of a aspx application.aspx" tabindex=-1 onclick="NewWindow(this.href,'Name of aspx','800','550','yes','center');return false" onfocus="this.blur()"> href display name </a>
Note: the quotes versus double quotes.
In reality I href to a scroll bar load page that then loads my application.
In order to launch a new window while doing a redirect requires a different approach. Instead of doing a redirect, you just need to emit the javascript that launches the new window (because a redirect will always happen in the same browser window).
I am very sorry to disagree but my pop up window does just that it pops up with my apsx page
displayed in the pop up window. Perhaps you could try the code, I simply copied it from our
asp web site that has been in service for about 4 years.
Again I apologize, I admit I am new and not a guru, but it works.
Perhaps I am misunderstanding you. The java script takes in parameters to set the new size of the
pop up window: onclick="NewWindow(this.href,'Name of aspx','800','550','yes','center');
The 800, 550 is the new size of the window.
Perhaps if someone else has tried it they could confirm.