为 ASP 动态数据中的一张表自定义 List.aspx

发布于 2024-08-09 00:16:32 字数 369 浏览 4 评论 0原文

我刚刚严格按照 MS 说明自定义动态数据页面模板一张桌子。创建文件夹 CustomPages/MyTable/List.aspx,并将 PageTemplates/List.aspx 复制到该文件夹​​中,但我现在收到编译器错误,因为我在两个 List.aspx 文件中都有重复的方法。

我做错了什么?

刚刚:我发现了另一个非 MS 页面,现在我再也找不到了,但他提出了几乎显而易见的建议:更改我的自定义列表页面的 j 3 个文件中的类名称。

I have just meticulously followed MS instructions for customising a dynamic data page template for one table. Create the folder CustomPages/MyTable/List.aspx, and copy PageTemplates/List.aspx into that folder, but I now get compiler error because I have duplicated methods in both List.aspx files.

What am I doing wrong?

Just in: I found another, non-MS page that I can't find again now, but he suggested the almost obvious: to change the class name in thej 3 files of my custom list page.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

Oo萌小芽oO 2024-08-16 00:16:32

我不确定说明中的内容,但您需要更改两个代码隐藏文件(List.aspx.cs 和 List.aspx.designer.cs)以及“继承”引用中的命名空间.aspx 文件,或者是的,您将拥有重复的方法(相同的命名空间、相同的类名、相同的方法名)。

您应该更改命名空间以反映自定义页面所在的路径 - 这将有助于确保它保持唯一。

I'm not sure what it says in the instructions, but you'll need to change the namespace in the two codebehind files (List.aspx.cs and List.aspx.designer.cs) and in the "inherits" reference in the .aspx file or yes, you will have duplicate methods (same namespace, same class name, same method name).

You should change the namespace to reflect the path that the custom page is in - this will help ensure it stays unique.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文