Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get a certain part of current URL in silverlight?

Tags:

c#

silverlight

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?

like image 719
Manish Avatar asked Dec 07 '22 05:12

Manish


1 Answers

The Uri class has some really helpful methods for Uri mangling - including Uri.TryCreate.

Specifically, the GetComponents method might help you.

like image 62
kͩeͣmͮpͥ ͩ Avatar answered Jan 11 '23 23:01

kͩeͣmͮpͥ ͩ