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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

play wav or mp3 > vb

Posted By:      Posted Date: September 15, 2010    Points: 0   Category :ASP.Net
hi i have a button<asp:button id="button1" runat="server" text="play" /> so i have a mp3 or wav file in root~/123.wavi need some code in my button for play audio in page background .can you help me !?

View Complete Post

More Related Resource Links

Play video


Hi to all 

 I have asp.net 2.0 & VS 2005. I want to play a video file in my web application, is there any control for this else help me how to play video in browser. Is this complex ?

Least Privilege: Teach Your Apps To Play Nicely With Windows Vista User Account Control


User Account Control in Windows Vista keeps the OS safe from intentional and accidental configuration changes.

Chris Corio

MSDN Magazine January 2007

SoundPlayer Load / Play timing

I'm trying to create an application where I need sounds to play and pictures to appear at very precise times. So I have a sound that is suppose to play at, let's say 100 ms after something else happened. I'm using SoundPlayer.Play to play the sound on a Thread.Timer tick and that seems to work. However, the first play is slightly delayed (by ~40-50 ms) because it has to load the .wav file before it can play it. So, I tried using SoundPlayer.Load to load the file before I need to play the sound. However, this doesn't seem to make a difference. The only way I can make sure the first play occurs at the right time is to play the sound in advance (before opening the Window where all this occurs). Why doesn't SoundPlayer.Load seem to actually load the wav file completely? And how can I make sure the sound is loaded (preferably without having to play it).

C# - Easy - Play music + Next song! - Please Look

Hello! Today i try write my own Music Player in C# - winmm.dll, but I don't know, how to go to next song, when last is end. My Aplication: Button1. Load music. Button2. Add address from textBox, to listbox. Button3. Stop playing. And all work, when i add my music to playlist, and click on selected address, music start. But: - How i can go to next song, when last end?. Because now, when song is end, player no start play next song. Eg: Music1 Music2 Music3 Music4 Eg. - When I click on Music2 it starts to play, but then wants go to the next song when Music2 end - in this case Music3 . - When I click on Music1 it starts to play, but then wants go to the next song when Music1 end - in this case Music2 . etc... Easy Play list... Eg: In listBox have: C:/Music/Blablabla.mp3 C:/Music/Blablabla2.mp3 C:/Music/Blablabla3.mp3 And i want: C:/Music/Blablabla.mp3 started.... Song.... End. Now my program: Play song... When song end, make nothing. I want when: C:/Music/Blablabla.mp3 when song is end, go to C:/Music/Blablabla2.mp3. When C:/Music/Blablabla2.mp3 end go to: C:/Music/Blablabla3.mp3. When C:/Music/Blablabla3.mp3 end, go to: C:/Music/Blablabla.mp3 (First song) This is my code:     using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.

How to play a .mp4 video file with WPF (mediaelement) ?

I would like to play a .mp4 with WPF.Does anybody know how can I accomplish it?It can play wmv but when I try to play a .mp4 it doesn't show anything. It's strange because the Blend designer shows the first frame of the .mp4 video in the mediaelement.I can play the video with Windows Media Player...Waiting for an aswer...

play a beep at client side when ...

how we can play an small size mp3 or audio inside of clients ( RealTime ) by control from admin when admin are using from ms sql data base in vb ?plz help me . how i can play an audio for my customers when i push a PlayButton (real time) .

How well does SharePoint REALLY work and play with an RODC-based AD environment?

We are running into a host of interesting little problems getting SharePoint Foundation 2010 to work and play well in a DMZ where its only access to Active Directory is through a read-only domain controller (RODC).  Our SharePoint server is on the DMZ, along with an RODC, while our database server is on our internal network, along with our main AD domain controllers. The SharePoint Configuration Wizard simply WOULD NOT complete successfully until we set up a temporary firewall rule that granted the SharePoint full access to AD.  At that point, we could successfully run the SharePoint and SharePoint Farm configuration wizards, and create a site collection, identifying two domain users as site collection admins.  After we turned off the firewall rule, once again restricting the server to AD access via the RODC, we could create and access SharePoint sites just fine, so long as the users involved were the two identified as site collection administrators. However, when I tried to create a new SharePoint site group and identify a third domain user as the group owner, or add a new user to one of the existing SP site groups, or even just grant site-level permissions directly to a domain user (other than the two site collection admins), the user name would not resolve.  I suspect that the site admins resolve okay because SharePoint already has them cached in it

Media Web Part won't play

Hello, i've inserted a media web part into the detailed content portion of my page.  i've configured it to start automatically and provided the correct link.  When i access the page, the video doesn't start, in fact there is a blank space where the web part is.  However when i hover my mouse over the web part are, the web part suddenly appears and starts playing.  anybody have an idea what is wrong here and how to fix it?  Thank you in advance.

play storyboard with dynamically created image

this is my storyboard:   <Storyboard x:Key="expandStoryboard"> <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="2" Duration="0:0:0.2" /> <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="2" Duration="0:0:0.2" /> </Storyboard> <!-- This storyboard will make the image revert to its original size --> <Storyboard x:Key="shrinkStoryboard"> <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="0:0:0.2" /> <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="0:0:0.2" /> </Storyboard>   and i created image dynamically:   BitmapImage bmp = new BitmapImage(); bmp.BeginInit(); bmp.UriSource = new Uri("file:///" + arrstrFileNames[0].Replace("\\", "/")); bmp.EndInit(); Image img = new Image(); img.Source = bmp; RotateTransform rt = new RotateTransform(); img.LayoutTransform = rt; ScaleTransform st = new ScaleTransform(); st.ScaleX = 1; st.ScaleY = 1; img.LayoutTransform = st; if(first==true) img.ContextMenu = mnu; first = false; assignEv

Play 1080p/1080i MTS Movie on Samsung Galaxy S-Convert AVCHD to Galaxy S

Play 1080p/1080i MTS Movie on Samsung Galaxy S-Convert AVCHD to Galaxy S Samsung Galaxy S GT-I9000 utilizes a large 4-inch WVGA Super AMOLED screen, a 1GHz processor and the Android 2.1 operating system. The camera is 5MP with option for 720p HD video recording at 30 frames per second. Other goodies include 3G, Wi-Fi, A-GPS, HD video playback, as well as playback for many other formats like MPEG4, H.263, H.264, DivX, XviD, WMV, AVI, 3GP, Flash Video, MP3, AAC, AAC+, eAAC+, FLAC, WMA, WAV, AMR, OGG, MIDI. Obviously Samsung Galaxy S does not like MTS file, so if you have a AVCHD camcorder recorded HD movies in .mts format, e.g. Panasonic HDC-TM700/HS700/SD700, Sony HDR-XR520V, Canon Legera HF200, Panasonic Lumix DMC-ZC3, JVC Everio GZ-HD10, etc and wanted to play them on Samsung Galaxy S. You can convert the MTS videos to H.264 MP4 which Samsung Galaxy S supported. How to convert and play AVCHD MTS files on Samsung Galaxy S? Don’t worry, Aunsoft MTS to Samsung Galaxy S Converter is such a useful and powerful 1080p/1080i AVCHD MTS to Samsung Galaxy S Converter that can convert all MTS formats with different codecs to Samsung Galaxy S (*.mp4) with fast conversion speed, perfect video and audio synchronization, and high output quality. Step-by-Step Guide: 1. Download the AVCHD MTS to Samsung Galaxy S for free and then install, start up it. (This free tr

Silverlight media player change source and play from javascript

I am having trouble accessing an embedded Silverlight 2 media player in an aspx page from Javascript and was hoping someone might offer some insight on what's going on. What I want to do is fire a javascript event on the client when a button is pressed to change the Silverlight media player media source and then play the newly selected file. I found what seemed like a pretty straightforward example on the silverlight.net site that looked like this:<%@ Page Title="" Language="VB" MasterPageFile="~/master.master" AutoEventWireup="false" CodeFile="Test.aspx.vb" Inherits="Test" %> <%@ Register Assembly="System.Web.Silverlight" Namespace="System.Web.UI.SilverlightControls" TagPrefix="asp" %> <asp:Content ID="Content1" ContentPlaceHolderID="Middle" Runat="Server"> <asp:MediaPlayer ID="Media1" runat="server" Height="240px" Width="320px"> </asp:MediaPlayer> <button id="Button1" onclick="onPlay()" type="button">Play</button> <script type="text/javascript"> function onPlay() { try { var player = $find("ctl00_Middle_Media1"); player.set_mediasource("example.mp3");

want to play movie in popup

Hiiii Coders, I have an image and i want whenever user click on it, it should play a movie at the center of the page. Means on clicking image, it should open a popup window where my player will play a movie. How can i achieve this? plz rep asap thanx and regards 

Play uninterrupted music across postbacks

Hi,I'm in need of providing uninterrupted music to the visitor of my web site.The music is played by a 3rd party Flash object. I need to some how maintain an instance of this flash object in memory so that the visitor of the site will experience uninterrupted music (even while navigating to the other pages in the site).The idea is to have one instance in memory (hidden which survives postbacks) and the othe displayed to the visitor (this will sync up with the hidden player).If you suggest using iFrame in a master page, pl let me know how to handle multiple master pages scenario. My site contains more than one master page. And with iFrame we don't get to see the actual URL being served in the address bar.I know pop-up window is another option. But would like to know if I can do anything with the iFrame.Thanks.

I need a static music player on my website that continues to play music when the user navigates to d

I'm not sure if this is the right area, but I'm needing to have a music player on my website that stays static when the user navigates through my site, and continues to play without interruption.  Currently I have a Flash player that works great, but obviously it stops playing when the user goes to a different area of the site.  Make sense??  Thanks in advance!!

How to play wmv file is stored in ftp server using MediaElement?

Hello, I have a ftp server to store wmv files (with username and password). MediaElement can play a local wmv file well, but when I change the uri to access a file in ftp server (ftp://abc.serveftp.net/Assets/sample.wmv) and media element cannot play this file, I try to use Window Media Player installed on my machine to open a wmv file manually and that's ok, I think it is possible for MediaElement can play wmv throught ftp. How can I do that? Thank you for your answer. string sourceFile = "ftp://abc.serveftp.net/Assets/sample.wmv"; mediaElement.Source = new Uri(sourceFile);

adding play / stop button to a simple slide show


Hi guys,

I got the following code with the help of raghav khunger and I wanna add a play and stop button on it to cycle the pictures orderly and stop them. how can I do that?

<%@ Page Language="C#" %>

<%@ Import Namespace="System.Web.Services" %>
<!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 id="Head1" runat="server">
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <style type="text/css">
            width: 100px;
            height: 100px;
            width: 400px;
            height: 300px;
    <form id="form1" runat="server">
    <asp:Image ID="imgMain" CssClass="main-image" runat="server"  ImageUrl="http://www.clubalbuquerque.com/files/images/15%20Random%20Greenery.JPG"/>
    <br />
    <div id="thumb-container">

How to play around with Columns' names filled by OleDbDataAdapter ?


I tried to query an excel file which contains a lot of customers' information but my problem is most of those don't have a specific column names.

E.g. it's in the following format. (Excel File)

A         B         C

Info1  blur    blur
Info2  blur    blur
Info3  blur    blur

So, when I query using SqlDbDataAdapter, in my DataTable, info1 blur blur becomes column header.

E.g. it's in the following format. (DataTable)

Info1 blur blur

Info2 blur blur
Info3 blur blur

I been working on it so that it actually goes down one row and Change the column name in the DataTable into some appropiate name. Something like the following format.

Name1  Name2  Name 3

Info1       blur        blur
Info2       blur        blur
Info3       blur        blur

Is there any way that I could work around it rather than actually going back to change the excel files ? Because I have like 1,000 excel files in that kinda format and s

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

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