Forum

HomeHomeCoreCoreGeneralGeneralHow to get an unnamed querystring parameterHow to get an unnamed querystring parameter
Previous
 
Next
New Post
10/30/2014 5:20 AM
 

Hi All,

Using DNN 7 we can include parameters within the url. 

So I can have a url like this www.mydomain.com/productdetails/sku/12345/Mens-Slacks

Where productdetails is the page name, sku=12345 and the "Mens Slacks" text is ignored

Using this I can easily retrieve the sku parameter into a variable

However my client wants the url to look like this

www.mydomain.com/productdetails/Mens-Slacks

Using the OWS debugger I can see that Mens-Slacks is received in the QueryString but it does not have a name so how do I retreive it into a variable.

If I look at Request.Querystring I see this

TabId=116&Mens-Slacks&language=en-US

I don't think I can always count on the unnamed parameter being the second value in the string

Does anyone have any ideas how I can get at the unnamed value

Many thanks in advance for any help given

Tony








New Post
10/30/2014 5:37 AM
 
Just thought of one thing, I know that the text I want is after the last / in the url www.mydomain.com/productdetails/Mens-Slacks I can access the url using [RawUrl,Request] So does anyone know of a way to get all of the text after the last /. Tony
New Post
10/30/2014 6:00 AM
 

In this type of scenario I would simply use an IIS rewrite rule because then you are effectively forcing the value of the parameter. In this case it's not that you have a parameter with no name, you have a parameter with no VALUE. I'll check within OWS to see if I can identify the parameter, but the trouble is that even the System Query of the Querystring parameters isnt showing this parameter.


Kevin M Schreiner
Open Web Studio
PayPal - The safer, easier way to pay online!
Previous
 
Next
HomeHomeCoreCoreGeneralGeneralHow to get an unnamed querystring parameterHow to get an unnamed querystring parameter


 

New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seattle, WA • info@openwebstudio.com

Bookmark & Share Bookmark and Share