I have a method to play a language audio, but at the moment this method is only playing one language. I want to call another method which will do the same function but for another language as opposed to a different file all together.
My file:
public class AudioHandler : IHttpHandler
{
public bool IsReusable
{
get
{
return false;
}
}
public void ProcessRequest(HttpContext context)
{
int id = Convert.ToInt32(context.Request.QueryString["id"]);
byte[] bytes = new byte[0];
using (The_FactoryDBContext db = new The_FactoryDBContext())
{
bytes = db.Words.FirstOrDefault(word => word.wordID == id).engAudio; // here will be the change in the second method .afrAudio
context.Response.ContentType = "audio/wav";
context.Response.BinaryWrite(bytes);
context.Response.Flush();
//}
}
}
}
}
How do i call the second method?
this is how i am calling this handler:
audio.src = "/AudioHandler.ashx?id=" + id;
How would this differ when there is a second method and what will it look like
Thanks