引用在ScottGu评论中找到的:
"There is an issue with the default file templates that you use to create view pages with the MVC project. They unfortunately by default don't generate the .designer.cs/.vb files that are used by the code-behind to get intellisense for controls - which is why you are running into the issue you are seeing.
The good news is that this is easy to fix. Just select your file in the solution explorer, right click, and choose the "Convert to Web Application" context menu option. This will generate the .designer file for you. From that point on, all changes you make to the .aspx file will be reflected in the code behind, and you'll be able to databind declaratively using the <asp:repeater> control."
MK2
|
菜鸟二级
|园豆:250
|
2007-12-12 23:00