当前位置:网站首页>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是当作一个词来处理,必须中间加空格。
边栏推荐
- CMD 命令
- The great idea of NS2
- 大冤种们,新进测试行业,如何正确选择意向企业?
- Full automatic breast pump chip dltap703sd
- IDEA连接数据库时区问题,报红Server returns invalid timezone. Need to set ‘serverTimezone‘ property.
- Unity学习笔记(实现传送带)
- Ruiji takeout notes
- Interviewer: what do you think is your biggest weakness?
- Some advice for NS2 beginner.
- 连续时间系统的性能分析(1)-控制系统性能指标及一二阶分析
猜你喜欢

Selenium自动化测试面试题全家桶

MySQL 06 transaction, view, index, backup and recovery

Multifunctional wireless remote control moxibustion instrument chip dltap703sd

Talking about JVM (frequent interview)

大冤种们,新进测试行业,如何正确选择意向企业?

Kinect for Unity3D——BackgroundRemovalDemo学习

C#与Mysql数据库交互-Mysql配置及增删查改操作

MySQL 04 高级查询(二)

NPM basic use

自控原理学习笔记-系统稳定性分析(1)-BIBO稳定及Routh判据
随机推荐
Resource for NS2 beginner
Talking about JVM (frequent interview)
Wechat payment and payment callback
如何用自动化测试搞垮团队
Household mute mosquito repellent lamp chip-dltap703sd-jericho
MySQL 03 高级查询(一)
Electromagnetic field learning notes - vector analysis and field theory foundation
Led with fan eye protection learning table lamp touch chip-dlt8s12a
Low noise anion fan touch IC
Code interview of Amazon
Typescript installation
Filebeat.yml configuration file about the configuration of multiple services
转行软测&跳槽到新公司,工作怎样快速上手?
Learning notes of Microcomputer Principles - common addressing methods
NPM, cnpm Taobao image
Selenium自动化测试面试题全家桶
express get/post/delete...请求
MySQL 01 relational database design
瑞吉外卖笔记
JDBC-MySql 01 JDBC操作MySql(增删改查)