문제

I am passing query string and the url is as follows-> http://localhost:1086/Web/EditMobile.aspx?sno=2. But when i try to enter the url as follows,localhost:1086/Web/EditMobile.aspx?sno=23424324423432424 , i get the following error->Value was either too large or too small for an Int32. How do i handle this error. I must get an error report like " the value is not found in the table or database"

도움이 되었습니까?

해결책

You're presumably using something like int.Parse. Instead, use int.TryParse, and if it returns false, render the error message you actually want.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top