Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a form having one text field and one button all I want is to postback it to some other server. I have created an .ascx for it and I have added html textbox and asp.net button and using postbackurl to send it to other server.

Problem: Text field value is not getting passed to other server. I checked in firebug to find out that SharePoint is adding

<form id="aspnetform" enctype="multipart/form-data"....>

on top of my form. I removed this enctype from the firebug and tested my code it worked fine, textfield value get passed. Is there any way I can remove this enctype as it is getting added on its own.

Or may be if there is any other better way to achieve this, I'm open to suggestions.

share|improve this question
add comment

2 Answers

You can't use nested forms. But you can "bypass" with a small trick using JavaScript. I've written about this a while ago:

http://www.sharepointboris.net/2008/09/making-post-and-get-forms-from-sharepoints-pages/

share|improve this answer
add comment

You could use Javascript to sumbit the form data to your script. This way you can control what gets sent over the wires.

SharePoint is ASP.Net based and that comes with its own baggage when it comes to dealing with form requests as every ASP.net page is a single form that has certain expectations about where and how it is going to be submitted/posted back. As Alex says this is a question better suited to an ASP.Net forum.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.