Utility to combine querystrings?

Posted by adam0101 on Stack Overflow See other posts from Stack Overflow or by adam0101
Published on 2010-04-28T14:42:26Z Indexed on 2010/04/28 15:23 UTC
Read the original article Hit count: 288

Filed under:
|
|

Is there a utility to combine querystrings? I'm looking for something like:

Input: Combine("test=a&test2=b", "test3=c") Result: "test=a&test2=b&test3=c"

Input: Combine("test=a&test2=b", "") Result: "test=a&test2=b"

Input: Combine("", "test3=c") Result: "test3=c"

And maybe some weird ones:

Input: Combine("&test=a&test2=b", "?test3=c") Result: "test=a&test2=b&test3=c"

© Stack Overflow or respective owner

Related posts about .NET

Related posts about querystring