I recently "converted" an HTML website to web forms. By convert, I mean I opened the website in Visual Studio 2010, added a web.config file to allow HttpPost protocol, and called it converted. However, my form doesn't want to post to my .aspx page. What am I missing? When I build the app, there is no binary created to deploy to my local IIS (7.5 on Windows 7)
<form name="register2" method="post" action="#" onsubmit="return false;">
Then my $.post is in my $(function() {...
$('form[name="register2"]').submit(function () {
var $registerForm2 = $('form[name="register2"]');
if ($registerForm2.valid()) {
$.post({
type: 'POST',
url: 'CreateAccount.aspx',
data: $(this).serialize()
});
} else { //do validation
$registerForm2.validate();
}
});
When I submit the form, Chrome tells me the request URL is URL:http://localhost/mysite/[object%20Object]
and receives error code 404. The page CreateAccount.aspx
does exist.