E
E
I have 2 aspx pages... neither of which do anything out of the ordinary.
One of the pages automatically generates this block of code when viewed at
the client:
------------------------------------------------------------
<form name="webfrmForm" method="post" action="pokedex.aspx" id="webfrmForm">
<input type="hidden" name="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" value="[extensive data]" />
<script language="javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform = document.forms["webfrmForm"];
theform.__EVENTTARGET.value = eventTarget.replace(/\$/g, ":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>
------------------------------------------------------------
The other asp page generates only this:
------------------------------------------------------------
<form name="wfrmPokedat" method="post" action="pokedat.aspx"
id="wfrmPokedat">
<input type="hidden" name="__VIEWSTATE" value="[data]" />
------------------------------------------------------------
The net result is that the first page can have objects onclick perform a
__doPostBack, and the other page throws a javascript error about an expected
object; and rightfully so, the __dopostback routine isn't there. But why
isn't it?
What triggers the asp.net creation of the __doPostBack code block? It's
also missing it's __EVENTTARGET and __EVENTARGUMENT hidden values. I can't
find any significant differences in either of my pages that would cause
this. I'm using framework 1.1 and 2003 rc2/iis6 server & notepad as an
editor.
One of the pages automatically generates this block of code when viewed at
the client:
------------------------------------------------------------
<form name="webfrmForm" method="post" action="pokedex.aspx" id="webfrmForm">
<input type="hidden" name="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" value="[extensive data]" />
<script language="javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform = document.forms["webfrmForm"];
theform.__EVENTTARGET.value = eventTarget.replace(/\$/g, ":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>
------------------------------------------------------------
The other asp page generates only this:
------------------------------------------------------------
<form name="wfrmPokedat" method="post" action="pokedat.aspx"
id="wfrmPokedat">
<input type="hidden" name="__VIEWSTATE" value="[data]" />
------------------------------------------------------------
The net result is that the first page can have objects onclick perform a
__doPostBack, and the other page throws a javascript error about an expected
object; and rightfully so, the __dopostback routine isn't there. But why
isn't it?
What triggers the asp.net creation of the __doPostBack code block? It's
also missing it's __EVENTTARGET and __EVENTARGUMENT hidden values. I can't
find any significant differences in either of my pages that would cause
this. I'm using framework 1.1 and 2003 rc2/iis6 server & notepad as an
editor.