Question: How do you check if Url in the Asp.net MVC has a certain value or text?
Please Login to see the rest of the answer
Answer: Follow the steps below:
1. Make sure you are using the following Namespace in your Views
@using Microsoft.AspNetCore.Http2. In your View or a Layout type
@if(this.Context.Request.Path.Value.Contains("/myText")){
//Do some Magic
}
Write an Article