Hi Forum,

I have created a MOSS2007 webpart that displays a form to the user. Part of this form are a few buttons and the FileUpload control. What I need to do is quite simple: I want the user to fill out the form, select a file to upload and to click on a button to close the form and to store the data.

The fileupload control is my troublemaker :-)

This control consists of an editfield and to buttons ('choose file' and 'upload'). When using the buttons to choose a file and to upload it, everything works fine. But when I enter text in the editfield (for example 'blablabla') the form crashes. It looks like there is a kind of JavaScript error. This JavaCript-error is not handled by sharepoint and clicking on all of the buttons results in no action. If this happens the form remains in an unusable state (can click on everything - nothing happens).

This is the code I'm using:

private FileUpload m_objFileUpload;

m_objFileUpload = new FileUpload();  // from System.Web.UI.WebControls
m_objFileUpload.ID = "TextBoxUpload";
m_objFileUpload.ToolTip = "My tooltip text!";

Can anyone please help me