自定义sharepoint页面

forum2621 2009-11-30 11:57:15
小弟刚学sharepoint,很多东东还不懂,问个比较简单的问题。

自定义sharepoint页面时,如何把系统的master增加进来。
我用的vs2008,VSeWSSv也安装了,在vs新建项目时,选择sharepoint,里边什么都没有的啊;新建网站,可以连到我本机的sharepoint,但是无法加载模板。

特请教下,如何才能在vs里边新建一个sharepoint页面。在此先谢谢各位了啊。
...全文
305 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
forum2621 2009-12-03
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 glife07 的回复:]
参考这个例子吧,很实用~

http://www.eggheadcafe.com/tutorials/aspnet/2145201e-00aa-4877-b5f7-cf150d7f0c5f/sharepoint-application-pa.aspx
[/Quote]

这个效果不错,多谢分享了。
showilove 2009-12-03
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 glife07 的回复:]
参考这个例子吧,很实用~

http://www.eggheadcafe.com/tutorials/aspnet/2145201e-00aa-4877-b5f7-cf150d7f0c5f/sharepoint-application-pa.aspx
[/Quote]
这个复杂了点
直接Designer吧
forum2621 2009-12-03
  • 打赏
  • 举报
回复
[Quote=引用 7 楼 huxuanchenxy 的回复:]
引用 4 楼 showilove 的回复:
引用 3 楼 glife07 的回复:
参考这个例子吧,很实用~

http://www.eggheadcafe.com/tutorials/aspnet/2145201e-00aa-4877-b5f7-cf150d7f0c5f/sharepoint-application-pa.aspx


打不开
[/Quote]


可以打开吧
http://www.eggheadcafe.com/tutorials/aspnet/2145201e-00aa-4877-b5f7-cf150d7f0c5f/sharepoint-application-pa.aspx

一个英文网址,如果打不开可能被过滤了...
huxuanchenxy 2009-12-03
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 showilove 的回复:]
引用 3 楼 glife07 的回复:
参考这个例子吧,很实用~

http://www.eggheadcafe.com/tutorials/aspnet/2145201e-00aa-4877-b5f7-cf150d7f0c5f/sharepoint-application-pa.aspx
[/Quote]

打不开
forum2621 2009-12-03
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 forever_kingdom 的回复:]
你可以在你的页面里使用两个母板页,default.master,application.master,这两个都是SharePoint中的母板页,
1. <%@ Page language="C#" MasterPageFile="~masterurl/default.master"    Inherits="Test.ClassNameSpace,Test,Version=1.0.0.0,Culture=neutral,PublicKeyToken=5fb4588739615a23" meta:progid="SharePoint.WebPartPage.Document" %>

2. <%@ Page Language="C#"  MasterPageFile="~/_layouts/application.master" Inherits="Test.NameSpace" ValidateRequest="False" %>
你可以使用任何方式创建页面,然后将页面部署到Moss站点中就可以了
[/Quote]


我自定义了一个页面,可以正常工作,代码如下。但是左边什么都没有啊,怎么能让左边list等导航区存在。
我的站点地址为:http://localhost:46938/MySite001
我是这样运用的:在http://localhost:46938/MySite001/Pages/wp.aspx页面的中的一个webpart生成一个table,此table含有超链接,指向我定义的CustomPage.aspx页面来进行处理(http://localhost:46938/MySite001/_layouts/aspx/CustomPage.aspx?id=123),但是我的CustomPage页面左侧导航栏没有加载(有占位符,就是没数据,空白区域),看着好难看啊,能不能把左侧导航区域的数据也加载出来(要么就完全删掉不要占位符)。

CustomPage.aspx 代码

<%@ Page Language="C#" MasterPageFile="~/_layouts/application.master" %>

<%@ Register TagPrefix="CustomControls" Namespace="MyWebPart"
Assembly="MyWebPart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=10e4d652b5a0cc00" %>
<%--Control Place Holder--%>

<asp:Content ContentPlaceHolderId="PlaceHolderLeftNavBarDataSource" runat="server"/>
<asp:Content ContentPlaceHolderId="PlaceHolderLeftActions" runat="server"/>
<asp:Content ContentPlaceHolderId="PlaceHolderLeftNavBar" runat="server"/>
<asp:Content ContentPlaceHolderId="PlaceHolderLeftNavBarTop" runat="server"/>

<asp:Content ID="Main" runat="server" ContentPlaceHolderID="PlaceHolderMain">
<table>
<tr>
<td>

</td>
</tr>
<tr>
<td>
<CustomControls:MyEditPage ID="MyEditPage" runat="server" />
</td>
</tr>
<tr>
<td align="right">
Application Page With Custom Controls
</td>
</tr>
</table>
</asp:Content>

<%--Site Title in the Browser--%>
<asp:Content ID="PageTitle" runat="server" ContentPlaceHolderID="PlaceHolderPageTitle">
Application Page With Custom Controls
</asp:Content>

<%--Site Title in the Page --%>
<asp:Content ID="PageTitleInTitleArea" runat="server" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea">
Application Page With Custom Controls
</asp:Content>





  • 打赏
  • 举报
回复
你可以在你的页面里使用两个母板页,default.master,application.master,这两个都是SharePoint中的母板页,
1.<%@ Page language="C#" MasterPageFile="~masterurl/default.master" Inherits="Test.ClassNameSpace,Test,Version=1.0.0.0,Culture=neutral,PublicKeyToken=5fb4588739615a23" meta:progid="SharePoint.WebPartPage.Document" %>

2.<%@ Page Language="C#" MasterPageFile="~/_layouts/application.master" Inherits="Test.NameSpace" ValidateRequest="False" %>
你可以使用任何方式创建页面,然后将页面部署到Moss站点中就可以了
Justin-Liu 2009-11-30
  • 打赏
  • 举报
回复
在Designer里头搞吧

3,242

社区成员

发帖
与我相关
我的任务
社区描述
企业开发 SharePoint
社区管理员
  • SharePoint社区
  • 霖雨
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧