Hi Ed,
Sorry for misunderstanding your previous reply. So let's do a summary so
far:
======
Using the simplest scenario as I described in my reply, when you click the
first DropDownList to select second item, the second DropDownList doesn't
show "screen2", right?
======
This is strange. Please help me on following questions so that we can go
further:
1) Is the WebForm actually performing a postback when you change the
selected item in first DropDownList? Since we've set its
AutoPostBack=true,
it should.
2) Is javascript enabled in your web browser? Javascript is required to do
the postback correctly.
Also, would you please handle the second SqlDataSource's Selecting event
by:
protected void SqlDataSource2_Selecting(object sender,
SqlDataSourceSelectingEventArgs e)
{
Response.Write(e.Command.Parameters[0].Value);
}
This will output the actual parameter value passed to the stored
procedure.
When you change the first DropDownList's selected item, it should
correctly
output the value.
Also, I've including my page source here for your reference:
======
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml" >
<head><title>
Untitled Page
</title></head>
<body>
<form name="form1" method="post" action="Default.aspx" id="form1">
<div>
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value=""
/>
<input type="hidden" name="__LASTFOCUS" id="__LASTFOCUS" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
value="/wEPDwULLTE5NjE4MzgxODYPZBYCAgMPZBYGAgEPEA8WAh4LXyFEYXRhQm91bmRnZBAVA
gdtb2R1bGUxB21vZHVsZTIVAgdtb2R1bGUxB21vZHVsZTIUKwMCZ2dkZAIEDxAPFgIfAGdkEBUBB
3NjcmVlbjIVAQdzY3JlZW4yFCsDAWdkZAIFDw9kDxAWAWYWARYCHg5QYXJhbWV0ZXJWYWx1ZQUHb
W9kdWxlMhYBZmRkZKzAJI0cDOXzO1luqLJf1kXKgrvb" />
</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>
<div>
<select name="DropDownList1"
onchange="javascript:setTimeout('__doPostBack(\'DropDownList1\',\'\')',
0)"
id="DropDownList1">
<option value="module1">module1</option>
<option selected="selected" value="module2">module2</option>
</select>
<select name="DropDownList2" id="DropDownList2">
<option value="screen2">screen2</option>
</select>
</div>
<div>
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION"
value="/wEWBQLZ29nUDQKd5I/lCgKp3oX4AwL+mr84AtLI02u6LPTk2Ktx6jNq5AmDyvW71BVhr
A==" />
</div></form>
</body>
</html>
======
Regards,
Walter Wang (
[email protected], remove 'online.')
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.