Already working from last 10 hours couldn't find the working solution.
If anyone could help, this will be really peaceful!
This is my source code =
@foreach (var datas in data)
{                   
    <a class="mylink" href="#" target="_blank">@datas.text</a>                   
}
@code { 
    private IEnumerable<RandomPick> data = new[] {
        new RandomPick { id = 1, text = "Diamond Price" },
        new RandomPick { id = 2, text = "Gold Price" },
        new RandomPick { id = 3, text = "Web Hosting"},
        new RandomPick { id = 4, text = "Insurance Price",
    };
}
My requirement is that, here our of 4 objects I want to choose any 2 random element only on the foreach loop, so when the loop is executed I only want to select 2 random element from the 4 object elements.
 
    