then you should just upgrade the database no ?
UPDATE [VideosTable] SET video_url = SUBSTRING( video_url, CHARINDEX('v=', video_url) + 2, CHARINDEX('&', video_url, CHARINDEX('v=', video_url)) - (CHARINDEX('v=', video_url) + 2) ) WHERE video_url LIKE '%youtube.com%';
Then you can just use the video id that comes from the database ...
if you are loading the video id from the hole link, use the URI instead
Uri youtube = new Uri("http://www.youtube.com/watch?v=72xSxQIRelc&feature=youtube_gdata"); string videoId = HttpUtility.ParseQueryString(youtube.Query)["v"];
Silverlight Update
Silveright is missing two things, support for the ParseQueryString part of System.Web.HttpUtility and System.Collections.Specialized.NameValueCollection
So, why not just add this functionality yourself?
Since HttpUtility already a static object, you cannot extend it, but you can easily create something new for yourself:
public static class MyHttpUtilities { public static System.Collections.Generic.Dictionary<string, string> ParseQueryString(this string queryString) { System.Collections.Generic.Dictionary<string, string> r = new Dictionary<string, string>();
and then use:
string videoId = MyHttpUtilities.ParseQueryString(youtube.Query)["v"], feature = MyHttpUtilities.ParseQueryString(youtube.Query)["feature"];