.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> WPF >> Post New QuestionBookmark and Share Subscribe to Forum

getting mediaelement source from table..

Posted By: Jayakumar     Posted Date: April 09, 2010    Points:2   Category :WPF
hi,


thanks for replies..

i am storing the media element's source string(hosanna.mp3) in table..
and retrieving it from datagrid selection changed to the media element source..

check my code..
private void dgO_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
for (int i = 0; i < dsM.Tables[0].Rows.Count; i++)
{
txturi.Text= dsM.Tables[0].Rows[i][15].ToString();
mediaElement1.Source =New Uri(txturi.Text);

error is thrown at this point "New Uri(txturi.Text);"
}
}
is this rite;

Responses
Author: Sunil Yadav       [Moderator]      
Posted Date: May 28, 2010     Points: 5   

Hi,

Try using

mediaElement1.Source =New Uri(txturi.Text,UriKind.Absolute );




Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend