3

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?

1 Answer 1

2

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();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.