如何使设计模式适用于模板化用户控件? [英] How do I get design mode to work for templated user controls?

查看:37
本文介绍了如何使设计模式适用于模板化用户控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使设计模式适用于模板化的用户控件?我尝试遵循如何:创建模板化ASP.NET用户控件在MSDN上,并且还在页面底部尝试了框架2.0版的各种技巧,但是,当切换到设计视图时,我仍然遇到可怕的创建用户控件错误"错误.

Is it possible to get design mode to work for templated user controls? I have tried following the How to: Create Templated ASP.NET User Controls on MSDN, and also tried the various tips at the bottom of page for version 2.0 of the framework, but alas, I still get the dreaded "Error creating user control" error, when switching to design view.

我应该放弃并切换到自定义服务器控件吗?

Should I just give up, and switch to a custom server control?

推荐答案

关于此功能的帖子,他承认此操作无效(如果需要设计者支持,则将注释者指向CompositeControl基类.

There is a Connect bug filed on this as well as several comments on the VS2005 version of the MSDN page. Apparently this is a long-running defect that hasn't been fixed and hasn't got a solution. In ScottGu's post about this feature, he acknowledges this doesn't work (in the comments) and points the commenters to the CompositeControl base class if they want designer support.

可能不是您想要的答案,但是听起来好像没有真正的解决方案,只能转移到服务器控件上.

Probably not the answer you were hoping for, but it sounds like there's no real solution for the issue except moving to server controls.

这篇关于如何使设计模式适用于模板化用户控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆