简体   繁体   English

在用户控件中使用占位符为gridview保留位置

[英]use place holder in user control to reserve a place for gridview

I have a user control that I want reserve a place inside it for filling by a GridView by each target pages. 我有一个用户控件,我想在其中保留一个位置,以供每个目标页面的GridView填充。

I am using place holder and ITemplate to provide this option for my user control. 我正在使用占位符和ITemplate为我的用户控件提供此选项。

Q1: How can I force my place holder to accept just GridView tag inside it? Q1:如何强制我的占位符只接受其中的GridView标签?

Q2: Or in ideal mode, is there a way that I can use place holder inside the grid? 问题2:或者在理想模式下,是否可以在网格内使用占位符? It means I write ASP:GridView tag in user control and write columns of it in target each pages. 这意味着我在用户控件中编写了ASP:GridView标记,并在每个页面的目标中写入了它的列。

Look at this link, you can get the second question's answer: 查看此链接,您可以获得第二个问题的答案:

How do I expose the columns collection of GridView control that is inside a user control 如何公开用户控件内的GridView控件的columns集合

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM