Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional 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 .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 23rd, 2006, 01:26 AM
Friend of Wrox
 
Join Date: Jun 2004
Location: Alhambra, ca, USA.
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
Default After Update, Need to Popup another window

Hello
When the user clicks Button1, you go through updating the database process. If this is a success only then will another window need to popup with a URL: someurl.aspx?ID=2
I need to pass the ID to URL.

How do I do this in ASP.NET with VB.NET.
Help.
Thank you.

  #2 (permalink)  
Old March 23rd, 2006, 05:02 AM
Registered User
 
Join Date: Mar 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to JasonGuo
Default

Just do as follows:

int id;

.......................

String script = "<script>";
script += "window.open('someurl.aspx?id='"+id.ToSting()+",'' )";
script += "</script>";
if (!this.IsClientScriptBlockRegistered)
{
this.RegisterClientScriptBlock("js",script);
}
  #3 (permalink)  
Old March 25th, 2006, 06:20 AM
Authorized User
 
Join Date: Jan 2006
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

here is the code for ur query.just copy and paste the following code and will get u desired result.

Response.Write("<script>window.open('someurl.aspx? ID=2');</script>")

  #4 (permalink)  
Old March 25th, 2006, 07:52 PM
Friend of Wrox
 
Join Date: Jun 2004
Location: Alhambra, ca, USA.
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I forgot to mention, that i need a popup without the back button, address bar.

Thank you.

  #5 (permalink)  
Old March 28th, 2006, 12:47 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

hotshot, your code will not work. When writing JavaScript out to the browser via Response.write you have to do something like this

strJavaScript = "<script language=javascript>"
'code
strJavaScript +="</scr" & "ipt>"

If you dont do this you will get an "Invalid Pointer" JS error at runtime. (all aspx pages use javascript for the postback function so using your example will cause the script to fail.)

You can use Jason's code or the following code to achieve your results:

priave sub button1_click....
   Dim strJavaScript as new system.text.stringBuilder

   strJavaScript.append("<script language=javascript>")
   strJavaScript.append("window.open('yourwindow.aspx ','yourwindowname','toolbar=0,menubar=0,directorie s=0');")
   strJavaScript.append("</scr" &"ipt>")
   response.write(strJavaScript)

end sub


hope that helps you.


"The one language all programmers understand is profanity."
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XmlHttp in popup window Guy g. Ajax 1 December 12th, 2007 03:56 AM
Centering Popup window & Blur Parent window jkusmanto Javascript How-To 0 May 25th, 2007 03:19 AM
Popup window from javascript arnabghosh Javascript How-To 1 March 2nd, 2006 10:17 AM
popup window sankar Pro VB 6 0 July 29th, 2003 01:42 AM



All times are GMT -4. The time now is 11:43 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.