开发者

Controls on aspx page can't be accessed from code-behind

i have the following probl开发者_开发知识库em: i work in web application and only today. any control i put on the page, when trying to access it from behind code. it doesn't appear at all. what are the probabilities and reasons for this problem. note: i work from a thin client. they make some maintenance on their server today. and after that i find this problem.

the previous controls on my page can be accessed normally with out any problems.


See if the controls have an ID this might sound stupid but perhaps yesterday someone created the view with a snippet label *tab *tab and forgot to add an id

Below result of label *tab *tab ..

 <asp:Label Text="text" runat="server" />

Should be

 <asp:Label Text="text" ID="lblInfo" runat="server" />

Else check the attributes of the page / controls / codebehindfile


make sure the CodeBehindFile attributes are set correctly


see if run at server attribute is properly set on new controls

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜