Skip to main content
 首页 » 编程设计

c#之从 CRM 4 和 2011 中的站点地图打开 ASPX 页面

2024年02月23日23pengyingh

我想做的是在 sitemap 上放置一个项目这不会导致 CRM 页面,但会打开 www.MyNewPage.aspx .我需要以编程方式执行此操作和一个 iFrame CRM 页面中的内容不是我要找的。

这可能吗?

谢谢

请您参考如下方法:

您可以将 html 页面添加为网络资源。您可以在您的站点地图中像这样为站点地图整体制作这些网络资源目标,注意 url。

      <SubArea Id="nav_yourlink" Url="$webresource:new_mynewpage.htm" Icon="$webresource:new_image.png"> 
        <Titles> 
          <Title LCID="1033" Title="my title" /> 
        </Titles> 
        <Descriptions> 
          <Description LCID="1033" Description="my descr"/> 
        </Descriptions> 
      </SubArea> 

然后您可以在该 html 页面中嵌入任何您想要的 javascript 以启动您的网页。从 javascript 启动新页面的两种主要方式:

window.location = 'www.mydomain.com/mypage.aspx'; // set the content INSIDE crm's content pane. 

或者(听起来这就是你想要的)

window.open('www.mydomain.com/mypage.aspx'); // open it in a new window, leaving CRM's content pane blank.