473,387 Members | 1,592 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,387 software developers and data experts.

pass parameters while opening a new window

2
Hey
I'm quite new in developing and I'm having some problems with passing url parameters.
I'm writing in vb.net (asp.net) and usually when creating an event, I'm using this:

dim paramName as string
paramName = request.querystring("CODE")....

...btn_onclick ()...
response.redirect("1.aspx?code=" & paramName)

The problem is that now I need to do the same, but open the new page in a new window.
I understand that I need to use window.open() and write some javascript
(I thought at first that I need target="_blank")
Since I'm not that familiar with javascript I don't really understand how to pass a parameter from the previous page to the new one

Thanks,
D.
Apr 29 '10 #1
3 3502
Dormilich
8,658 Expert Mod 8TB
Expand|Select|Wrap|Line Numbers
  1. window.open("1.aspx?code=" + paramName, "windowName");
this will open a new window or tab (depending on the browser settings).
Apr 29 '10 #2
dddd81
2
Thanx, I tried using this in the code behind file but it response an error, as if im trying to use something wrong

Do you think I need to import some namespace?(import system. ...)
Apr 29 '10 #3
Dormilich
8,658 Expert Mod 8TB
that is JavaScript code to be executed in the browser. if VB or ASP can do something with that, I don’t know.
Apr 29 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: Al Franz | last post by:
Anyone understand how to pass parameters to a JavaScript. If anyone finds this easy to do maybe they could take a look at my short script on this page and show me how it needs to be changed. ...
0
by: Chris | last post by:
I’m somewhat perplexed by the lack of solutions for window pop-up alternatives. I’m looking for a way to open an aspx page forcing its width, height, toolbar (yes JavaScript properties) to...
3
by: DCB | last post by:
Hello. I have an easy question, likely, that has me in a headspin. I have an include file to a frames based site that basically forces frames on the end user if they visit the site and hit a...
1
by: Mark Dicken | last post by:
Hi All I have found the following Microsoft Technet 'Q' Article :- Q210368 -ACC2000: How to Pass an Array as an Argument to a Procedure (I've also copied and pasted the whole contents into...
3
by: Chris | last post by:
I have a modal (yes it must be modal) web page. I do this by having an empty frame that points to my main page (so that I can repost without new popups) I have to pass data to the child page from...
19
by: LP | last post by:
I am using (trying to) CR version XI, cascading parameters feature works it asks user to enter params. But if page is resubmitted. It prompts for params again. I did set...
1
by: khalid sohail | last post by:
hi everybody i want to pass the window size parameter to <asp:hyperlink> attribute Navige URL Property. tell me how to pass the parameter to it.....actually i want to open the new window on the...
1
by: colleen1980 | last post by:
Hi: Can any one please tell me that how to i pass the two textbox values in the new page. If i use the form action in the popup window page then the new page is open in the same popup window as i...
28
by: Bill | last post by:
Hello All, I am trying to pass a struct to a function. How would that best be accomplished? Thanks, Bill
24
by: =?Utf-8?B?U3dhcHB5?= | last post by:
Can anyone suggest me to pass more parameters other than two parameter for events like the following? Event: Onbutton_click(object sender, EventArgs e)" Event handler: button.Click += new...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.