How to find HTMLGENERIC CONTROL IN CODE BEHIND FILE
How to find HTMLGENERIC CONTROL IN CODE BEHIND FILE WITH AND WITHOUT RUNAT="SERVER"
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Anubhav ChaudharyRank #29 · 42K reputationPosted Dec 9, 2014, 8:55 PM EST
At code behind only Server Side Controls can be find so you can't expect to get html controls without using runat="server" at code behind. Only those controls can be find which are having runat="server" no matter if it's a html control or server control.
Even after this if you want to find the control at the code behind then you can call the Script from code behind and from that Script you can call the HTML controls but here also one condition will be applied and that's those controls should be made at page prior to calling the script at code behind. Hope your problem and confusion will be solved by this ans.