Blue Theme Orange Theme Green Theme Red Theme
 
Nevron Gauge for SharePoint
Home | Forums | ASP.NET 2.0 Tutorials | Web Services | How Do I...? | Class Browser | WPF Quick Starts | Advertise with Us
 | Consulting  
Submit an Article Submit a Blog 
Search :       Advanced Search »
Home » Blogs Home » Blog Detail

Play Background music on your website using asp.net

 by Purushottam Rathore on Nov 06, 2009

This is a simple blog to describe how to play audio file using asp.net.
Comments: 2 Views: 13476 Printable Version 

This is a simple example to play audio file.

Step 1:

Add an html page and an audio file in your application.

HTML page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

    <title>Untitled Page</title>

</head>

    <body>

        <bgsound src="Songs/07 - Hai Dard - Udit Narayan.mp3" loop="0" balance="0" volume="0">

    </body>

</html>

Step 2:

Now add new page as Video.aspx in your application and drop a button control on the page.

Video.aspx:

<form id="form1" runat="server">

    <asp:Button ID="ButtonPlay" runat="server" Text="Play" OnClick="ButtonPlay_Click"/>

</form>

protected void ButtonPlay_Click(object sender, EventArgs e)

{

    Response.Redirect("HTMLPage.htm");

}

 
 

Comment Request!
Thank you for reading this post. Please post your feedback, question, or comments about this post Here.
 
What do you say about this post? Post a comment here
*Title:
*Comment:
 

Nice by vijay shinde On Dec 19, 2010
It is a very nice & easy

Nice by Suresh Paldia On Nov 12, 2010
Gud one and very easy.. Thank You

Nevron Gauge for SharePoint
Become a Sponsor

 Blogger's Profile
Age: Not Available
Location:
Title: Developer
Joined: Apr 19, 2007
Education: Masters Degree
 More Blogs from this Blogger
Play Background music on your website using asp.net
Repeat Background image using style in html tag.
Difference between datagrid datalist
Benefits and limitations of using Cookies
LINQ
View all »
 Latest Blogs
[Video] OnClose Handler
[Video] Storing and Loading the Window and Toolbar position
The Euclidean Algorithm
Swapping Exe Process
How Exe file is Generated by VS2005 C++ Project?
What is Exe
Header files: Multiple Inclusion problem - Solution B
Header files: Multiple Inclusion problem - Solution A
Header files: Multiple Inclusion problem - Reason
Header files: Multiple Inclusion problem
View all »
 Latest Jobs
More ... 
 Latest Interview Questions
More ... 
6 Months Free & No Setup Fees ASP.NET Hosting!
 © 2012  contents copyright of their authors. Rest everything copyright Mindcracker. All rights reserved.