TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ajay Raj
NA
142
105.4k
How to upload video on web site
May 5 2012 7:56 AM
Hi,
Sir I want to upload video upload on the ASP.NET , Click on the submit Button then disconnect the web browser.
please resolve the problem.
protected void Button1_Click(object sender, EventArgs e)
{
if (FileUpload1.HasFile)
{
String fileName = FileUpload1.FileName;
String fileExtension = Path.GetExtension(fileName).ToLower();
if (fileExtension.Equals(".flv") || fileExtension.Equals(".wmv"))
{
if (!File.Exists(Path.Combine(Server.MapPath("~/video/"), fileName)))
{
String fullFileName = Path.Combine(Server.MapPath("~/video/"), fileName);
FileUpload1.SaveAs(fullFileName);
lbl_v_msg.Text = "Uploaded Successfully......";
}
else
{
lbl_v_msg.Text = "That file already exists! You must delete the current version to add an updated version.";
}
}
else
{
lbl_v_msg.Text = "Only .flv or .wmv files are allowed!";
}
}
else
{
lbl_v_msg.Text = "Select a file to upload!";
}
}
Reply
Answers (
0
)
Caching
How to found price in DB by the id selected element use jquery?