The approach you are currently using is what we currently refer to as the "Big Hammer" approach where you are attempting to encode the entire URL as opposed to encoding the untrusted or tainted data being supplied by an untrusted source (ie, a user)
The best approach to this would be to encode the values of each parameter individually rather than attempting to encode the entire parameter string as a single piece of data. The primary purpose of output encoding is to eliminate the possibility of a user breaking out the the "data" context to a "control" context with the data they are providing.
In your example, the string partner=1&partner=2 looks like this to a parser
partner=1&partner=2
(Where bold is control and italic is data) - you only want to encode the data context of the string since the control context is not provided by the untrusted source.
If a user were your provide the data 1&partner=2 your encoded string should look like
partner=1%26partner=2&partner=2
Another important note here is that canonicalization is used to simplify a given string to it's most base format - so all encoding in the provided string will be decoded so that double and mixed encoding attacks cannot be performed.
The short answer to your question is to encode the values of the parameters individually as opposed to encoding the entire URL parameter string.
References: