Last post Dec 11, 2007 08:48 PM by SimonCal
Dec 10, 2007 07:04 PM|mxmissile|LINK
post here, his example uses WebControls (Repeater and Literal). Under his header "Implementing Our View Using Server Controls" his example references these controls in the CodeBehind page. I am unable to do this with
the release, the codebehind page cannot find the controls referenced anywhere. Shouldn't it be creating a MyView.designer.cs file like the standard Web Forms does?
Dec 11, 2007 04:31 PM|ddahlem|LINK
I've experiencing the same problem. Regardless of the type of control I drop onto the ViewPage designer I cannot access any of them in the code-behind.
Dec 11, 2007 04:57 PM|mxmissile|LINK
I just found a fix. Right click on your web project and select "Convert To Web Application" after every time you add a new view. ScottGu has confirmed this issue, and hopefully will be fixed in the next version.
Dec 11, 2007 05:02 PM|ddahlem|LINK
Thanks for the update[:)]
Dec 11, 2007 08:48 PM|SimonCal|LINK
Yes, this is an issue missing in the VS proj templates for the default pages (views). Basically the *.designer.cs file allows the Control ID's to become fields that you can program against in the code-behind. Although not well-named, the command listed above
"Convert to Web Application" should give you the designer file required.