Why is the form action attribute empty on production server?
Posted
by Ozzy
on Stack Overflow
See other posts from Stack Overflow
or by Ozzy
Published on 2010-04-12T09:07:14Z
Indexed on
2010/04/12
9:13 UTC
Read the original article
Hit count: 372
After deploying a ASP.NET WebForms application to a production server some of the ajax calls has stopped working for me. After some debugging I found out that the following statement (in the internal client-method WebForm_DoCallback) was causing the problem:
xmlRequest.open("POST", action, true);
The problem seemed to be that the action-variable was empty so after checking the rendered html I found out that the form-tag rendered on the production server looks like:
<form method="post" action="" id="Form1">
However, on my developer machine I get the following:
<form method="post" action="default.aspx" id="Form1">
So, why would the action-attibute render on my dev.machine but not on the production server? This seems to be the case only for one specific web form, when I look on other pages the action-attribute renders correctly.
Any suggestions or ideas would be helpful!
© Stack Overflow or respective owner