473,608 Members | 2,287 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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

blahblah.com/page.aspx?optio n

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 1616
"Kevin Blount" <ke**********@L OLgmail.comwrot e in message
news:O5******** ******@TK2MSFTN GP04.phx.gbl...

Request.QuerySt ring 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.QuerySt ring;", or is there
something else you're suggesting?

Thanks

Kevin

Mark Rae wrote:
"Kevin Blount" <ke**********@L OLgmail.comwrot e in message
news:O5******** ******@TK2MSFTN GP04.phx.gbl...

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

Nov 28 '06 #3
"Kevin Blount" <ke**********@L OLgmail.comwrot e in message
news:u4******** ******@TK2MSFTN GP03.phx.gbl...
Are you thinking of "string myURL = Request.QuerySt ring;",
Yes.
or is there something else you're suggesting?
No.
Nov 28 '06 #4
ok

Mark Rae wrote:
"Kevin Blount" <ke**********@L OLgmail.comwrot e in message
news:u4******** ******@TK2MSFTN GP03.phx.gbl...
>Are you thinking of "string myURL = Request.QuerySt ring;",

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

No.

Nov 28 '06 #5
Kevin,
in ASP.NET, Request.QuerySt ring is a NameValueCollec tion object.
So, you can have a name whose value is null (or an empty string).
Take a look at NameValueCollec tion 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**********@L OLgmail.comwrot e in message
news:u4******** ******@TK2MSFTN GP03.phx.gbl...
Are you thinking of "string myURL = Request.QuerySt ring;",
Yes.
or is there something else you're suggesting?
No.
Nov 28 '06 #6
In this case, NameValueCollec tion (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.QuerySt ring is a NameValueCollec tion object.
So, you can have a name whose value is null (or an empty string).
Take a look at NameValueCollec tion 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
3948
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 appropriate alt text, anyone viewing the page with images turned off, will see the alt text instead, and on hover will see the popups.
2
3779
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"); var option; for(var i=0; i<arr.length; i++){ option=document.createElement("option"); option.value=arr.code;
4
62206
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); anOption.innerText = "NewElement"; anOption.Value = "99";
5
1556
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" %> Thanks Cas
5
14092
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; // what is this line mean? do { printf("Choice: %s\n", greet);
6
1295
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 if there's no 'value'. Can anyone tell me? I can work with "?option=value&option2=value" no problem.. but I've been
4
4927
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 folders" check box ... But from some days I am not able to get that "Folder Option" in the menu from the "Tool" menu. So I am not able to understand that why this is not showing. I sthere any .dll file is corrupted or what????? So please help...
4
2045
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"> <option id="thisone" class="message">THANK YOU</option> </select>
0
8063
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
8002
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
8475
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...
0
6816
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...
1
6013
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3962
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...
1
2474
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1594
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1329
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.