473,947 Members | 26,501 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Querystring and asp.net

Hi guys i have a problem with a page

I've made a little system to show products and who has bought each item, my
problem is this:

i have a page Customer.aspx and Report.aspx

Customer.aspx executes a javascript to show Report.aspx

the code is

protected void btnCA_Click(obj ect sender, EventArgs e)

{

String strPop = "<script language='javas cript'>" +
"window.open('r ptSales.aspx?us uario=" + giUsuario.ToStr ing() + "&nombre=" +
gsNombre + "','Report" + giUsuario.ToStr ing() +
"','location=no ,scrollbars=yes ');</script>";

ClientScript.Re gisterStartupSc ript(GetType(), "SalesRepor t" +
giUsuario.ToStr ing(), strPop);

}

usuario=" + giUsuario.ToStr ing() <--- here i send the user code using
Querystring

but if 2 or more users are logged at same time, the Report.aspx page shows
the second user items (or last logged user), why??? i'm sending the correct
user code but when more than one user are logged always the page shows last
user logged items

any idea??

PS: i also tried with cookies and got the same problem... =(
Jul 4 '06 #1
2 1173
The code isn't showing the Report.aspx page at all. It's showing the
rptSales.aspx page.

Where does the value in giUsuario come from?

Are you using the querystring in the rptSales.aspx page at all?
Rick wrote:
Hi guys i have a problem with a page

I've made a little system to show products and who has bought each item, my
problem is this:

i have a page Customer.aspx and Report.aspx

Customer.aspx executes a javascript to show Report.aspx

the code is

protected void btnCA_Click(obj ect sender, EventArgs e)

{

String strPop = "<script language='javas cript'>" +
"window.open('r ptSales.aspx?us uario=" + giUsuario.ToStr ing() + "&nombre=" +
gsNombre + "','Report" + giUsuario.ToStr ing() +
"','location=no ,scrollbars=yes ');</script>";

ClientScript.Re gisterStartupSc ript(GetType(), "SalesRepor t" +
giUsuario.ToStr ing(), strPop);

}

usuario=" + giUsuario.ToStr ing() <--- here i send the user code using
Querystring

but if 2 or more users are logged at same time, the Report.aspx page shows
the second user items (or last logged user), why??? i'm sending the correct
user code but when more than one user are logged always the page shows last
user logged items

any idea??

PS: i also tried with cookies and got the same problem... =(

Jul 4 '06 #2
Hi guys i have a problem with a page
>
I've made a little system to show products and who has bought each item, my
problem is this:

i have a page Customer.aspx and Report.aspx

Customer.aspx executes a javascript to show Report.aspx

the code is

protected void btnCA_Click(obj ect sender, EventArgs e)

{

String strPop = "<script language='javas cript'>" +
"window.open('r ptSales.aspx?us uario=" + giUsuario.ToStr ing() + "&nombre=" +
gsNombre + "','Report" + giUsuario.ToStr ing() +
"','location=no ,scrollbars=yes ');</script>";

ClientScript.Re gisterStartupSc ript(GetType(), "SalesRepor t" +
giUsuario.ToStr ing(), strPop);

}

usuario=" + giUsuario.ToStr ing() <--- here i send the user code using
Querystring

but if 2 or more users are logged at same time, the Report.aspx page shows
the second user items (or last logged user), why??? i'm sending the correct
user code but when more than one user are logged always the page shows last
user logged items

any idea??

PS: i also tried with cookies and got the same problem... =(
You didn't specify what giUsuario is, but I bet it's a static variable
somewhere. You can't use statics this way in ASP.Net, as it is a single
application that serves multiple concurrent users.
You might want to store those values in Session.
Session["giUsuario"]

Hans Kesting
Jul 5 '06 #3

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

Similar topics

3
17301
by: Arpan | last post by:
A link has the following URL: <a href="Page1.asp?cname=<%= Request.QueryString("cname") %>&cadd1=<%= Request.QueryString("cadd1") %>&cadd2=<%= Request.QueryString("cadd2") %>&cplace=<%= Request.QueryString("cplace") %>">Click</a> Suppose the names in the above querystring have the following values: cname="Danny" cadd1="House 97"
2
2113
by: Mikael | last post by:
Hi All! I have a problem here and i can't see what it is... My parameters (value) are shopped off. exampe "Hello world" will end up like "hello" How should i adjust the syntax to get a whole string that is not shopped off? Thanks Mike
1
6758
by: lion | last post by:
my Problem: a query string passed into a html page doesn't display correctly on a mac I am just using html and javascript (no ASP, PHP or server side scripting) This is the query string: popup.html?pImage=30_leilani_dowding_b_060.jpg&ordRef=1000&Title=Leilani&nbsp;Dowding using the QueryString function below, the pImage variable should be
5
5205
by: David | last post by:
Hello I need to take some values and place them in a string in the format of a querystring. Lets say I have: string State = "ACT"; string SearchString = "Tax"; int MinRelevance = 50;
4
19764
by: Raterus | last post by:
Howdy, Simple question, but I can't figure out how to do it. I have a a page which is called initially with a querystring. After I get the querystring values, I don't need the querystring to appear in the url anymore. How can I get rid of it? A postback doesn't clear it, it just keeps tagging along. I tried Request.QueryString.Clear, but get "readonly" errors. I want to do this, because eventually I use server.transfer within this...
12
5307
by: Alex | last post by:
I have a question about determining if one QueryString keys exists. The idea is, if this key exists, than its presence is enough to indicate that its value is true. For example ... www.something.com/main.aspx?client Client is the QueryString, but no value is given. This would mean to me that client exists, so its value is true. In the code behind, I can tell that client exists using Request.QueryString.Keys.Count, which equals 1....
3
3142
by: Dan Sikorsky | last post by:
How can I get the Querystring passed to the Referring Page from its referrer? I don't want the querystring coming to my current page. I want the querystring that came to the referring page, so that I can check for the existance of a parameter value in that previous querystring.
1
5990
by: beebee | last post by:
Hi all. I am having a bit of difficulty: Here is what is happening: I have an application that spits out a thankyou.aspx page and i would like to pass it the querystring values it had collected before loading the thankyou page. This is completed. NOw on the thankyou.aspx page i am getting the following error: Compiler Error Message: CS0120: An object reference is required for the nonstatic field, method, or property...
4
5973
by: =?Utf-8?B?RVcgTmV3Ymll?= | last post by:
My apologies in advance if there is a better forum for this question. Given the following snippet: <script type="text/c#" runat="server"> protected void Page_Load(Object Sender, EventArgs e) { if ( Request.QueryString.Count 0 ) { if ( Request.QueryString != "" )
3
2169
by: pingsheng | last post by:
Dear all, I have a form with dynamically created input fields. These fields go to next page for submitting into SQL database. The thing is all fields are the same but 4 fields. So each record must be submitted with a unique key, while everything is the same, these 4 fields must be different.... Idealy, these are the codes. please teach me how to do it. objConn.Open(sConnection) sRowNum = request.querystring("row_num")
0
10164
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9985
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11173
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11352
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10694
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9893
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6118
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
4540
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3544
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.