G
Girish
1) I have a dropdownlist control with AutoPostBack property set to true.
2) For the same control I have a SelectedIndexChanged method call in my code
behind.
3) What I would like to accomplish is IF the selected text in the drop down
is "Teacher", another control should be set to invisible.
Heres the code behind:
private void classification_SelectedIndexChanged(object sender,
System.EventArgs e)
{
if (classification.SelectedValue == "Teacher")
{
intEduLevel.Visible = false;
}
}
Now, when I start debugging this application - the debugger stops at this
javascript code generated by the control.
THIS HAPPENS When I CHANGE the selection on the DropDownList control.
<script language="javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) {
theform = document.forms["Form2"];
}
else {
theform = document.Form2;
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit(); //<<<-------------------------- RIGHT
HERE!!!!!!!!!!!!!!!!!
}
// -->
</script>
The error is :"JScript Runtime error: Object dosent support this property or
method"
Here are some other details:
MY IE Version: 6.0.28
My project is set to target IE 3.02 and Netscape 3.0 Browsers
If anyone can tell me what this problem is, Id greatly appreciate it.
Thanks,
Girish
2) For the same control I have a SelectedIndexChanged method call in my code
behind.
3) What I would like to accomplish is IF the selected text in the drop down
is "Teacher", another control should be set to invisible.
Heres the code behind:
private void classification_SelectedIndexChanged(object sender,
System.EventArgs e)
{
if (classification.SelectedValue == "Teacher")
{
intEduLevel.Visible = false;
}
}
Now, when I start debugging this application - the debugger stops at this
javascript code generated by the control.
THIS HAPPENS When I CHANGE the selection on the DropDownList control.
<script language="javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) {
theform = document.forms["Form2"];
}
else {
theform = document.Form2;
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit(); //<<<-------------------------- RIGHT
HERE!!!!!!!!!!!!!!!!!
}
// -->
</script>
The error is :"JScript Runtime error: Object dosent support this property or
method"
Here are some other details:
MY IE Version: 6.0.28
My project is set to target IE 3.02 and Netscape 3.0 Browsers
If anyone can tell me what this problem is, Id greatly appreciate it.
Thanks,
Girish