I have an URL that goes something like this http://www.dev.example.com and some URL that is like this http://www.test.example.com.
I dont know where dev and test word would be, maybe on the end maybe, on beggining. What i need to do is to check does url has some word and do something , her is something i need
var test = "test";
if (Request.Url.AbsoluteUri **have** test)
{
/// Do something
}
You should try this
var test = "test";
if (Request.Url.AbsoluteUri.Contains(test))
{
/// Do something
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With