gpt4 book ai didi

c# - 将 .ASCX 项目添加到站点地图

转载 作者:太空宇宙 更新时间:2023-11-03 11:45:23 25 4
gpt4 key购买 nike

有没有一种方法可以将 .ascx 文件添加到站点地图,以便它可以根据上次访问的控件加载/卸载控件?问题是我有一个页面包含一些控件,这些控件被放置在另一个控件之下,我希望能够使用站点地图在它们之间跳转,而不是为它们创建一个新页面......这就是我'试图在没有运气的情况下放入站点地图(参见产品列表,产品详细信息):

<siteMapNode url="Default.aspx" title="Home"  description="Home Page of _____">

<siteMapNode url="UserFunctions/ChangePassword.aspx" title="Change Password" description="Change Password" />
<siteMapNode url="Setup/EditUsers.aspx" title="Edit Users" description="Edit Users" />
<siteMapNode url="Setup/EditOther.aspx" title="Edit Other" description="Edit Other" />

<siteMapNode url="DataEntry/EditPartners.aspx" title="Partners" description="Partners">
<siteMapNode url="WebControls/Product List.ascx" title="Product List" description="Product List" >
<siteMapNode url="WebControls/ProductDetail.ascx" title="Product Detail" description="Product Detail" />
</siteMapNode>
</siteMapNode>

</siteMapNode>

最佳答案

不,用户控件只存在于页面中;您可以引用 product.aspx?category=,因此您可以在站点地图中定义一个查询字符串值,并根据该值动态加载正确的用户控件。这可行,但不能直接引用用户控件。

HTH.

关于c# - 将 .ASCX 项目添加到站点地图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3549661/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com