multipart/form-data form posting

  • Thread starter Thread starter Praveen
  • Start date Start date
P

Praveen

got a form in html
<form style="display: inline" enctype="multipart/form-data">
<input name='inputXML' >

assinging an xml string to inputXML and posting the form

but when trying to access the same from c# like Form["inputXML"] it throws
following error.


'Object reference not set to an instance of an object'


What special to do when accessing 'multipart/form-data' in c#



thanks,
John
 
Praveen said:
got a form in html
<form style="display: inline" enctype="multipart/form-data">
<input name='inputXML' >

assinging an xml string to inputXML and posting the form

but when trying to access the same from c# like Form["inputXML"] it throws
following error.


'Object reference not set to an instance of an object'


What special to do when accessing 'multipart/form-data' in c#

Try putting runat="Server" on both the Form and Input element.
 
Back
Top