1

ページ上部にタグを登録せずに、ユーザーコントロールをページに配置したい。例えば:

<p>some text</p>
<myname:mycontrol runat="server" />

これは可能ですか?タグ宣言はweb.configで実行できると聞きました...これは本当ですか?

もしそうなら、どの.NETFrameworkバージョンがこれをサポートしているのか考えてみてください。

ありがとう

4

1 に答える 1

5

.net 2.0 web.config :

<pages>
    <controls>
    <add tagPrefix="MYPREFIX" namespace=="MyNamespace.Stuff" assembly="MyAssembly" />

より徹底的な議論http://weblogs.asp.net/scottgu/archive/2006/11/26/tip-trick-how-to-register-user-controls-and-custom-controls-in-web-config。 aspx

于 2009-05-02T00:31:22.900 に答える