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

ASP.NET

 
GeneralRe: WCF Service Exception Pin
indian1435-Jan-11 16:25
indian1435-Jan-11 16:25 
AnswerRe: WCF Service Exception Pin
GlobX5-Jan-11 16:35
GlobX5-Jan-11 16:35 
QuestionASP.NET Visual Studio.NET 2010 Pin
Nino_14-Jan-11 19:36
Nino_14-Jan-11 19:36 
AnswerRe: ASP.NET Visual Studio.NET 2010 Pin
Hiren solanki4-Jan-11 19:45
Hiren solanki4-Jan-11 19:45 
AnswerRe: ASP.NET Visual Studio.NET 2010 Pin
Keith Barrow4-Jan-11 20:55
professionalKeith Barrow4-Jan-11 20:55 
AnswerRe: ASP.NET Visual Studio.NET 2010 Pin
Abhijit Jana4-Jan-11 21:29
professionalAbhijit Jana4-Jan-11 21:29 
AnswerRe: ASP.NET Visual Studio.NET 2010 Pin
Nino_16-Jan-11 10:00
Nino_16-Jan-11 10:00 
Questionhow can i upload video or audio file into database? Pin
hassanmorsy4-Jan-11 12:30
hassanmorsy4-Jan-11 12:30 
Hello,
I use this code to upload image and it work very well..

if (!string.IsNullOrEmpty(fupldImage.FileName))
          {
              string savelocationimg = HttpContext.Current.Server.MapPath("~/upload/images/");
              if (fupldImage.PostedFile.ContentLength < 50000)
              {
                  DateTime x = DateTime.Now;
                  string imagename = x.Day.ToString() + x.Month.ToString() + x.Year.ToString() + x.Hour.ToString() + x.Minute.ToString() + x.Second.ToString() + x.Millisecond.ToString();
                  string imgext = fupldImage.FileName.Substring(fupldImage.FileName.LastIndexOf("."));

                  fupldImage.PostedFile.SaveAs(savelocationimg + imagename + imgext);
                  art.ImageURL = "~/upload/images/" + imagename + imgext;
              }
          }


but when I use the same code to upload a video or audio file.. it failure.. this is the code I used..

if (!string.IsNullOrEmpty(fupldVideo.FileName))
{
    string savelocationvideo = HttpContext.Current.Server.MapPath("~/upload/video/");

        DateTime x = DateTime.Now;
        string videoname = x.Day.ToString() + x.Month.ToString() + x.Year.ToString() + x.Hour.ToString() + x.Minute.ToString() + x.Second.ToString() + x.Millisecond.ToString();
        string videoext = fupldVideo.FileName.Substring(fupldVideo.FileName.LastIndexOf("."));

        fupldVideo.PostedFile.SaveAs(savelocationvideo + videoname + videoext);
        art.Video = "~/upload/video/" + videoname + videoext;

}


what is the problem.. and if it is incorrect code for upload video file what is the correct one?
thanks
AnswerRe: how can i upload video or audio file into database? Pin
Not Active4-Jan-11 12:40
mentorNot Active4-Jan-11 12:40 
QuestionHow can I display a pop-up when hovering over a Gridview row? Pin
JTRizos4-Jan-11 6:50
JTRizos4-Jan-11 6:50 
AnswerRe: How can I display a pop-up when hovering over a Gridview row? Pin
Not Active4-Jan-11 8:05
mentorNot Active4-Jan-11 8:05 
GeneralRe: How can I display a pop-up when hovering over a Gridview row? Pin
JTRizos4-Jan-11 9:33
JTRizos4-Jan-11 9:33 
GeneralRe: How can I display a pop-up when hovering over a Gridview row? Pin
Not Active4-Jan-11 9:56
mentorNot Active4-Jan-11 9:56 
GeneralRe: How can I display a pop-up when hovering over a Gridview row? Pin
JTRizos4-Jan-11 11:00
JTRizos4-Jan-11 11:00 
GeneralRe: How can I display a pop-up when hovering over a Gridview row? Pin
Parwej Ahamad4-Jan-11 9:59
professionalParwej Ahamad4-Jan-11 9:59 
GeneralRe: How can I display a pop-up when hovering over a Gridview row? Pin
JTRizos12-Jan-11 6:25
JTRizos12-Jan-11 6:25 
GeneralRe: How can I display a pop-up when hovering over a Gridview row? Pin
Parwej Ahamad12-Jan-11 6:43
professionalParwej Ahamad12-Jan-11 6:43 
GeneralRe: How can I display a pop-up when hovering over a Gridview row? Pin
JTRizos12-Jan-11 7:05
JTRizos12-Jan-11 7:05 
GeneralRe: How can I display a pop-up when hovering over a Gridview row? Pin
Parwej Ahamad12-Jan-11 7:17
professionalParwej Ahamad12-Jan-11 7:17 
GeneralRe: How can I display a pop-up when hovering over a Gridview row? Pin
JTRizos12-Jan-11 7:49
JTRizos12-Jan-11 7:49 
GeneralRe: How can I display a pop-up when hovering over a Gridview row? Pin
Parwej Ahamad12-Jan-11 8:09
professionalParwej Ahamad12-Jan-11 8:09 
GeneralRe: How can I display a pop-up when hovering over a Gridview row? Pin
JTRizos12-Jan-11 8:20
JTRizos12-Jan-11 8:20 
GeneralRe: How can I display a pop-up when hovering over a Gridview row? Pin
Parwej Ahamad12-Jan-11 8:24
professionalParwej Ahamad12-Jan-11 8:24 
GeneralRe: How can I display a pop-up when hovering over a Gridview row? Pin
JTRizos12-Jan-11 8:35
JTRizos12-Jan-11 8:35 
GeneralRe: How can I display a pop-up when hovering over a Gridview row? Pin
Parwej Ahamad12-Jan-11 8:43
professionalParwej Ahamad12-Jan-11 8:43 

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.