Lotto
Lotto

Reputation: 51

ASPX engine removing name property from form element

I have an application which has ASPX & MVC pages mixed is same project due to some reason. The old aspx pages used to automatically render name element in the html generated e.g.

<form id="frmMyForm" name="frmMyForm" method="post" action="SomeOtherpage.aspx">

For some reason, in the new application, when we migrated these aspx pages to run with MVC ones, the name property is missing and the html looks something like this

<form id="frmMyForm" method="post" action="SomeOtherpage.aspx">

Has someone observed this behaviour and nkow it's solution? I'd like to have the name property back as it's being used heavily in my application in javascripts and figuring out all the places is not going to be easy.

Upvotes: 1

Views: 49

Answers (1)

Lotto
Lotto

Reputation: 51

I've found the resolution after extensive search. It's related to xhtmlconformance element in web.config which control form name - Check this link - Form-tag-doesn-t-have-name-attribute-htmlconformance.aspx

Upvotes: 1

Related Questions