hello my problem is the follow i save in the database 2 values that two dropdonlist with cascading and is very goog, the problem is when i search this information for my database because one dropdownlist dependet the other, because i load the first ddlist and select the values, and if select the seconf ddlist is not load, how i can load the second ddlist for client side, for java
this is the html
function OnCompleteBusqueda(args)
{ args=args;
var vars = args.vars;
document.getElementById("ctl00_ContentPlaceHolder1_cboDepartamentoAfilia").value =vars[6]; //is ok
ret = WebS.GetCiudad_Dep("Departamento","Ciudad");//how i can load the next dropdlist for select the value
for client side
fodocument.getElementById("ctl00_ContentPlaceHolder1_cboCiudadAfilia").value=vars[7];//for select this dropdowlist i need load with the information
}
please help my i need examples, this is the code with i load for the firstime <td>state <br /><br />
<asp:DropDownList ID="cboDepartamentoAfilia" runat="server" CssClass="black">
</asp:DropDownList>
<cc1:CascadingDropDown ID="cboDepartamentoAfilia_CascadingDropDown"
runat="server" Enabled="True" TargetControlID="cboDepartamentoAfilia"
Category="Departamento" PromptText="Seleccione Departamento" LoadingText="Por Favor Espere..."
ServicePath="WebS.asmx" ServiceMethod="GetDepartamento"
>
</cc1:CascadingDropDown>
City
<br /><br />
<asp:DropDownList ID="cboCiudadAfilia" runat="server" CssClass="black">
</asp:DropDownList>
<cc1:CascadingDropDown ID="cboCiudadAfilia_CascadingDropDown"
runat="server" Enabled="True" TargetControlID="cboCiudadAfilia" ParentControlID="cboDepartamentoAfilia"
Category="Ciudad" PromptText="Seleccione Ciudad" LoadingText="Por favor Espere..." ServicePath="WebS.asmx" ServiceMethod="GetCiudad_Dep"
></cc1:CascadingDropDown>
this is the webservice webs tha i use for load the second dropdonlist <WebMethod()> _
Public Function GetCiudad_Dep2(ByVal Dep As String) As CascadingDropDownNameValue()
With objConexion
.ConnectionString = objFunction.Cifrado(2, System.Configuration.ConfigurationManager.AppSettings("TARJETA_AZUL"))
dttTemp = .Query("SELECT VCI_NID,VCI_CDESCRIPCION FROM dbo.TBL_RVENDEDOR_CIUDAD WHERE VDE_NID=" + Dep, clsConnection.TipoDato.Table)
End With
Dim modelValues As New List(Of CascadingDropDownNameValue)()
For i = 0 To dttTemp.Rows.Count - 1 'carModelAdapter.GetModelsByCarId(makeId)
modelValues.Add(New CascadingDropDownNameValue(dttTemp.Rows(i).Item("VCI_CDESCRIPCION"), dttTemp.Rows(i).Item("VCI_NID")))
Next i
Return modelValues.ToArray()
End Function