473,395 Members | 2,446 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,395 software developers and data experts.

How to get path argument info?

How can I extract the path argument info in ASP.NET (using VB.NET)?

Examples

my Main.aspx form is linked using "Main.aspx?CallFrom=MyApp"

I want to be able to extract the name/value pair "CallFrom=MyApp" from
within my Main.aspx?

Is this possible?

Thanks, Rob.
Nov 19 '05 #1
3 1012
its called a querystring value

http://samples.gotdotnet.com/quickst...semantics.aspx

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

"Rob R. Ainscough" <ro*****@pacbell.net> wrote in message
news:es**************@TK2MSFTNGP15.phx.gbl...
How can I extract the path argument info in ASP.NET (using VB.NET)?

Examples

my Main.aspx form is linked using "Main.aspx?CallFrom=MyApp"

I want to be able to extract the name/value pair "CallFrom=MyApp" from
within my Main.aspx?

Is this possible?

Thanks, Rob.

Nov 19 '05 #2
I think you want just Request.QueryString("CallFrom")...

But if you wanted the entire collection for some other reason, the
entire string is a NameValueCollection object, and you can loop through
it like you would a HashTable and get values based on keys.

Something like this (C#):
System.Collections.Specialized.NameValueCollection objQS = new
System.Collections.Specialized.NameValueCollection ();

objQS = Request.QueryString;

for (int ctr = 0; ctr < objQS.Count; ctr++)
{
Response.Write("key: " + objQS.GetKey(ctr).ToString() + "<br>");
Response.Write("value: " + objQS.Get(ctr).ToString() + "<br><br>");
}

Hope that helps.
Rob R. Ainscough wrote:
How can I extract the path argument info in ASP.NET (using VB.NET)?

Examples

my Main.aspx form is linked using "Main.aspx?CallFrom=MyApp"

I want to be able to extract the name/value pair "CallFrom=MyApp" from
within my Main.aspx?

Is this possible?

Thanks, Rob.

Nov 19 '05 #3
look at the Request.QueryString

-- bruce (sqlwork.com)
"Rob R. Ainscough" <ro*****@pacbell.net> wrote in message
news:es**************@TK2MSFTNGP15.phx.gbl...
How can I extract the path argument info in ASP.NET (using VB.NET)?

Examples

my Main.aspx form is linked using "Main.aspx?CallFrom=MyApp"

I want to be able to extract the name/value pair "CallFrom=MyApp" from
within my Main.aspx?

Is this possible?

Thanks, Rob.

Nov 19 '05 #4

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

Similar topics

4
by: Hal Vaughan | last post by:
I want to have a config file for my program, which means I need to know where the config file is. If I type: java myclass and it runs myclass.class, is there any way to obtain the location of...
31
by: John Roth | last post by:
I'm adding a thread for comments on Gerrit Holl's pre-pep, which can be found here: http://tinyurl.com/2578q Frankly, I like the idea. It's about time that all of the file and directory stuff...
3
by: Jason | last post by:
Here's the code I'm using: #################################### import os, string for root, dirs, files in os.walk('/home/_Comedy'): for file in files: str = os.path.dirname(file) print root,...
3
by: martijn | last post by:
H! I thought I was ready with my own spider... But then there was a bug, or in other words a missing part in my code. I forget that people do this in website html: <a...
70
by: Michael Hoffman | last post by:
Many of you are familiar with Jason Orendorff's path module <http://www.jorendorff.com/articles/python/path/>, which is frequently recommended here on c.l.p. I submitted an RFE to add it to the...
3
by: Mark Urish | last post by:
I want to make sure that a filename is an "absolute path" (ie. has a drive spec. and root, or else is a UNC path) if it isn't already one. Path.GetFullPath seems to do the trick, except there is...
1
by: Chris B | last post by:
I have an application that uses PInvoke to call into native DLLs. My DLLimport attribute only has the name of the DLL that I need to import (i.e. I leave it up to the OS to search the PATH for the...
7
by: Marcel | last post by:
in c++ int main(int argc,char** argv) the first argument is the own executable path how can I can the same info in a c# program? marcel
11
by: cdkorzen | last post by:
I'm sorry if this is a rehash, but all I see is the same info. Here's my debacle: I CAN get the PATH_INFO to work. With ANYTHING but ASP. Python, Perl, Cmd files... works fine. ASP can't...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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...

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.