Add More parameters on Select method
I need to
1) add a string "All" on top of my dropdown.
2) Add "MyState" parameter on Select Method of object Datasource.
3) On "ddlSt_SelectedIndexChanged" event I need to pass selected State Code to City drop down.
pl. help.
STATE:
<asp:DropDownList ID="ddlSt" runat="server"
DataSourceID="OdsState"
DataTextField="STATE_COUNTRY_NAME"
DataValueField="STATE_COUNTRY_CODE"
AutoPostBack="True"
onselectedindexchanged="ddlSt_SelectedIndexChanged" >
</asp:DropDownList>
<asp:ObjectDataSource ID="OdsState" runat="server"
OldValuesParameterFormatString="original_{0}" SelectMethod="GetData"
TypeName="stateTableAdapters.STATE_COUNTRYTableAdapter">
<SelectParameters>
<asp:ControlParameter ControlID="ddlyr" Name="FromYear"
PropertyName="SelectedValue" Type="Decimal" />
<asp:ControlParameter ControlID="ddlTo" Name="ToYear"
PropertyName="SelectedValue" Type="Decimal" />
<asp:ControlParameter ControlID="RBl1" Name="mytype"
PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="SrcCty" runat="server"
OldValuesParameterFormatString="original_{0}" SelectMethod="GetData"
TypeName="stateTableAdapters.CityTableAdapter" >
<SelectParameters>
<asp:ControlParameter ControlID="RBl1" Name="mytype"
PropertyName="SelectedValue" Type="String" />
<asp:ControlParameter ControlID="ddlyr" Name="FromYear"
PropertyName="SelectedValue" Type="Decimal" />
<asp:ControlParameter ControlID="ddlTo" Name="ToYear"
PropertyName="SelectedValue" Type="Decimal" />
</SelectParameters>
</asp:ObjectDataSource>
CITY:
<asp:DropDownList ID="ddlCity"
runat="server"
DataSourceID="SrcCty" DataTextField="CITY">
</asp:DropDownList>
<asp:ObjectDataSource ID="SrcDistt" runat="server"
OldValuesParameterFormatString="original_{0}"
TypeName="stateTableAdapters.DisttTableAdapter">
<SelectParameters>
<asp:ControlParameter ControlID="RBl1" DefaultValue=""G""
Name="mytype" PropertyName="SelectedValue" Type="String" />
<asp:ControlParameter ControlID="ddlyr" Name="FromYear"
PropertyName="SelectedValue"
Type="Decimal"
DefaultValue="" />
<asp:ControlParameter ControlID="ddlTo"
DefaultValue="" ""
Name="ToYear"
PropertyName="SelectedValue"
Type="Decimal" />
</SelectParameters>
</asp:ObjectDataSource>