How to pass user control fields data to page viewmodel on user control button click

I have an user control with few fields and a search button, the user enters the search criteria in the user control fields and clicks on the search button present in the user control, then a page viewmodel method is called via command binding. But the data entered by the user in the user control fields is not available in the page level viewmodel method triggered by the click of the search button present in the user control. How to resolve this issue.

Hi! Could you please share a bit of code which has the issue? What you are describing should normally work, but there can obviously be some subtle issue