Display Calendar view using SharePoint in C# script.
- <script type="text/c#" runat="server">
-
- string strListName = "Courses";
- string strView = "All Items";
- protected void Page_Load(object sender, EventArgs e)
- {
- GenerateListViewWp();
- }
- void btnview_Click(object sender, EventArgs e)
- {
-
-
- string strTitle = "Course Calendar";
-
- SPWeb oWeb = SPContext.Current.Web;
- SPList oList = oWeb.Lists[strListName];
- SPView View = oList.Views[strView];
- ListViewWebPart wp = new ListViewWebPart();
- wp.ListName = oList.ID.ToString("B").ToUpper();
- wp.ViewGuid = oList.Views[View].ID.ToString("B").ToUpper();
- wp.ID = this.ID + "child";
-
- wp.ViewType = ViewType.Calendar;
- wp.GetDesignTimeHtml();
- this.PageCalendarDiv.Controls.Add(wp);
-
- }
-
- }
- </script>
-
-
- <div id="PageCalendarDiv" runat="server">
- </div>
Using SharePoint Designer in Data View Web Part using the people picker with multiple names Display
- <script type="text/javascript">
-
- function CleanNames(textclean) {
-
- return text2clean.replace(/[;#0-9]+/g, "; ");
-
- }
-
- </script>
-
-
-
- Then call it from your XSL
-
-
-
- <xsl:if test="string-length(@Employess) != 0">
-
- <script type="text/javascript">document.write(CleanNames("<xsl:value-of select="@Employess" />"));</script>
-
- </xsl:if>
No comments:
Post a Comment