Wrox Programmer Forums
|
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 16th, 2005, 06:00 AM
Authorized User
 
Join Date: Oct 2003
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default extract querystring

Hi,
I have this value as a querystring and I want to extract all the variables to pass them to a function.

The string is


type=0&asset=0&assetNo=&facility=0&category=0&line =12&infraco=0&output=1&cause=&attribution=0

nd I want to trap the values of type,assetNo,facility and so on.

Does anyone know how to do that?

Thanks


 
Old May 16th, 2005, 06:19 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You can use Request.QueryString.Get(ParamName), like this:

string type = Request.QueryString.Get("type")

The values are returned as strings, so you may need to do some casting.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Down Rodeo by Rage Against The Machine (Track 7 from the album: Evil Empire) What's This?
 
Old May 16th, 2005, 06:20 AM
Authorized User
 
Join Date: Jul 2004
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
Default

type=Request.QueryString("type")
asset=Request.QueryString("asset")
assetNo=Request.Querystring("assetNo")

and so on.

Cheers
Spacy






Similar Threads
Thread Thread Starter Forum Replies Last Post
using querystring melkin Classic ASP Basics 7 April 1st, 2008 09:07 AM
how to extract a spreadsheet ravee39 SQL Server 2005 1 April 23rd, 2007 09:20 AM
Querystring or not? myself Classic ASP Basics 4 July 4th, 2006 09:01 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.