내 aspx 파일에서 다음을 제거합니다 :ASP.NET이 JS를 추가하여 Form 요소를 가져 오는 이유는 무엇입니까?
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['aspnetForm'];
if (!theForm) {
theForm = document.aspnetForm;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>
그러나 응용 프로그램을 실행하면 다시 추가됩니다. 어떻게 그리고 왜 이까요? 어떻게 영구적으로 제거 할 수 있습니까?
페이지에 JS 등이 추가되어 살 수 없다면 asp.net ..을 사용하지 말아야합니다. :) – StefanE
StefanE에게 감사 드려요.하지만 일반적으로 ASP.NET MVC를 사용합니다. 훨씬 더 똑똑합니다. – DaveDev
오, 음, 아직 MVC로 시작할 용기와 시간을 모으지 않았습니다! – StefanE