ASP.NET 代码隐藏和页面结果不匹配
你好 我正在使用VS2010开发一个网站。我今天开始收到一个问题 我的页面上的文本框并不是每次都会填充,而后面的代码显示文本已更改。
我有一个文本框来输入 ID,验证时会获取记录,详细信息会显示在其他文本框中。在某些 ID 上,后面的代码(在调试时)显示所有文本框的 Text 属性都已更改以反映获取的记录,但在事件完成后,文本框将显示以前的文本,它们的文本不是之前的文本如后面的代码所示。
我尝试了VS2010和VS2008。我有双核机器。 “设置亲和力”不起作用。
请帮忙
Hi
I am developing a website using VS2010. I have started receiving an issue today which is
text boxes on my pages are not populated every time while code behind shows the text is changed.
I have a text box to input an ID and on validation the record is fetched and details are shown in other text boxes. There are certain IDs on which the code behind (while debugging) shows the Text property of all text boxes are changed to reflect the fetched record but after completion of the event, text boxes are shown with previous texts, their texts are not those which were shown in the code behind.
I tried both VS2010 and VS2008. I have dual core machine. "Set Affinity" didn't work.
Please help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你看过Page_Load事件吗?每次有回发时都会调用此事件。执行您的初始代码,建议检查回发。
例如
Did you look at Page_Load event? this event gets called every time there is a postback. Execute your initial code it is advised check for postback.
e.g.