问题描述
hi frnds,
单击按钮(新建)时,我想在下拉列表中默认为city ="pune".
当更改国家/地区时,然后根据该国家/地区自动更改城市..该编码已完成,但我想在默认情况下在单击按钮(新建)的下拉菜单中设置国家(印度)和城市(浦那)..
那我该怎么办?请帮助我.....
在此先感谢...
hi frnds,
i want to default city="pune" in dropdown when click on button(New).
when change country then automatically change city according to that country..that coding done but i want to set by default country(india) and city(pune) in dropdown on click button(New)..
so how can i do??
plz help me.....
thanks in advance...
推荐答案
默认国家(印度)和城市(浦那)
default country(india) and city(pune)
DropDownList1.SelectedValue = "20";
在数据库中将 SelectedValue
设置为其值
最好的问候
M.Mitwalli
set SelectedValue
with The value of it in DataBase
Best Regards
M.Mitwalli
ddlCountry.SelectedItem.Text.Trim()="India";
ddlCity.SelectedItem.Text.Trim()="Pune";
注意:您也可以尝试Dropdown的SelectedValue属性
谢谢
Note : You can also try the SelectedValue property of Dropdown
Thanks
这篇关于在下拉列表中绑定城市的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!