Hi, my media player is not working i have imported dll of windows player. And i have a folder name called upload in my application itself.In the first button i will upload the audio and in the second button im getting the filename using session and using it in the second button when ever i click second button media player is getting disappeared and im getting the fullpath with filename in the second button dont know why media player getting disappeared and i want this website too host also please help its very urgent.
Code:
protected void Button1_Click(object sender, EventArgs e)
{
string sr = Server.MapPath("./upload/");
if (FileUpload1.HasFile)
try
{
FileUpload1.SaveAs(Server.MapPath("./upload/") +
FileUpload1.FileName);
Label1.Text = "File name: " +
FileUpload1.PostedFile.FileName + "<br>" +
FileUpload1.PostedFile.ContentLength + " kb<br>" +
"Content type: " +
FileUpload1.PostedFile.ContentType;
Session["v"] = FileUpload1.PostedFile.FileName;
}
catch (Exception ex)
{
Label1.Text = "ERROR: " + ex.Message.ToString();
}
else
{
Label1.Text = "You have not specified a file.";
}
}
protected void Button2_Click(object sender, EventArgs e)
{
string dr1 = Session["v"].ToString();
string dr2 = Server.MapPath("./upload/" + dr1);
MediaPlayer1.Filename = dr2;
}
Comment