multipart/form-data form posting

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
 
A

Anthony Jones

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top