[Mono-bugs] [Bug 79309][Nor] Changed - The PostBack method does not work on the DropDownList if selected the first item

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Sep 7 21:05:09 EDT 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by tonyxgu at yahoo.com.

http://bugzilla.ximian.com/show_bug.cgi?id=79309

--- shadow/79309	2006-09-07 20:49:35.000000000 -0400
+++ shadow/79309.tmp.23756	2006-09-07 21:05:09.000000000 -0400
@@ -170,6 +170,93 @@
 Look at the source of the generated page *after* the first
 postback. If you don't see a hidden input field with
 the name __VIEWSTATE, then either EnableViewState is somewhere
 set to false (default is true) or the field gets filtered out
 by some software or the browser is damaged ...
 
+
+------- Additional Comments From tonyxgu at yahoo.com  2006-09-07 21:05 -------
+I still don't see your point.
+Here is the source HTML after I selected C:
+The method ddl1_OnSelectedIndexChanged is called.
+<html>
+<head/>
+<body>
+<center>
+<p>Test DropDownList </p>
+<form name="x" method="post" action="testddl.aspx" id="x">
+<input type="hidden" name="__EVENTTARGET" value="" />
+<input type="hidden" name="__EVENTARGUMENT" value="" />
+
+<script language="javascript">
+<!--
+	var theForm = document.getElementById ('x');
+	function __doPostBack(eventTarget, eventArgument) {
+		theForm.__EVENTTARGET.value = eventTarget;
+		theForm.__EVENTARGUMENT.value = eventArgument;
+		theForm.submit();
+	}
+// -->
+</script>
+<input type="hidden" name="__VIEWSTATE"
+value="DQ0ADgEFAQ4BDQAOAgUBBQMOAg0MAAwaGA1TeXN0ZW0uU3RyaW5nS21zY29ybGliLCBWZXJzaW9uPTIuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQYBAUEBAUIBAUMBAUQBAUUBAUYaGQAABgEBMAEBMQEBMgEBMwEBNAEBNQAADQ0PAQEEVGV4dAEYWW91ciBzZWxlY3RlZCBpbmRleCBpcyAyAAAAAAAQAQwADgEFAtFlSpoNqH7R6igwFriC6jMhnYWg"
+/>
+
+<select name="ddl1" onchange="javascript:__doPostBack('ddl1','')"
+id="ddl1">
+	<option value="0">A</option>
+	<option value="1">B</option>
+	<option selected="selected" value="2">C</option>
+	<option value="3">D</option>
+	<option value="4">E</option>
+	<option value="5">F</option>
+
+</select>
+<P/>
+<span id="label1">Your selected index is 2</span>
+</form>
+</center>
+</body>
+</html>
+
+And here is the HTML after I re-selected A:
+<html>
+<head/>
+<body>
+<center>
+<p>Test DropDownList </p>
+<form name="x" method="post" action="testddl.aspx" id="x">
+<input type="hidden" name="__EVENTTARGET" value="" />
+<input type="hidden" name="__EVENTARGUMENT" value="" />
+
+<script language="javascript">
+<!--
+	var theForm = document.getElementById ('x');
+	function __doPostBack(eventTarget, eventArgument) {
+		theForm.__EVENTTARGET.value = eventTarget;
+		theForm.__EVENTARGUMENT.value = eventArgument;
+		theForm.submit();
+	}
+// -->
+</script>
+<input type="hidden" name="__VIEWSTATE"
+value="DQ0ADgEFAQ4BDQAOAgUBBQMOAg0MAAwaGA1TeXN0ZW0uU3RyaW5nS21zY29ybGliLCBWZXJzaW9uPTIuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQYBAUEBAUIBAUMBAUQBAUUBAUYaGQAABgEBMAEBMQEBMgEBMwEBNAEBNQAADQ0PAQEEVGV4dAEYWW91ciBzZWxlY3RlZCBpbmRleCBpcyAyAAAAAAAQAQwADgEFAB1IVE+FrVFuo1gKM6ad729WsfFw"
+/>
+
+<select name="ddl1" onchange="javascript:__doPostBack('ddl1','')"
+id="ddl1">
+	<option selected="selected" value="0">A</option>
+	<option value="1">B</option>
+	<option value="2">C</option>
+	<option value="3">D</option>
+	<option value="4">E</option>
+	<option value="5">F</option>
+
+</select>
+<P/>
+<span id="label1">Your selected index is 2</span>
+</form>
+</center>
+</body>
+</html>
+
+


More information about the mono-bugs mailing list