I have a ascx control that has a number of controls declared in the .ascx page and when I type "Me.btnSomeButton" it shows me the button in intellisense however when I try to then do something with that button in the vb.net code it gives me an error
<ERROR>
VB.NET: Unknow entity 'btnSomeButton'
</ERROR>
I have compiled the page and even click on the button in design view but that does not solve the issue.
MyronCope
Participant
1656 Points
1345 Posts
"Unknown entity" when I try to use controls in code behind
Jun 14, 2012 04:41 PM|LINK
using vb.net/asp.net 2008
I have a ascx control that has a number of controls declared in the .ascx page and when I type "Me.btnSomeButton" it shows me the button in intellisense however when I try to then do something with that button in the vb.net code it gives me an error
<ERROR>
VB.NET: Unknow entity 'btnSomeButton'
</ERROR>
I have compiled the page and even click on the button in design view but that does not solve the issue.
anyone know a solution for this?
thanks
MC
Mudasir.Khan
All-Star
15346 Points
3142 Posts
Re: "Unknown entity" when I try to use controls in code behind
Jun 14, 2012 04:54 PM|LINK
please remove the button from the inline code and re add the button
basically it happend to me when variable wasn't created in the codebehind but there was tags for the control in the inline-code
or try restarting the VS.net and check
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: "Unknown entity" when I try to use controls in code behind
Jun 15, 2012 06:44 AM|LINK
There must be something wrong with your codes of customizing the control……Plz paste your codes……