|
-
Apr 19th, 2005, 10:21 AM
#1
Thread Starter
Fanatic Member
Redirect to URL in a new window?
In VB.NET code in an ASP.NET project, I can call:
VB Code:
Response.Redirect("NewPage.apsx")
And this directs me to "NewPage.aspx" in my current browser window. But how can I open this URL in a new window rather than the current one?
Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment. 
-
Apr 19th, 2005, 10:30 AM
#2
Hyperactive Member
Re: Redirect to URL in a new window?
You can only open a new window client-side, so send a javascript inline command via the buffer.
Last edited by GlenW; Apr 19th, 2005 at 10:31 AM.
Reason: Bad spelling
-
Apr 19th, 2005, 10:33 AM
#3
Thread Starter
Fanatic Member
Re: Redirect to URL in a new window?
That's ridiculous!?!
My form is serverside, therefore all my controls are serverside. You mean I can't possibly open in a new window then?
Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment. 
-
Apr 19th, 2005, 10:36 AM
#4
Hyperactive Member
Re: Redirect to URL in a new window?
Sorry that's the way it is, but sending inline javascript only takes a couple of lines of code.
-
Apr 19th, 2005, 10:37 AM
#5
Thread Starter
Fanatic Member
Re: Redirect to URL in a new window?
 Originally Posted by GlenW
Sorry that's the way it is, but sending inline javascript only takes a couple of lines of code.
Can I do that from a webcontrol button that is run at the server?
Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment. 
-
Apr 19th, 2005, 10:40 AM
#6
Hyperactive Member
Re: Redirect to URL in a new window?
Yes just send the javascript via Response.Flush after putting the script in the Buffer.
Make sure you pad the buffer first 'cos it won't flush if its contents are too small and your script will be too small.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|