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

QueryString and Web Forms

Hello,

I have a few web forms:

1) Shows a list of items with item ids
2) Shows details specific to an item and the sub-items of this item.

What is the best way to pass the item id of the selected item from the 1st
page to the 2nd?

If I pass the value in the query string from the first 1st form to the 2nd,
the 2nd form's URL will always contain that it in it since ASP.NET uses POST
method and not a get method. So if on the 2nd form there is a way to pick a
different item from a drop-down list, the URL will still contain the id of
the orginally selected item, while the details will be shown for the item
that was subsequently selected from the drop-down. This does not look right.

Should I use the Session() to pass the item id of the selected item from the
1st to 2nd page instead of the QueryString method?

Thanks,
Arsen
Nov 18 '05 #1
1 1021
ASP.NET uses POST instead of GET for posting control data, but that is NOT
why your value appears on the URL.
QueryStrings ALWAYS appears in the URL (in any language on any CGI-type web
platform).
If your controls have proper IDs assigned you can use Request.Forms on the
second page to get the form control values from the page that just posted.

-Rob Teixeira [MVP]

"Arsen Vladimirskiy" <ar***@emergency24.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hello,

I have a few web forms:

1) Shows a list of items with item ids
2) Shows details specific to an item and the sub-items of this item.

What is the best way to pass the item id of the selected item from the 1st
page to the 2nd?

If I pass the value in the query string from the first 1st form to the 2nd, the 2nd form's URL will always contain that it in it since ASP.NET uses POST method and not a get method. So if on the 2nd form there is a way to pick a different item from a drop-down list, the URL will still contain the id of
the orginally selected item, while the details will be shown for the item
that was subsequently selected from the drop-down. This does not look right.
Should I use the Session() to pass the item id of the selected item from the 1st to 2nd page instead of the QueryString method?

Thanks,
Arsen

Nov 18 '05 #2

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

Similar topics

3
by: Joe Abou Jaoude | last post by:
hi, I have a search page im asp.net. the user enter the criterias in textboxes and dropdownlists and on submit i want the results to be displayed in a popup window. so the easy way is to pass...
1
by: Arsen Vladimirskiy | last post by:
Hello, I have a few web forms: 1) Shows a list of items with item ids 2) Shows details specific to an item and the sub-items of this item. What is the best way to pass the item id of the...
8
by: George | last post by:
VS.NET 2002/VB Is it possible to retrieve HTML form variables that are hidden input types using Request.QueryString() and/or Request.Form()? I have tried various ways of using those, but to no...
2
by: Donald | last post by:
I'm having a problem passing QueryString values to other web pages from a frame set. Here's the details of the problem: 1. I have three web forms: WorkObject.ASPX, WorkObject_Header.ASPX and...
2
by: Adam Knight | last post by:
Hi All, Now that the action attribute on web forms get ingnored by ASP.NET, how can i carry a value through multiple page requests in the Request.QueryString collection. I don't really want to...
0
by: danielle.m.manning | last post by:
I am new to ASP.NET, but have used ASP and VB.NET (Windows Forms) extensively. I am having what I would think should be a simple problem to fix, but is really holding me up. I have a web...
8
by: dbarker1 | last post by:
This may be a can of worms but I wanted to throw it out here. I am gathering pros and cons for using querystring vs session variables for passing row keys in a ASP.net application. I want to be...
0
by: mohaaron | last post by:
Hello all, I'm having a problem using the ReturnUrl parameter while using FormsAuthentication. If I already have some querystring parameters in the url like this. ...
3
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...
4
by: .nLL | last post by:
Hi, im am a classic asp developer and started to learn asp.net but got stuck with a simple problem even before i step in to further. to learn i have started from a simple project (a login system...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.