Click here to Skip to main content
15,913,722 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Try Catch Not working porperly... Pin
Abhijit Jana16-Apr-09 23:02
professionalAbhijit Jana16-Apr-09 23:02 
GeneralRe: Try Catch Not working porperly... Pin
Dev S16-Apr-09 23:12
Dev S16-Apr-09 23:12 
GeneralRe: Try Catch Not working porperly... Pin
Abhijit Jana16-Apr-09 23:45
professionalAbhijit Jana16-Apr-09 23:45 
GeneralRe: Try Catch Not working porperly... Pin
Dev S16-Apr-09 23:52
Dev S16-Apr-09 23:52 
GeneralRe: Try Catch Not working porperly... Pin
Abhijit Jana17-Apr-09 0:14
professionalAbhijit Jana17-Apr-09 0:14 
GeneralRe: Try Catch Not working porperly... Pin
Christian Graus17-Apr-09 12:54
protectorChristian Graus17-Apr-09 12:54 
AnswerRe: Try Catch Not working porperly... Pin
Arindam Tewary17-Apr-09 2:12
professionalArindam Tewary17-Apr-09 2:12 
GeneralRe: Try Catch Not working porperly... Pin
Dev S17-Apr-09 3:32
Dev S17-Apr-09 3:32 
AnswerRe: Try Catch Not working porperly... Pin
Yusuf17-Apr-09 6:06
Yusuf17-Apr-09 6:06 
QuestionProblems with Web Service Pin
Raymundo Valdez16-Apr-09 20:26
Raymundo Valdez16-Apr-09 20:26 
Questionsql server connection using ADO.net Pin
cemalakshmi16-Apr-09 19:54
cemalakshmi16-Apr-09 19:54 
AnswerRe: sql server connection using ADO.net Pin
Abhijit Jana16-Apr-09 20:08
professionalAbhijit Jana16-Apr-09 20:08 
QuestionList of countries in Asp.Net 3.5 Pin
Maxy5516-Apr-09 19:48
Maxy5516-Apr-09 19:48 
AnswerRe: List of countries in Asp.Net 3.5 Pin
Christian Graus16-Apr-09 19:52
protectorChristian Graus16-Apr-09 19:52 
AnswerRe: List of countries in Asp.Net 3.5 Pin
shashank70116-Apr-09 22:15
shashank70116-Apr-09 22:15 
AnswerRe: List of countries in Asp.Net 3.5 Pin
Yusuf17-Apr-09 3:34
Yusuf17-Apr-09 3:34 
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 

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.