# URL: Passing variables

Add the path

```
@page "/reader/{Id:int}"
```

Bind the parameter

```csharp
[Parameter]
public string Id { get; set; }
```

It should be said that via the easy mix of code between the server and the GUI - this approach to pass variables might not the best way.   
But it could be used to implement an external facing URL, for example.

You'd then assign a variable with the **@onclick** - where the @-sign denotes it will be run on the server.

[![image.png](/uploads/images/gallery/2024-10/scaled-1680-/zAzimage.png)](/uploads/images/gallery/2024-10/zAzimage.png)

It then allows you to write code that renders different HTML.

[![image.png](/uploads/images/gallery/2024-10/scaled-1680-/yYnimage.png)](/uploads/images/gallery/2024-10/yYnimage.png)