Anyone got an idea please?
Regards,
NielsHello,
if all the urls that you have are in the form of the url that you gave :
www.arsluminis.com/photography/album/?aid=2
then, you might have something like this:
string s = url.IndexOf('=');
then you can copy the value after "=" by using any method in Strings
then, also, use the methods of String like concat and create the new url that yoy want, in the format that you want.
best of luck
Consider using the .net class System.Uri. Pass the URL into the constructor and use its Query parameter to get a string representing the querystring.
If you want to look through individual parameters, there are two ways:
1. Brute force. Use the Split('&') method on the string class to create an array of elements. Then loop through them.
2. Regular expression. I think the expression is:
Parameter name;
=
any text
? OR end of line
Here's the reference I like for building regular expressions:
http://devedge.netscape.com/library/manuals/2000/javascript/1.5/reference/regexp.html#1193136
The .net class is System.Text.RegularExpressions.Regex.
0 comments:
Post a Comment