URL link parameter for Id dynamic object set as string

I am trying to create a URL link that will show a contact details when that contact name is selected. Creating suitable parameters generates code defining the parameter as such:
public dynamic ContactId { get; set; }
This is the same for other code generated to handle the standard grid line item select for record edit, passing ContactId to the appropriate get method/ etc.
The custom URL includes the ContactId in the URL as parameter thus :
localhost:5000:display-contact/123 (123 being the appropriate ContactId).
The ContactId is however received as a string in the ShowContactComponent class - generating a runtime error. If the variable is manually updated via VS debug to integer the data is displayed as expected.
I cant see any obvious solution to this in the Radzen tool t ensure the code generated handles the parameter correctly.
Anyone seen this/ have a possible solution?

Many thanks!

You may also cast explicitly before passing page parameters

Many thanks for your reply, pointed me in the right direction. Found that the following worked for me in the parameter properties