Question

I want to be able to reference the inner controls of SharePoint’s (WSS 3.0) SchedulePicker control. I have this (simplified) in my application page:

<%@ Page EnableViewState="true" Language="vb" MasterPageFile="~/_layouts/application.master" Inherits="Microsoft.SharePoint.WebControls.LayoutsPageBase" %>

<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="wssuc" TagName="SchedulePicker" src="~/_controltemplates/SchedulePicker.ascx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderMain" runat="server" >
<wssuc:SchedulePicker id="picker" runat="server" Weekly="True" Monthly="True" Enabled="True" /></wssuc:SchedulePicker>

This renders perfectly and I get amongst other things a drop down box containing 1st, 2nd, 3rd … 30th 31st. What I want to do is to be able to reference this control (called DdlSPDayOfMonth) in .NET code to retrieve the value that the user entered EG. 12th. I can’t work out how to do it. Can anyone help?

Was it helpful?

Solution

The SchedulePicker control generates a string similar to how a Windows Scheduled Task schedule string works. You can access it with:

Scheduler.ScheduleString = job.Schedule.ToString();
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top