与MasterPage一起使用时SQL Update空白 [英] Sql Update blank when use with MasterPage

查看:62
本文介绍了与MasterPage一起使用时SQL Update空白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,
当我尝试使用母版页中包含的页面更新记录时.
我无法获得正确的更新,因为bec记录存储只有空白.

有什么想法请告诉我.

感谢Advanced

Dear All,
When I try to update a record with page that contain in a master page.
I can''t get the correct update bec record store only blank.

Any idea please let me know.

Thanks in advanced

推荐答案

U可能绑定了您所控制的

If(!Page.IsPostBack)
{
}

堵塞.因此,结果是控件首先在回发时变得空白,然后将数据另存为空白到数据库.将绑定代码放在Page_load事件中的上述定义的块中.这将解决您的问题.
U may be binding you control out of

If(!Page.IsPostBack)
{
}

block. So, in result the control is getting blank first on postback and then the data is saved as blank to database. Put your binding code inside the above defined block in Page_load event. This will solve your problem.


这篇关于与MasterPage一起使用时SQL Update空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆