M
mortb
I'd like to build a URL using String.Format
String.Format("http://server.com/page.aspx?id={0}{1:\&optionalParameter=0;&}",
id, optionalParam);
The idea is that I want to exclude the &optionalparamter=value part of the
string when optionalParam is negative.
I've tried to place nothing after the semicolon blank but that outputs
(strange?) the minus sign to the url string.
The help in MSDN points to a description of VB6 format function and that
gives me no help (could microsoft pelase update this?).
Any help appreciated!
thanks,
mortb
String.Format("http://server.com/page.aspx?id={0}{1:\&optionalParameter=0;&}",
id, optionalParam);
The idea is that I want to exclude the &optionalparamter=value part of the
string when optionalParam is negative.
I've tried to place nothing after the semicolon blank but that outputs
(strange?) the minus sign to the url string.
The help in MSDN points to a description of VB6 format function and that
gives me no help (could microsoft pelase update this?).
Any help appreciated!
thanks,
mortb