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

Top 5 Contributors of the Month

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

how to search the mp3 files using asp.net with c#

Posted By: RAJ     Posted Date: May 22, 2011    Points:5   Category :ASP.Net
gud morning sir
when i enter the movie name in textbox then i want to get the total songs availabe in that movie and when i click one song in that movie i want to paly that movie song by windows media player
please help how can i get this task using c#

Author: Gowthammanju             
Posted Date: May 23, 2011     Points: 20   

follow the below steps,
1)place one dropdown and access the strings by placing the audio url to it

place the seperate folder copy the songs to it get url by "Videos/video21.avi"

where Videos is foldername
and video21.avi is song name

there by ur source page look like

<asp:DropDownList ID="DropDownList1" runat="server" Style="z-index: 100; left: 23px;
position: absolute; top: 19px" Width="223px" Font-Underline="True">
<asp:ListItem Value="Videos/video21.avi">1</asp:ListItem>

2) write this coding in page load event

string srcd = DropDownList1.SelectedValue.ToString();
literal1.Text = getval(srcd);

3) call function as

protected string getval(string sroc)
string objtab = "";
objtab = objtab + "<embed type='application/x-mplayer2'pluginspage='http://microsoft.com/windows/mediaplayer/en/download/' id='EMBED1' name='mediaPlayer' displaysize='4' autosize='-1' bgcolor='darkblue' showcontrols='true' showtracker='-1'showdisplay='0' showstatusbar='-1' videoborder3d='-1' width='320' height='285' src=" + sroc + " autostart='true' designtimesp='5311' loop='true'>";
objtab = objtab + "</embed>";
return objtab;

this displayes player in ur page that runs the above songs listed in drop down

Thanks & Regards,

Mark if the answer is true

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