谢谢拉
解决方案 »
- 急急急!!!发布网站时出现用户 'NT AUTHORITY\NETWORK SERVICE' 登录失败。错误
- fckeditor2.6 在ascx中怎么就不显示呢?点一个按钮就能出来?
- 如何做一个分类类别的显示??
- 咱们论坛的回复 文本框是怎么实现在右下角可以拖动文本框大小的
- asp.net如何与delphi做的服务器通信?
- DataGrid 分页问题: 为什么不管点击那一页都显示 第一页
- 如何用javascript为TreeView添加节点,删除节点?谢谢...........
- 递归循环li生成
- 如何传递datagrid中的数据??应该是传递这个对象吧??请高手指点了。仅剩的60分全给了.
- asp.net使用什么编辑器好??
- 两个问题~
- 有没有人知道 易趣网的商品比较是怎么实现的呀 在线等!!!!
{
if(!IsPostBack)
{
//myconfig.messageokorno("你确定要刷新该值?",this.Button1);
// 在此处放置用户代码以初始化页面
string sqlstr = "";
sqlstr = "select * from u2";
DataSet ds = new DataSet();
//System.Data.SqlClient.SqlDataReader read = mydb.RunProcGetReader(sqlstr); //this.CheckBoxList1.DataSource = mydb.RunProc(sqlstr,ds);
//this.CheckBoxList1.DataValueField = "leixing";
//this.CheckBoxList1.DataTextField = "leixing";
//this.CheckBoxList1.DataBind(); this.DropDownList1.DataSource = mydb.RunProc(sqlstr,ds);
this.DropDownList1.DataValueField = "id";
this.DropDownList1.DataTextField = "sheng";
this.DropDownList1.DataBind();
this.DropDownList1.Items.Insert(0, new ListItem("请选择省份", "请选择省份"));
this.DropDownList2.Items.Insert(0, new ListItem("请选择城市", ""));
ds.Clone();
}
private void DropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
if(this.DropDownList1.SelectedItem.Value == "请选择省份")
{
this.DropDownList2.Items.Clear();
this.DropDownList2.Items.Insert(this.DropDownList1.SelectedIndex,"请选择城市");
}
else
{
int x = Convert.ToInt32(this.DropDownList1.SelectedItem.Value.Trim());
string sqlstring1 = "select * from u3 where sheng = '"+ x +"'";
DataSet myds = new DataSet();
this.DropDownList2.DataSource = mydb.RunProc(sqlstring1,myds);
this.DropDownList2.DataValueField = "id";
this.DropDownList2.DataTextField = "chengshi";
this.DropDownList2.DataBind();
myds.Clone();
}