Why is the null coalescing operator breaking my string assignment in c#?
<p>I'm creating a query string in a web form, and I'm dealing with values from the parameters that might be null. There are lots of ways to check and fix these, but the most elegant one I found is the following:</p>

<pre><code>string pass;
pass = "BillabilityDetail.aspx?_startDate=" + _startDate.Text + "&amp;_endDate=" + _endDate.Text + 
       "&amp;_isContractor=" + _isContractor.SelectedValue + "&amp;_busUnit=" + _busUnit.Text 
       + "&amp;_projectUnit=" + _projectUnit.SelectedValue + "&amp;_leadCon=" + _leadCon.Value ?? -1
       + "&amp;_acctExec=" + _acctExec.Value ?? -1 + "&amp;_isBillable=" + _isBillable.SelectedValue + 
       "&amp;_isActive=" + _isActive.SelectedValue + "&amp;_include=" + _include.SelectedValue;
</code></pre>

<p>The only issue is... it doesn't work. When the code reaches this part, </p>

<pre><code>"&amp;_leadCon=" + _leadCon.Value ?? -1 + "&amp;_acctExec=" + _acctExec.Value ?? -1 
</code></pre>

<p>the string stops assigning values. So the string would end with &amp;_leadCon=.
I know of ways to work around this, but I don't know why it stopped working in the first place. Any tips?</p>
