Updating an existing poll

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  

The following sample code shows how you can modify poll properties using the API:

 

[C#]

 

using CMS.Polls;

 

...

 

        string pollName = "testingSitePoll";

 

        // Get poll info

        PollInfo pollObj = PollInfoProvider.GetPollInfo(pollName);

 

        if (pollObj != null)

        {

            // Set the field values

            pollObj.PollResponseMessage = "Thank you for your time.";

            pollObj.PollAllowMultipleAnswers = true;

        }

 

        // Save the object

        PollInfoProvider.SetPollInfo(pollObj);

 

Page url: http://devnet.kentico.com/docs/5_5r2/devguide/index.html?api_updating_an_existing_poll.htm