This project is read-only.

Reading querystring on starting orchard

Topics: Writing modules
Oct 26, 2011 at 7:48 AM

I am busy developing an affiliate program module in which I need to retreive the querystring passed into orchard from an affiliate site.

Can anybody advise as to what would be the easiest way to retreive the querystring in my module in this scenario.

Thank you in advance.

Oct 26, 2011 at 7:58 AM

Well, model binders will just do that naturally. Name your action parameters like your querystring parameters and they will just get mapped. If you really had to, you could look at the current http context but that would be evil.

Oct 26, 2011 at 12:10 PM

Absolutely right Bertrand, "Model binders" now why didn't I think of that. Sometimes my mind goes into freeze mode and nothing sensible comes out so excuse the ignorance...