473,480 Members | 2,170 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

page.aspx?option - how to detect "option"

I've seen some sites that have URLs like this:

blahblah.com/page.aspx?option

i.e. there's no 'value' for the 'name' option. I'd like to find out how
to detect if the name' is part of the URL if there's no 'value'.

Can anyone tell me?

I can work with "?option=value&option2=value" no problem.. but I've been
trying all morning to get just "?option" to detect, without success.

Cheers and TIA

Kevin
Nov 28 '06 #1
6 1605
"Kevin Blount" <ke**********@LOLgmail.comwrote in message
news:O5**************@TK2MSFTNGP04.phx.gbl...

Request.QueryString on its own will return everything which follows the ?
Nov 28 '06 #2
Mark,

Thanks for the reply, but I'm not sure how you're suggesting I use that
info.

Are you thinking of "string myURL = Request.QueryString;", or is there
something else you're suggesting?

Thanks

Kevin

Mark Rae wrote:
"Kevin Blount" <ke**********@LOLgmail.comwrote in message
news:O5**************@TK2MSFTNGP04.phx.gbl...

Request.QueryString on its own will return everything which follows the ?

Nov 28 '06 #3
"Kevin Blount" <ke**********@LOLgmail.comwrote in message
news:u4**************@TK2MSFTNGP03.phx.gbl...
Are you thinking of "string myURL = Request.QueryString;",
Yes.
or is there something else you're suggesting?
No.
Nov 28 '06 #4
ok

Mark Rae wrote:
"Kevin Blount" <ke**********@LOLgmail.comwrote in message
news:u4**************@TK2MSFTNGP03.phx.gbl...
>Are you thinking of "string myURL = Request.QueryString;",

Yes.
>or is there something else you're suggesting?

No.

Nov 28 '06 #5
Kevin,
in ASP.NET, Request.QueryString is a NameValueCollection object.
So, you can have a name whose value is null (or an empty string).
Take a look at NameValueCollection in the documentation, that will give
you a better scope on what you want to do.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Kevin Blount" wrote:
ok

Mark Rae wrote:
"Kevin Blount" <ke**********@LOLgmail.comwrote in message
news:u4**************@TK2MSFTNGP03.phx.gbl...
Are you thinking of "string myURL = Request.QueryString;",
Yes.
or is there something else you're suggesting?
No.
Nov 28 '06 #6
In this case, NameValueCollection (nvc) will not help him as he wants to
detect "?option". If it was detecting "?option=", then nvc would have helped.
In case of "?option" the array of nvc will show a length of 1, but the key
name would be null. While there may better solutions, the one proposed by
Mark Rae is the easiest to implement.

- eeraj
====
http://www.interviewboard.com
"Peter Bromberg [C# MVP]" wrote:
Kevin,
in ASP.NET, Request.QueryString is a NameValueCollection object.
So, you can have a name whose value is null (or an empty string).
Take a look at NameValueCollection in the documentation, that will give
you a better scope on what you want to do.
Peter
Nov 28 '06 #7

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

Similar topics

4
3936
by: Els | last post by:
Hi, I would like an opinion on the following: I have a page which is made up of background-images with transparent linked images in front of it, which on hover show text in CSS popups. Due to...
2
3770
by: gabon | last post by:
I'm creating a select entirely through JavaScript and very strangely IE doesn't show the text in the option elements. Here part of the code: this.form_country=document.createElement("select");...
4
62195
by: millw0rm | last post by:
Hi wats wrng with this code??? it works fine on IE6 but not on FireFox 1.5??? var anOption = document.createElement("OPTION"); document.getElementById("category").options.add(anOption);...
5
1550
by: Cas | last post by:
Hi, If i omit to mention e.g. the option 'debug' in the line below of an aspx file, does it means it's set to false? <%@ Page Language="VB" CodeFile="any.aspx.vb" Inherits="_Default" %> ...
5
14083
by: Omats.Z | last post by:
what is meaning os "char **option meet"? I get a function like this: __________________________________ int getchoice(char *greet, char *choices) { int chosen = 0; int selected; char **option;...
6
1287
by: Kevin Blount | last post by:
I've seen some sites that have URLs like this: blahblah.com/page.aspx?option i.e. there's no 'value' for the 'name' option. I'd like to find out how to detect if the name' is part of the URL...
4
4919
by: Firoz72000 | last post by:
Hi All, I am using WindowsXP operating system. I was able to hide the files and to see them : I was going to the "Tool" menu then "Folder Option" and then "View" tab and "show the hidden files and...
4
2036
by: rebeccatre | last post by:
please help me with this, <style> #a, option.message {background-color: green; color: white;} #b, option.message {background-color: yellow; color: black;} </style> <select id="thisselect">...
0
7060
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
7106
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...
1
6760
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
7022
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...
0
5365
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,...
0
4501
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3004
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
572
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
206
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...

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.