Click here to Skip to main content
15,881,882 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questiondownload visual studio 2005 Pin
bhavna432116-Apr-09 19:30
bhavna432116-Apr-09 19:30 
AnswerRe: download visual studio 2005 Pin
Abhijit Jana16-Apr-09 19:33
professionalAbhijit Jana16-Apr-09 19:33 
AnswerRe: download visual studio 2005 Pin
Christian Graus16-Apr-09 19:45
protectorChristian Graus16-Apr-09 19:45 
AnswerRe: download visual studio 2005 Pin
shashank70116-Apr-09 22:18
shashank70116-Apr-09 22:18 
QuestionVisual Foxpro Database/Table in ASP.NET Pin
Girish48116-Apr-09 17:09
Girish48116-Apr-09 17:09 
AnswerRe: Visual Foxpro Database/Table in ASP.NET Pin
Christian Graus16-Apr-09 17:17
protectorChristian Graus16-Apr-09 17:17 
GeneralRe: Visual Foxpro Database/Table in ASP.NET Pin
Girish48116-Apr-09 17:27
Girish48116-Apr-09 17:27 
QuestionAJAX Update Panel... Pin
Illegal Operation16-Apr-09 15:58
Illegal Operation16-Apr-09 15:58 
Hi,

I have an aspx page that contains a web part and a fileupload control within the web part. I have also added a label that display the status of the upload. I wanted to put the lable inside an Update Panel and then display the correct string value when I click the upload button but I keep getting an "Object is not set to an instance" error. The code for mybutton event looks like this:

try
{
    string fileName = fuFileUpload.PostedFile.FileName; (THIS IS WHERE IT FAILS...)                string contentType = fuFileUpload.PostedFile.ContentType;
    string getFileName = System.IO.Path.GetFileName(fileName);
    string userName = Page.User.Identity.Name;

    Stream fileStream = fuFileUpload.PostedFile.InputStream;
    Byte[] fileBuffer = new byte[1024];

    while (fileStream.Read(fileBuffer, 0, fileBuffer.Length) > 0)
    {
        fuFileUpload.PostedFile.SaveAs(Server.MapPath("UploadedFiles\\") + userName + "_" + getFileName);
    }

    fileStream.Close();
    lblProgress.Text = UploadSuccess;

    //Response.Redirect("UploadFiles.aspx");
}
catch (Exception ex)
{
    ex.Message.ToString();
}


When I remove the UpdatePanel everything works fine. I then proceeded to wrap the whole wep part within the Update Panel to see if this works and I get the same error.

My question is this, Can you nest a control inside a web part and the web part inside an update panel?

Illegal Operation

AnswerRe: AJAX Update Panel... Pin
mr_muskurahat16-Apr-09 21:50
mr_muskurahat16-Apr-09 21:50 
QuestionSys.WebForms.PageRequestManager.getInstance().add_endRequest not working Pin
goodideadave16-Apr-09 13:29
goodideadave16-Apr-09 13:29 
Questionfor project titles Pin
vvikram16-Apr-09 11:58
vvikram16-Apr-09 11:58 
AnswerRe: for project titles Pin
Yusuf16-Apr-09 12:40
Yusuf16-Apr-09 12:40 
AnswerRe: for project titles Pin
Christian Graus16-Apr-09 14:11
protectorChristian Graus16-Apr-09 14:11 
GeneralRe: for project titles Pin
MidwestLimey17-Apr-09 9:17
professionalMidwestLimey17-Apr-09 9:17 
AnswerRe: for project titles Pin
Abhijit Jana16-Apr-09 20:09
professionalAbhijit Jana16-Apr-09 20:09 
QuestionGridview refresh from popup window Pin
bitsbuilt16-Apr-09 11:47
bitsbuilt16-Apr-09 11:47 
AnswerRe: Gridview refresh from popup window Pin
Christian Graus16-Apr-09 11:53
protectorChristian Graus16-Apr-09 11:53 
Questionexcel -sql server ? Pin
haseeb_saeed16-Apr-09 11:15
haseeb_saeed16-Apr-09 11:15 
AnswerRe: excel -sql server ? Pin
Christian Graus16-Apr-09 11:54
protectorChristian Graus16-Apr-09 11:54 
GeneralRe: excel -sql server ? Pin
haseeb_saeed16-Apr-09 12:44
haseeb_saeed16-Apr-09 12:44 
GeneralRe: excel -sql server ? Pin
Christian Graus16-Apr-09 14:14
protectorChristian Graus16-Apr-09 14:14 
GeneralRe: excel -sql server ? Pin
haseeb_saeed16-Apr-09 16:21
haseeb_saeed16-Apr-09 16:21 
AnswerRe: STOP cross-posting Pin
Yusuf16-Apr-09 12:42
Yusuf16-Apr-09 12:42 
GeneralRe: STOP cross-posting Pin
haseeb_saeed16-Apr-09 16:30
haseeb_saeed16-Apr-09 16:30 
GeneralRe: STOP cross-posting Pin
Yusuf16-Apr-09 16:49
Yusuf16-Apr-09 16:49 

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.