M
Med
Hi,
I have two dropDown lists ddlCars and ddlModels. ddlCars
AutoPostBack="true" to populate the ddlModels when a car is selected. If
the page is not valid (i.e. user left a mandatory textbox blank and
presented by ValidatorCalloutExtender message when attempting to submit),
selecting an item in ddlCars DOES NOT postback the first time, but it will
the second time. Cars_SelectedIndexChanged should postback regardless of
valid/invalid page entry. Does anyone know why?
ASP.NET 3.5 Ajax 3.0
here is my code:
<Ajax:ScriptManager ID="ScriptManager1" runat="server" />
<aspropDownList id="ddlCars" runat="server"
AutoPostBack="true"
CssClass="WideDropDownList" Causes Validation="false"
OnSelectedIndexChanged="Cars_SelectedIndexChanged"
/>
<asp:RangeValidator id="rvCars"
CssClass="ValidationControl"
runat="server"
ErrorMessage="Please select a Car"
ControlToValidate="ddlCars"
Display="None" />
<AjaxToolkit:ValidatorCalloutExtender
HighlightCssClass="ValidationHighlightSelect"
SkinID="AjaxValidator"
TargetControlID="rvCars"
ID="vceCarsRange"
runat="server"
/>
<Ajax:UpdatePanel ID="upProduct" runat="server"
UpdateMode="Conditional">
<Triggers>
<Ajax:AsyncPostBackTrigger ControlID="ddlCars" />
</Triggers>
<ContentTemplate>
<aspropDownList id="ddlModels" runat="server"
CssClass="WideDropDownList"/>
<asp:RangeValidator id="rvModels"
CssClass="ValidationControl"
runat="server"
ErrorMessage="Please select
a Model"
ControlToValidate="ddlModels"
Display="None" />
<AjaxToolkit:ValidatorCalloutExtender
ID="vceModelsRange" runat="server"
HighlightCssClass="ValidationHighlightSelect"
SkinID="AjaxValidator"
TargetControlID="rvModels"
/>
</ContentTemplate>
</Ajax:UpdatePanel>
.... other textboxes and submit button....
I have two dropDown lists ddlCars and ddlModels. ddlCars
AutoPostBack="true" to populate the ddlModels when a car is selected. If
the page is not valid (i.e. user left a mandatory textbox blank and
presented by ValidatorCalloutExtender message when attempting to submit),
selecting an item in ddlCars DOES NOT postback the first time, but it will
the second time. Cars_SelectedIndexChanged should postback regardless of
valid/invalid page entry. Does anyone know why?
ASP.NET 3.5 Ajax 3.0
here is my code:
<Ajax:ScriptManager ID="ScriptManager1" runat="server" />
<aspropDownList id="ddlCars" runat="server"
AutoPostBack="true"
CssClass="WideDropDownList" Causes Validation="false"
OnSelectedIndexChanged="Cars_SelectedIndexChanged"
/>
<asp:RangeValidator id="rvCars"
CssClass="ValidationControl"
runat="server"
ErrorMessage="Please select a Car"
ControlToValidate="ddlCars"
Display="None" />
<AjaxToolkit:ValidatorCalloutExtender
HighlightCssClass="ValidationHighlightSelect"
SkinID="AjaxValidator"
TargetControlID="rvCars"
ID="vceCarsRange"
runat="server"
/>
<Ajax:UpdatePanel ID="upProduct" runat="server"
UpdateMode="Conditional">
<Triggers>
<Ajax:AsyncPostBackTrigger ControlID="ddlCars" />
</Triggers>
<ContentTemplate>
<aspropDownList id="ddlModels" runat="server"
CssClass="WideDropDownList"/>
<asp:RangeValidator id="rvModels"
CssClass="ValidationControl"
runat="server"
ErrorMessage="Please select
a Model"
ControlToValidate="ddlModels"
Display="None" />
<AjaxToolkit:ValidatorCalloutExtender
ID="vceModelsRange" runat="server"
HighlightCssClass="ValidationHighlightSelect"
SkinID="AjaxValidator"
TargetControlID="rvModels"
/>
</ContentTemplate>
</Ajax:UpdatePanel>
.... other textboxes and submit button....