//check file extention of a file using C# Sanjeewa sapumana
private bool CheckMediaFileExtention()
{
string UploadedMediaFileName = btnFileUploadSelectMediaFile.FileName;
string[] file = new string[2];
file= UploadedMediaFileName.Split('.');
if (file.Length < 2)
{
return false;
}
string fileext = file[1].ToLower();
if (fileext == "wmv" || fileext == "avi")
{
return true;
}
else
{
TrMessage.Visible = true;
lblError.Text = Constants.MSG_Notifications_EnterSpecifiedMovieFormat.ToString();
lblError.CssClass = Structures.MessegeTypeCSS.MessageError.ToString();
return false;
}
}
Friday, May 2, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment