易截截图软件、单文件、免安装、纯绿色、仅160KB

请教:ASP.NET服务器控件回显问题~~~

DropDownList回显  因为事件上我设置了outopostback  为true    DropDownList2.SelectedValue = "3".ToString()  不好使 显示的是空白    请教  如何解决    感激不尽~~~
没人知道吗?自己顶下~~~

DropDownList2.SelectedValue = 值, tostring()干嘛?

引用
DropDownList2.SelectedValue = 值, tostring()干嘛?
修改  显示修改信息

怎么没人啊~~~晕啦~~~帮帮忙啊~~~

DropDownList2.SelectedValue = "3";
这样就行了呀。

引用
DropDownList回显  因为事件上我设置了outopostback  为true    DropDownList2.SelectedValue = "3".ToString()  不好使 显示的是空白    请教  如何解决    感激不尽~~~

C# code:


//你在此处设断点看是否走这里
DropDownList2.SelectedValue = "3".ToString();

//我想一定是你的逻辑哪走错了
//记得一定要使用
if(!this.Ispostback)
{

}



tostring()是格式化字符串的啊,
DropDownList2.SelectedValue = "3";这样就可以了, 让DropDownList2显示的值为“3”的选项的text;
根本不用tostring();
{{


相关问答:

asp.net分页问题

select top 12 * from Product where [id] not in (select top 12 [id] from Product)
这样可以分页,但是我在后面想加个条件
select top 12 * from Product where [id] not in (select top 12 [id] from Prod ......

ASP.NET如何实现自动登录 - .NET技术 / ASP.NET

哪位大哥有没有ASP.NET中利用Cookies实现用户自动登录的代码...谢谢了...越详细越好....
什么意思?自动登录?

mark 貌视是存储cookies 我也对cook比较迷糊 关注下

既然你知道用cookies自己动动大脑多好! ......

sql 搜索语句 - .NET技术 / ASP.NET

<table style="width: 1000px"><tr>
  <td style="height: 38px; width: 35px;">
  姓名</td>
  ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号