Click here to Skip to main content
15,891,184 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: A form for creating a one to many record in a db Pin
Quake2Player22-Sep-09 6:37
Quake2Player22-Sep-09 6:37 
QuestionSystem.ArgumentNullException: Value cannot be null. [modified] Pin
kmsandeep21-Sep-09 13:38
kmsandeep21-Sep-09 13:38 
AnswerRe: System.ArgumentNullException: Value cannot be null. Pin
Expert Coming21-Sep-09 14:00
Expert Coming21-Sep-09 14:00 
GeneralRe: System.ArgumentNullException: Value cannot be null. Pin
kmsandeep22-Sep-09 13:36
kmsandeep22-Sep-09 13:36 
GeneralRe: System.ArgumentNullException: Value cannot be null. Pin
Ram Cronus28-Sep-09 9:41
Ram Cronus28-Sep-09 9:41 
QuestionInvalid attempt to call Read when reader is closed. Pin
kunal naik21-Sep-09 12:30
kunal naik21-Sep-09 12:30 
AnswerRe: Invalid attempt to call Read when reader is closed. Pin
kmsandeep21-Sep-09 13:46
kmsandeep21-Sep-09 13:46 
QuestionHow to Save the voice record file in the client system Using MCI in c# .net 2.0 web application Pin
bruze21-Sep-09 10:15
bruze21-Sep-09 10:15 
c# .net 2.0 web application.

I have tried following code.It is working fine in Server box (I have created vitrual direcory for record folder in c: drive "),

but it not working in client box.


c:\\record\\record.wav"


Code

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Microsoft.VisualBasic.Devices;
using Microsoft.VisualBasic;
using System.Runtime.InteropServices;

public partial class Recording : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    [DllImport("winmm.dll", EntryPoint = "mciSendStringA", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
    private static extern int mciSendString(string lpstrCommand, string lpstrReturnString, int uReturnLength, int hwndCallback);


    protected void btnRecord_Click(object sender, EventArgs e)
    {
        //Record
        mciSendString("open new Type waveaudio Alias recsound", "", 0, 0); 
        mciSendString("record recsound", "", 0, 0);
    }

    protected void btnSaveStop_Click(object sender, EventArgs e)
    {
        // stop and save
        mciSendString("save recsound c:\\record\\record.wav", "", 0, 0); 
        mciSendString("close recsound ", "", 0, 0); 
        Computer c = new Computer(); c.Audio.Stop();


    }

    protected void btnRead_Click(object sender, EventArgs e)
    {
        //Read
        Computer computer = new Computer();
        computer.Audio.Play("c:\\record\\record.wav", AudioPlayMode.Background);
    }
}


Thanks,
Bruze
AnswerRe: How to Save the voice record file in the client system Using MCI in c# .net 2.0 web application Pin
Abhishek Sur21-Sep-09 11:10
professionalAbhishek Sur21-Sep-09 11:10 
GeneralRe: How to Save the voice record file in the client system Using MCI in c# .net 2.0 web application Pin
bruze21-Sep-09 11:23
bruze21-Sep-09 11:23 
GeneralRe: How to Save the voice record file in the client system Using MCI in c# .net 2.0 web application Pin
Abhishek Sur21-Sep-09 11:37
professionalAbhishek Sur21-Sep-09 11:37 
GeneralRe: How to Save the voice record file in the client system Using MCI in c# .net 2.0 web application Pin
bruze21-Sep-09 11:54
bruze21-Sep-09 11:54 
AnswerRe: How to Save the voice record file in the client system Using MCI in c# .net 2.0 web application [modified] Pin
rahul145510-Mar-10 18:48
rahul145510-Mar-10 18:48 
Questionthe style changed problem by alert message box Pin
Seraph_summer21-Sep-09 10:13
Seraph_summer21-Sep-09 10:13 
AnswerRe: the style changed problem by alert message box Pin
Abhishek Sur21-Sep-09 11:05
professionalAbhishek Sur21-Sep-09 11:05 
QuestionUsers and Cookies in ASP.NET MVC Pin
Quake2Player21-Sep-09 10:08
Quake2Player21-Sep-09 10:08 
AnswerRe: Users and Cookies in ASP.NET MVC Pin
Abhishek Sur21-Sep-09 11:02
professionalAbhishek Sur21-Sep-09 11:02 
GeneralRe: Users and Cookies in ASP.NET MVC Pin
Not Active21-Sep-09 11:10
mentorNot Active21-Sep-09 11:10 
AnswerRe: Users and Cookies in ASP.NET MVC Pin
Not Active21-Sep-09 11:08
mentorNot Active21-Sep-09 11:08 
Questionfocus on page Pin
Member 439315621-Sep-09 7:18
Member 439315621-Sep-09 7:18 
AnswerRe: focus on page Pin
Abhishek Sur21-Sep-09 8:57
professionalAbhishek Sur21-Sep-09 8:57 
GeneralRe: focus on page Pin
Abhijit Jana21-Sep-09 9:47
professionalAbhijit Jana21-Sep-09 9:47 
GeneralRe: focus on page Pin
Abhishek Sur21-Sep-09 11:00
professionalAbhishek Sur21-Sep-09 11:00 
QuestionBulleted list control Pin
janani1321-Sep-09 3:43
janani1321-Sep-09 3:43 
AnswerRe: Bulleted list control Pin
Not Active21-Sep-09 4:07
mentorNot Active21-Sep-09 4:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.