# A href to the same page with different parameter goes nowhere

**URL:** <https://forum.radzen.com/t/a-href-to-the-same-page-with-different-parameter-goes-nowhere/10059>\
**Category:** Radzen.Blazor Components\
**Created:** [February 5, 2022, 9:31pm UTC](https://forum.radzen.com/t/a-href-to-the-same-page-with-different-parameter-goes-nowhere/10059 "2022-02-05T21:31:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harvey\_Myers](https://forum.radzen.com/user_avatar/forum.radzen.com/harvey_myers/32/5331_2.png) [@Harvey\_Myers](https://forum.radzen.com/u/Harvey_Myers)\
**Post date:** [February 5, 2022, 9:31pm UTC](https://forum.radzen.com/t/a-href-to-the-same-page-with-different-parameter-goes-nowhere/10059/1 "2022-02-05T21:31:37Z")

</div>

**A href to the same page with different parameter goes nowhere.**

EDIT: I changed this completely as I misstated it badly, yet, I'm sure many have the same question.

I didn't realize that if you place an html anchor tag to the same page with a different parameter, the page will not change. You need to detect it in **OnParametersSetAsync()** as shown in response. (I answered my own question)

---

<div class="post-metadata">

**Author:** ![Harvey\_Myers](https://forum.radzen.com/user_avatar/forum.radzen.com/harvey_myers/32/5331_2.png) [@Harvey\_Myers](https://forum.radzen.com/u/Harvey_Myers)\
**Post date:** [February 6, 2022, 6:05pm UTC](https://forum.radzen.com/t/a-href-to-the-same-page-with-different-parameter-goes-nowhere/10059/2 "2022-02-06T18:05:28Z")

</div>

I found the answer to this, it was fairly simple. The page that I was linking to was the same page I was on with a different parameter. I had to compare the current parameter to the requested parameter in the OnParametersSetAsync() and if changed, call a routine to refresh the data. .

> ```
> protected override async System.Threading.Tasks.Task OnParametersSetAsync()
> {
> // This event will fire when the parameters change
> // This code alwas executes but if the cleint changes and the page deoesn't
> // the main entry code won't be exdecuted. This should fix it by only calling on a client change.
> 
> if (Id != client.Id)
> {
> await PopulateData();
> }
> 
> }
> 
> ```
