I need a certain part of current URL.
Say for example the URL is: http://www.abc.com/123/product/234?productid=123
And I want to check if a certain string contains http://www.abc.com/123
Please don't give answers like "do string manipulation" and all. Is there a way to get this sort of URL?
The Uri class has some really helpful methods for Uri mangling - including Uri.TryCreate.
Specifically, the GetComponents method might help you.
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