在.cs页上访问ASP控件 [英] Accessing an ASP control on the .cs page

查看:87
本文介绍了在.cs页上访问ASP控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在ASP网站(name.aspx)页面上定义了许多文本框控件,但是无法在代码页面(name.aspx.cs)上访问它们,这可能是什么问题?具体而言,无法通过同一页面上的按钮的单击事件来访问它们.

I have defined a number of text box controls on an ASP web(name.aspx) page but a cannot access them on the code page(name.aspx.cs) what could be the problem? To be specific a cannot access them on the click event of a button that is on the same page.

推荐答案

检查设计器代码(name.aspx.designer.cs ).有时,此文件不同步,并且不添加或更新您添加到标记中的控件.如果控件不在设计器文件中,则可以手动添加它们,或在此处进行讨论
Check the designer code (name.aspx.designer.cs). Sometimes this file gets out of sync and controls you add to the markup are not included or updated. If the controls are not in the designer file you can either manually add them or see teh discussion here http://social.msdn.microsoft.com/Forums/en-US/csharpide/thread/128202d7-5ecb-4921-8ac3-e173d4824235[^]


这篇关于在.cs页上访问ASP控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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