How to get url parameter id in view/page perspective

Remember that url parameters are strings. Here it seems you're passing "31", which you might be trying to use as an int. Convert to int before using with your dropdown.