Getting the following error when clicking a link in an application, 'Input string was not in a correct format'.Tried changing things around several times but no luck so this my last resort.

Heres the line of code that brings up the error

有帮助吗?

解决方案

Problem is Request[UrlParameters.UrlParameterName.ComplianceActionRisk] is not of type int. So, instead of using Parse, use TryParse which will convert the value to int if its compatible otherwise default value -1 will be used -

int ComplianceAction = -1;
Int32.TryParse(Request[UrlParameters.UrlParameterName.ComplianceActionRisk],
                       out ComplianceAction);
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top