当前位置:网站首页>asp.net 的经验
asp.net 的经验
2022-07-27 16:24:00 【微服务布道者】
用 ddlCtl.selectItem.value = dr[0].toString().Trim();
还是用
ddlCtl.selectItem.Selected=false;
ddlCtl.Items.FindControlByName["dr[0].toString().Trim()"].Selected=true;
好,是很明显的,用下面一种好。(个人意见)
因为直接赋值会把绑定的值给冲掉,如果绑定仅仅在!isPostBack执行的话。那赋值几次后就会发现ddlCtl里面的值已经不是原来的值了,当然可以再做其他的人工控制来处理,但那不是正确解决问题的方式(个人理解是解决问题要尽量处理问题的源头)
2、datagrid中的显示,如果总共10列,其中有一列其中有一个值为:PPM1600+cACO3+cACO5=25kg+2.5kg+2.6kg,而datagrid不是无限宽的情况下,那么其它列都会被此列给挤扁,datagrid显示的结果将非常难看(每行的高度可能很大)。
解决方法是:如果有表达方式这种很长的情况,.net是当作一个词来处理,必须中间加空格。
边栏推荐
- 微机原理学习笔记-常见寻址方式
- Led learning eye protection table lamp touch chip-dlt8t10s-jericho
- Join query and subquery
- Resource for NS2 beginner
- Interceptor拦截器
- Electromagnetic field learning notes - vector analysis and field theory foundation
- MySQL 02 initial experience
- Extension of regular expression
- Full automatic breast pump chip dltap703sd
- 文件的上传和下载
猜你喜欢

Extension of regular expression

Talking about JVM (frequent interview)

Electric heating neck pillow chip-dltap703sc

web UI 自动化测试:Selenium 语法详解 史上最全

Uploading and downloading of files

Commodity comment information and comment information classification

微信支付及支付回调
![[wechat applet] project practice - lottery application](/img/08/1e8643c95ad7c2661a76f9c3a0c57d.png)
[wechat applet] project practice - lottery application

MongoDB

自控原理学习笔记-系统稳定性分析(1)-BIBO稳定及Routh判据
随机推荐
微信支付及支付回调
如何用自动化测试搞垮团队
WORD 2007+使用技巧
Self control principle learning notes - system stability analysis (2) - loop analysis and Nyquist bode criterion
功率单位(power control)
Typeerror: conv2d(): argument 'padding' (position 5) must be multiple of ints, not STR [error]
The understanding of string in C.
Extension of ES6 value
Wechat payment and payment callback
MySQL 06 transaction, view, index, backup and recovery
MySQL 03 advanced query (I)
微机原理学习笔记-常见寻址方式
[wechat applet] project practice - lottery application
模仿线程扣除
Multifunctional wireless remote control moxibustion instrument chip dltap703sd
用函数在Excel中从文本字符串提取数字
npm的身份证和依赖
Some advice for NS2 beginner.
SSM项目使用过滤器实现登录监听
Self control principle learning notes - system stability analysis (1) - BIBO stability and Routh criterion