I know how to access url path id for some detail view in visual query designer.
But what is the right way to get this value in view razor script. I know that I can manualy parse path, but I am interested if there is already some function to do that?
Seems like you already found the answer :).
DNN will map all parameters after the page-url in the pattern /key/value/key/value/key/value
so it will then always be available in the Request.QueryString["key"]