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

open multiple new pages within a DataReader

I am trying to open a new web page for each item returned by the
DataReader. I am using JavaScript to open each new window, and using a
session variable to pass the DataReader Item value to the newly created
page. The problem I am running into is all the pages are opening with
the same value, which is the last item returned by the DataReader.
Here is my code:

Session("BatchNumber") = sqldr.Item("q_Batch")
Response.Write("<script
language=javascript>window.open('PrintREs.aspx');</script>")

Any suggestions?

Thank You!!

Nov 20 '05 #1
3 1132
there's only 1 batchNumber value and you keep overwriting it...by the time
the other pages have loaded, Session("BatchNumber") is probably equal to the
last q_batch value in your datareader.

why not just do:

string.Format("PrintREs.aspx?id={0}", sqldr.Item("q_Batch");

?

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"bdwgarth" <bw****@lbrspec.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
I am trying to open a new web page for each item returned by the
DataReader. I am using JavaScript to open each new window, and using a
session variable to pass the DataReader Item value to the newly created
page. The problem I am running into is all the pages are opening with
the same value, which is the last item returned by the DataReader.
Here is my code:

Session("BatchNumber") = sqldr.Item("q_Batch")
Response.Write("<script
language=javascript>window.open('PrintREs.aspx');</script>")

Any suggestions?

Thank You!!

Nov 20 '05 #2
Do you put this within the javascript window.open tag. I have tried
this but does not cause any pages to open, both in the window.open and
stand alone. ???

Nov 20 '05 #3
Got It! Thank You!!

Nov 20 '05 #4

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

Similar topics

12
by: jonathan.beckett | last post by:
Hi All, For the past few months I have been working on an open source Apache/PHP/MySQL content management system - and have recently made it available for download. It's still very much a...
3
by: Yul | last post by:
Hi, We are in the process of designing an ASP.NET app, where a user will enter some 'Customer ID' to be queried in the database. If the ID is valid, several stored procedures will be called to...
15
by: Rob Nicholson | last post by:
I'm starting to worry a bit now. We're getting the above error when two users hit the same database/page on an ASP.NET application using ADO.NET, talking to a SQL 7 server. The error is perfectly...
20
by: fniles | last post by:
I am using VB.NET 2003, SQL 2000, and SqlDataReader. As I read data from tblA, I want to populate tblB. I use SQLDataReader for both tables. I do not use thread. When I ExecuteReader on tblB, I...
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: 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
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.