未使用!Page.IsPostBack出现的错误
2006-06-21 09:48
351 查看
未使用Not Page.IsPostBack出现的错误
今天用.net调试一个程序,由于时间比较仓促,在所有的页面page_load中未加Not Page.IsPostBack 的判断语句,开始我并未在意,在一个数据更新页面,我试着先在page_load中从数据库读取数据到TextBox中,运行后一切显示正常,但是我一点更新按钮,怪事出现了,虽然Textbox中的数据我刚刚已经修改过了,但是更新后,出现的还是老数据,我试着把textbox中的数据用response.write打印出来,结果显示的是未修改前的数据,我花了很长时间也没有找出错误的原因,最后,我想是不是页面在回送时textbox中的数据被page_load事件还原了,于是我加了一个Not Page.IsPostBack的判断语句,结果更新成功了,于是我思考,button按钮触发时先积习发生的是page_load,然后才是click事件,唉,又长一智!
相关文章推荐
- django1.9使用django-pageination出现AttributeError错误处理
- 在使用Fragstats4.1软件,添加ESRI Grid图层时出现错误:Error: Grid IO dll is not loaded。
- Qt5.9Creator中,使用信号与槽机制connect()函数时,出现错误提示:'QObject' is an inaccessible base of 'ClassA'
- 使用kermit串口工具时出现 /dev/ttyS0 is not a terminal device 错误
- 关于Asp.net中Page.IsCrossPagePostBack的使用
- 使用asp.net urlrewrite 出现 Session state can only be used when enableSessionState is set to true 错误
- 关于Unity5.0.1f1中使用NGUI3.8.2出现错误Input Axis Mouse ScrolWheel is not setup
- 使用FABridge时,出现You are trying to call recursively into the Flash Player which is not allowed…错误的处理
- git-gui:使用终端打开以后出现错误提示 Spell checking is unavable
- 关于使用JQuery时 定义$(funtion(){});时出现Uncaught ReferenceError: $ is not defined的错误
- servlet中使用service()方法出现错误:HTTP method POST is not supported by this URL
- 每当使用struts2动态方法调用时,总是出现错误:There is no Action mapped for namespace [/user] and action name [user!add]
- 使用微信登录出现错误:There is no registered handler for URL scheme weixin
- 使用AlertDialog.Builder的时候出现错误:unable to add window --token null is not for an application的解决办法
- Android打包出现的问题:在使用Androidstudio打包过程中会出现以下错误: is not translated in “en” (English) [MissingTranslation
- 使用Coredata数据库出现的错误 CoreData: Cannot load NSManagedObjectModel. nil is an illegal URL parameter
- TypeError:a bytes-like object is requeired ,not 'int'(使用python3编写出现的错误)
- 使用mysql数据库进行左右连接查询的时候出现错误提示 Column 'id' in where clause is ambiguous
- 使用screen恢复会话时出现There is no screen to be resumed matching错误解决办法
- 安装sybase出现 找不到JVM错误请使用选项 -is:javahome<JAVA HOME DIR>