473,382 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Open new window from aspx.vb

Good day,

I nned to find a way of opening a new window. I have a aspx page with a
whole bunch of text boxes and so on on it and some command buttons. What I
need is that when one of the command buttons is pressed and some preocessing
gets done in the aspx.vb section I need a new window to open if some criteria
are met. It has to be done within the aspx.vb section.

Please can someone help
TIA
Nov 21 '05 #1
5 32013
PLSH,

In aspx is a page and a window are very different what it is not in standard
HTML.

A window can be opened by javascript however is not an aspx page.
To get a new aspx page you can use the classic response.redirect

http://msdn.microsoft.com/library/de...irecttopic.asp

I hope this helps

Cor
Nov 21 '05 #2
Hi,

Keep in mind that popup blockers would prevent the window from
opening. But here is a link on how to do it.

http://www.riderdesign.com/articles/...x?articleid=13

Ken
-----------------
"PLSH" <PL**@discussions.microsoft.com> wrote in message
news:6C**********************************@microsof t.com...
Good day,

I nned to find a way of opening a new window. I have a aspx page with a
whole bunch of text boxes and so on on it and some command buttons. What I
need is that when one of the command buttons is pressed and some preocessing
gets done in the aspx.vb section I need a new window to open if some
criteria
are met. It has to be done within the aspx.vb section.

Please can someone help
TIA
Nov 21 '05 #3
Thanks Cor,

But I need to open a new window, not redirect in the exisiting window.

"Cor Ligthert" wrote:
PLSH,

In aspx is a page and a window are very different what it is not in standard
HTML.

A window can be opened by javascript however is not an aspx page.
To get a new aspx page you can use the classic response.redirect

http://msdn.microsoft.com/library/de...irecttopic.asp

I hope this helps

Cor

Nov 21 '05 #4
PLSH,

Know that you only can use that too show someting is that what you are after

\\\
Dim str As String
str = "<script language=javascript> {window.open('http://www.google.com');}
</script>"
RegisterStartupScript("Startup", str)
///

A full description
http://msdn.microsoft.com/library/de...javascript.asp

I hope this helps a little bit?

Cor
Nov 21 '05 #5
Thanks, I also managed to come up with the same code

"Cor Ligthert" wrote:
PLSH,

Know that you only can use that too show someting is that what you are after

\\\
Dim str As String
str = "<script language=javascript> {window.open('http://www.google.com');}
</script>"
RegisterStartupScript("Startup", str)
///

A full description
http://msdn.microsoft.com/library/de...javascript.asp

I hope this helps a little bit?

Cor

Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: KathyB | last post by:
Hi, In the pageload of my aspx file I have the following (in both not in postback and is postback)... btnList.Attributes.Add("onclick", "window.open('Scanned.aspx', 'Serial Numbers',...
6
by: Shamin | last post by:
Hi, Thanks in advance for answering to my Question. I'm stuck with this problem and would really appreciate any help. I have 2 aspx files (Main.aspx and ReportViewer.aspx). Main.aspx has a...
1
by: Danny Ni | last post by:
Hi, I have a webform that will pop up window by clicking button or links inside data grid. Here are some sample code snippet: 'For button btnOrder.Attributes.Add("onclick",...
2
by: Chris | last post by:
I know this is a dead horse I'm beating but why is it so impossible to ask for functionality in the HTML tag to open a window/page more controllable? why is: <a href="somepage.aspx?value1=xyz"...
5
by: Chris | last post by:
Hello, I have a link on an aspx page. The URL is set in the Page Load event: lnkEventHistory.NavigateUrl = "javascript:window.open('EventHistory.aspx?TeenID=" & _ Request.Item("SubjectID") &...
2
by: carlor | last post by:
Hi there, I have a form that contains a link button. When the user clicks the link button I need to enable a couple of other buttons on the page and open a new browser window giving it focus...
11
by: Dave | last post by:
For some reason, the below lines only work on select machines. All machines are running IE6. IE SP's and OS's vary. When it doesn't work, default.aspx (the page that this code is in) opens and...
1
by: dnes | last post by:
Open Multiple New Browser Windows from ASP.NET I'm having trouble figuring out how to open multiple new browser windows (each one displaying something different). As you can see from the code...
13
by: Bob Jones | last post by:
Here is my situation: I have an aspx file stored in a resource file. All of the C# code is written inline via <script runat="server"tags. Let's call this page B. I also have page A that contains...
16
by: CreativeMind | last post by:
hi, i have a page calendar.aspx which returns selected date i.e window.returnValue=selectedDate; window.close(); it works fine with IE but not for Firefox. i tried...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.