ListBox 绑定后 怎么更改啊 试试清空后再重新绑定?反正refresh也是要刷新的 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 就按常规写没任何问题的啊.绑定一个新的数据源后就OK的.我的代码是:<body MS_POSITIONING="GridLayout"> <form id="Form1" method="post" runat="server"> <FONT face="宋体"> <asp:ListBox id="ListBox1" style="Z-INDEX: 101; LEFT: 32px; POSITION: absolute; TOP: 24px" runat="server" Width="160px" Height="128px" AutoPostBack="True"></asp:ListBox></FONT> </form> </body>private void Page_Load(object sender, System.EventArgs e) { // 在此处放置用户代码以初始化页面 if (!Page.IsPostBack) { ArrayList objList = new ArrayList(); objList.Add("中国北京"); objList.Add("美国华盛顿"); objList.Add("英国伦敦"); objList.Add("法国巴黎"); objList.Add("意大利罗马"); objList.Add("中国西安"); this.ListBox1.DataSource = objList; this.ListBox1.DataBind(); }给ListBox添加SelectIndexChanged事件.然后写代码:private void ListBox1_SelectedIndexChanged(object sender, System.EventArgs e) { ArrayList objList = new ArrayList(); objList.Add("香港"); objList.Add("澳门"); objList.Add("衙门"); objList.Add("台湾"); objList.Add("厦门"); this.ListBox1.DataSource = objList; this.ListBox1.DataBind(); }运行没有任何问题的! winform htmleditor 会自动生成背景代码,求解 .net 2.0串口接收数据有哪几种方式? winform调用js问题 强制转换 大家好啊,问一个win32 dll文件的问题,如何知道Windows系统自带的DLL文件里都有什么函数 内存中的DataTable问题 一个很弱的问题,我想了一天了~~ 如何禁止用户拖动窗体? 在vs.net2003中怎么画类图啊? 调用API,调用DLL,内嵌ASM代码在C#中好像特别麻烦? 求<<需求分析报告>>文档用于参考! 在程序中如何进行资源释放,dispose如何用,谢谢
我的代码是:
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<FONT face="宋体">
<asp:ListBox id="ListBox1" style="Z-INDEX: 101; LEFT: 32px; POSITION: absolute; TOP: 24px" runat="server"
Width="160px" Height="128px" AutoPostBack="True"></asp:ListBox></FONT>
</form>
</body>
private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
if (!Page.IsPostBack)
{
ArrayList objList = new ArrayList();
objList.Add("中国北京");
objList.Add("美国华盛顿");
objList.Add("英国伦敦");
objList.Add("法国巴黎");
objList.Add("意大利罗马");
objList.Add("中国西安"); this.ListBox1.DataSource = objList;
this.ListBox1.DataBind();
}
给ListBox添加SelectIndexChanged事件.然后写代码:
private void ListBox1_SelectedIndexChanged(object sender, System.EventArgs e)
{
ArrayList objList = new ArrayList();
objList.Add("香港");
objList.Add("澳门");
objList.Add("衙门");
objList.Add("台湾");
objList.Add("厦门");
this.ListBox1.DataSource = objList;
this.ListBox1.DataBind();
}
运行没有任何问题的!