Glossary Item Box
This module allows you to organize a poll on your site. There could be several polls with different questions on one site. The poll questions can be of two types – checkbox and radiobutton. The poll results can be displayed in graphic bars. The poll questions, their types and voting time settings take place in the CMS system administrative part.
To show a poll, it is used a PollForm tag. If the user has already voted, the poll results are displayed in this form. Using a MenuItemGuid of the PollForm tag you can relate your poll form with a certain poll. The poll form can be placed everywhere on the site.
![]() |
To organize several polls on one site you can do the following:
|
Example of inserting a poll form into a site page (internal tags description below):
<%@ Register TagPrefix="cmspl" Namespace="CMSLib.Modules.Poll" Assembly="CMSLib" %> |
To display poll results it is used a PollList tag.
A template file for displaying poll results lies in a modules/poll folder and can look as follows (internal tags description below):
<%@ Control Language="c#" Inherits="CMSLib.Pages.SiteControl" %> |
![]() |
You can add a poll form to this page if you wish in order to let the user vote, if he didn’t vote on this poll yet. |
Answer and Quest tags of the PollForm and PollList tags are assigned to display information about poll questions. In this tags the following parameters can be used:
| Template's part | Description |
|---|---|
<%# Container.Answer %> |
Answer for the question |
<%# Container.Votes %> |
Number of votes for the answer |
<%# Container.Percents %> |
Number of votes for the answer in percents |
<%# Container.Bar %> |
HTML code with percent bar |
<%# Container.BarBackColor %> |
Bar's color that representing the poll's percents |
| <%# Container.ControlToSave %> | Control to display checkbox or radiobutton |
Header and Footer tags of the PollForm and PollList tags are assigned to display general information about a poll. In this tags the following parameters can be used:
| Template's part | Description |
|---|---|
<%# Container.Name %> |
Poll's name |
<%# Container.LinkToArchive %> |
Link to poll's archive |
<%# Container.DateBegin %> |
Poll's start date |
<%# Container.DateEnd %> |
Poll's end date |
<%# Container.LinkToArchive %> |
Link to poll's archive |
| <%# Container.QuestionType %> | Type of the poll's question |
| <%# Container.VotesCount %> | Summary count of votes for the poll |
| See Also |
Modules: Modules
© 2005-2007 Astron Digital Ltd. All Rights Reserved.