How to use Parameter passed from one page to other on Dialog component

I have a page where click of a button needs to send few objects to "Dialog" component. I can see syntax below that, dialogService.Open takes a dictionary for parameter. How do I consume those parameters passed on that dictionary on the landing page (ie "Dialog" in this case?

To be specific, I am not passing a string (ie OrderId) but passing full object (ie Order)

<RadzenButton Text=@($"Show OrderID: {orderID} details") Click="@(args => dialogService.Open<DialogCardPage>($"Order {orderID}",
                        new Dictionary<string, object>() { { "OrderID", orderID } },
                        new DialogOptions(){ Width = "700px", Height = "530px", Left = "calc(50% - 350px)", Top = "calc(50% - 265px)" }))" />

Hi @ShishirDahal,

You create a property of the page opened with the DialogService and decorate it with the [Parameter] attribute. Check the third tab (DialogCardPage) from our example

@code {
    [Parameter] public int OrderID { get; set; }
}
2 Likes