I am implementing the ASP.NET MVC pattern along server side controls. I am not able to access the server side controls in my webpage CS Class.
Please guide me I think i am missing some thing.
Did you do "Convert to Web Application" on the project. You can't access the server-side controls because you don't have a designer class where the controls are defined.
When you add a viewpage to the current project template, the [PageName].Designer.cs file is not being generated - you need this file in order to use ServerControls. To have this file generated, right-click on your project and select "Convert To Web Application"
and the needed files will be generated.
Marked as answer by robconery on Dec 15, 2007 07:15 AM
faisalciit
Member
6 Points
12 Posts
Server Side Controls not accessible
Dec 14, 2007 11:17 AM|LINK
Hi
I am implementing the ASP.NET MVC pattern along server side controls. I am not able to access the server side controls in my webpage CS Class.
Please guide me I think i am missing some thing.
Thanks
Arshad Nsiar
SteveSanders...
Member
432 Points
119 Posts
Microsoft
Re: Server Side Controls not accessible
Dec 14, 2007 01:16 PM|LINK
Hi there, can you post a sample of the code you're trying along with an explanation of what doesn't work?
http://blog.codeville.net/
hhariri
Member
176 Points
70 Posts
Re: Server Side Controls not accessible
Dec 14, 2007 01:33 PM|LINK
http://hadihariri.com
http://twitter.com/hhariri
robconery
Participant
852 Points
195 Posts
Re: Server Side Controls not accessible
Dec 14, 2007 05:23 PM|LINK
When you add a viewpage to the current project template, the [PageName].Designer.cs file is not being generated - you need this file in order to use ServerControls. To have this file generated, right-click on your project and select "Convert To Web Application" and the needed files will be generated.
faisalciit
Member
6 Points
12 Posts
Re: Server Side Controls not accessible
Dec 15, 2007 05:55 AM|LINK
"Convert To Web Application" works fine for me.
Thanks
Arshad Nisar