So I am trying to use the FileUploadParameter class to add a paramter to the FormPostParamaters Collection.
requestBody.FormPostParameters.Add(new FileUploadParameter( "_ctl0:_MainContent:_ContentControl:_ctl0:_ctl8:_ctl4:_ctl2:_ctl3:_fileUploadContainer","C:\\Documents and Settings\\jsblumbe\\My Documents\\Jacobs Templete.doc"));
The problem is that when I use this I get the following in the responce:
RequestFailed:String reference not set to an instance of a String.
Paramater name: s
If I take out the file name and use this
new FileUploadParameter( "_ctl0:_MainContent:_ContentControl:_ctl0:_ctl8:_ctl4:_ctl2:_ctl3:_fileUploadContainer",""));
I get
RequestFailed: Empty path name is not legal
which is fine, but it just proves that there is something wrong with the fileUploadParamater class....
Can any one help me debug this
HEre is the HTML for the control
<input name="_ctl0:_MainContent:_ContentControl:_ctl0:_ctl8:_ctl4:_ctl2:_ctl3:_fileUploadContainer" id="_ctl0__MainContent__ContentControl__ctl0__ctl8__ctl4__ctl2__ctl3__fileUploadContainer" type="file" size="40" />
The actuall control is based off the HtmlInputFile class in System.Web.UI.HtmlControls
.NET Development12
|