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

Top 5 Contributors of the Month

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

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;

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


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

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