Rodet html kode ved kompile.
Hej jeg roder lidt rundt i asp.net for tiden og har lagt mærke til når jeg kører mine scripts på min egen iis server så får jeg en helt anden client html udkom, en meget "rodet" kode, men en fandens masse javascript ...et eks. jeg afprøvet
http://aspauthors.com/aspnetbyexample/ch03/readvalidrequestVB.aspx
hvis ser kilde koden på den så ser den jo fin ud men når jeg kører den på min egen server så får jeg
<html>
<head>
<title>ASP Forms</title>
</head>
<body>
<form name="form1" method="post" action="NewFile.aspx" onsubmit="java script:return WebForm_OnSubmit();" id="form1">
<div>
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTQ1NDI2MTEzNg9kFgICAQ9kFgICDw8QZA8WA2YCAQICFgMQZWVnEAUGRmVtYWxlBQZGZW1hbGVnEAUETWFsZQUETWFsZWdkZBgBBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WAQUHbWFycmllZIlzMgpdttDw8mD9m4qOi9tIWJdQ" />
</div>
<script type="text/javascript">
<!--
var theForm = document.forms['form1'];
if (!theForm) {
theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
// -->
</script>
<script src="/WebResource.axd?d=M_jDQ1zyHQc1qCBVs4KmTg2&t=632971277751711250" type="text/javascript"></script>
<script src="/WebResource.axd?d=B8jkR-CZDJ57mC0ocD4BjSYZlRM7FxECuXgjdqXY-101&t=632971277751711250" type="text/javascript"></script>
<script type="text/javascript">
<!--
function WebForm_OnSubmit() {
if (typeof(ValidatorOnSubmit) == "function" && ValidatorOnSubmit() == false) return false;
return true;
}
// -->
</script>
<div id="validSummary" style="color:Red;display:none;">
</div>
<table border="1" bgcolor="#EEEEEE">
<caption>Forms</caption>
<tr>
<td>First Name</td>
<td><input name="first_name" type="text" id="first_name" />
<span id="required_first_name" style="color:Red;display:none;"></span>
</td>
</tr>
<tr>
<td>Age</td>
<td><input name="age" type="text" id="age" />
<span id="required_age" style="color:Red;display:none;"></span>
<span id="required_age_range" style="color:Red;display:none;"></span>
</td>
</tr>
<tr>
<td>Married?</td>
<td>
<input id="married" type="checkbox" name="married" />
</td>
</tr>
<tr>
<td>Sex</td>
<td><select name="sex" id="sex">
<option value=""></option>
<option value="Female">Female</option>
<option value="Male">Male</option>
</select>
<span id="required_sex" style="color:Red;display:none;"></span>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" name="ctl00" value="Save" onclick="java script:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00", "", true, "", "", false, false))" />
</td>
</tr>
</table>
<script type="text/javascript">
<!--
var Page_ValidationSummaries = new Array(document.getElementById("validSummary"));
var Page_Validators = new Array(document.getElementById("required_first_name"), document.getElementById("required_age"), document.getElementById("required_age_range"), document.getElementById("required_sex"));
// -->
</script>
<script type="text/javascript">
<!--
var validSummary = document.all ? document.all["validSummary"] : document.getElementById("validSummary");
validSummary.headertext = "*** Errors On Your Form ***";
validSummary.displaymode = "List";
var required_first_name = document.all ? document.all["required_first_name"] : document.getElementById("required_first_name");
required_first_name.controltovalidate = "first_name";
required_first_name.errormessage = "You must enter a value for first name.";
required_first_name.display = "None";
required_first_name.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
required_first_name.initialvalue = "";
var required_age = document.all ? document.all["required_age"] : document.getElementById("required_age");
required_age.controltovalidate = "age";
required_age.errormessage = "You must enter a value for age.";
required_age.display = "None";
required_age.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
required_age.initialvalue = "";
var required_age_range = document.all ? document.all["required_age_range"] : document.getElementById("required_age_range");
required_age_range.controltovalidate = "age";
required_age_range.errormessage = "You must enter a positive number value for age.";
required_age_range.display = "None";
required_age_range.type = "Integer";
required_age_range.evaluationfunction = "RangeValidatorEvaluateIsValid";
required_age_range.maximumvalue = "150";
required_age_range.minimumvalue = "1";
var required_sex = document.all ? document.all["required_sex"] : document.getElementById("required_sex");
required_sex.controltovalidate = "sex";
required_sex.errormessage = "You must select a value for sex.";
required_sex.display = "None";
required_sex.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
required_sex.initialvalue = "";
// -->
</script>
<div>
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWCAKW7P/fCwL2ltiGCgLQgq+qBgLUlIN7As+X1sIPAoKnzZIBAs7HgMoJAqHAiY0LsPPT2iB67arZOkIHI5eowzp6tuY=" />
</div>
<script type="text/javascript">
<!--
var Page_ValidationActive = false;
if (typeof(ValidatorOnLoad) == "function") {
ValidatorOnLoad();
}
function ValidatorOnSubmit() {
if (Page_ValidationActive) {
return ValidatorCommonOnSubmit();
}
else {
return true;
}
}
// -->
</script>
</form>
<span id="output"></span>
</body>
</html>
undskyld hvis det er uoverskueligt men det undre mig bare ?