Show / Hide Table of Contents

Class SectionQuestion

Abstract class that questions which needs postback handling of the answers and handling of multiple inner answer sections

Inheritance
System.Object
System.Web.UI.Control
System.Web.UI.WebControls.WebControl
QuestionItem
ActiveQuestion
SectionQuestion
MatrixQuestion
SingleQuestion
Implements
System.ComponentModel.IComponent
System.IDisposable
System.Web.UI.IParserAccessor
System.Web.UI.IUrlResolutionService
System.Web.UI.IDataBindingsAccessor
System.Web.UI.IControlBuilderAccessor
System.Web.UI.IControlDesignerAccessor
System.Web.UI.IExpressionsAccessor
System.Web.UI.IAttributeAccessor
System.Web.UI.INamingContainer
System.Web.UI.IPostBackDataHandler
Inherited Members
ActiveQuestion.AnswerPosted
ActiveQuestion.ClientScriptGenerated
ActiveQuestion.InvalidAnswers
ActiveQuestion.SelectionOverflow
ActiveQuestion.SelectionRequired
ActiveQuestion.MaxSelectionsReached(PostedAnswerDataCollection)
ActiveQuestion.MinSelectionsRequired(PostedAnswerDataCollection)
ActiveQuestion.OnAnswersPost(QuestionItemAnswersEventArgs)
ActiveQuestion.OnBubbleEvent(Object, EventArgs)
ActiveQuestion.OnClientScriptGeneration(QuestionItemClientScriptEventArgs)
ActiveQuestion.OnInvalidAnswers(QuestionItemInvalidAnswersEventArgs)
ActiveQuestion.OnPreRender(EventArgs)
ActiveQuestion.OnSelectionOverflow(QuestionItemAnswersEventArgs)
ActiveQuestion.OnSelectionRequired(QuestionItemAnswersEventArgs)
ActiveQuestion.IPostBackDataHandler.LoadPostData(String, NameValueCollection)
ActiveQuestion.IPostBackDataHandler.RaisePostDataChangedEvent()
ActiveQuestion.ConfirmationMessageStyle
ActiveQuestion.DisplayValidationErrorMessages
ActiveQuestion.EnableAnswersDefault
ActiveQuestion.EnableClientSideValidation
ActiveQuestion.EnableServerSideValidation
ActiveQuestion.HasInvalidAnswers
ActiveQuestion.IsSelectionOverflow
ActiveQuestion.IsSelectionRequired
ActiveQuestion.MaxAnswerSelectionMessage
ActiveQuestion.MaxSelectionAllowed
ActiveQuestion.MinAnswerSelectionMessage
ActiveQuestion.MinSelectionRequired
ActiveQuestion.ValidationMark
ActiveQuestion.ValidationMarkStyle
ActiveQuestion.ValidationMessageStyle
ActiveQuestion.VoterAnswersState
QuestionItem.QuestionId_Text
QuestionItem.HelpText
QuestionItem.ShowHelpText
QuestionItem.BuildPanelRow(Control, Style)
QuestionItem.OnInit(EventArgs)
QuestionItem.AnswerStyle
QuestionItem.LanguageCode
QuestionItem.QuestionId
QuestionItem.QuestionNumber
QuestionItem.QuestionStyle
QuestionItem.QuestionPanel
QuestionItem.RenderMode
QuestionItem.SelectionPanel
QuestionItem.Text
System.Web.UI.WebControls.WebControl.AddAttributesToRender(System.Web.UI.HtmlTextWriter)
System.Web.UI.WebControls.WebControl.ApplyStyle(System.Web.UI.WebControls.Style)
System.Web.UI.WebControls.WebControl.CopyBaseAttributes(System.Web.UI.WebControls.WebControl)
System.Web.UI.WebControls.WebControl.CreateControlStyle()
System.Web.UI.WebControls.WebControl.LoadViewState(System.Object)
System.Web.UI.WebControls.WebControl.TrackViewState()
System.Web.UI.WebControls.WebControl.MergeStyle(System.Web.UI.WebControls.Style)
System.Web.UI.WebControls.WebControl.Render(System.Web.UI.HtmlTextWriter)
System.Web.UI.WebControls.WebControl.RenderBeginTag(System.Web.UI.HtmlTextWriter)
System.Web.UI.WebControls.WebControl.RenderEndTag(System.Web.UI.HtmlTextWriter)
System.Web.UI.WebControls.WebControl.RenderContents(System.Web.UI.HtmlTextWriter)
System.Web.UI.WebControls.WebControl.SaveViewState()
System.Web.UI.WebControls.WebControl.System.Web.UI.IAttributeAccessor.GetAttribute(System.String)
System.Web.UI.WebControls.WebControl.System.Web.UI.IAttributeAccessor.SetAttribute(System.String, System.String)
System.Web.UI.WebControls.WebControl.AccessKey
System.Web.UI.WebControls.WebControl.Attributes
System.Web.UI.WebControls.WebControl.BackColor
System.Web.UI.WebControls.WebControl.BorderColor
System.Web.UI.WebControls.WebControl.BorderWidth
System.Web.UI.WebControls.WebControl.BorderStyle
System.Web.UI.WebControls.WebControl.ControlStyle
System.Web.UI.WebControls.WebControl.ControlStyleCreated
System.Web.UI.WebControls.WebControl.CssClass
System.Web.UI.WebControls.WebControl.DisabledCssClass
System.Web.UI.WebControls.WebControl.Style
System.Web.UI.WebControls.WebControl.Enabled
System.Web.UI.WebControls.WebControl.EnableTheming
System.Web.UI.WebControls.WebControl.Font
System.Web.UI.WebControls.WebControl.ForeColor
System.Web.UI.WebControls.WebControl.HasAttributes
System.Web.UI.WebControls.WebControl.Height
System.Web.UI.WebControls.WebControl.IsEnabled
System.Web.UI.WebControls.WebControl.SupportsDisabledAttribute
System.Web.UI.WebControls.WebControl.SkinID
System.Web.UI.WebControls.WebControl.TabIndex
System.Web.UI.WebControls.WebControl.TagKey
System.Web.UI.WebControls.WebControl.TagName
System.Web.UI.WebControls.WebControl.ToolTip
System.Web.UI.WebControls.WebControl.Width
System.Web.UI.Control.ResolveAdapter()
System.Web.UI.Control.HasEvents()
System.Web.UI.Control.GetRouteUrl(System.Object)
System.Web.UI.Control.GetRouteUrl(System.String, System.Object)
System.Web.UI.Control.GetRouteUrl(System.Web.Routing.RouteValueDictionary)
System.Web.UI.Control.GetRouteUrl(System.String, System.Web.Routing.RouteValueDictionary)
System.Web.UI.Control.GetUniqueIDRelativeTo(System.Web.UI.Control)
System.Web.UI.Control.ApplyStyleSheetSkin(System.Web.UI.Page)
System.Web.UI.Control.OnDataBinding(System.EventArgs)
System.Web.UI.Control.DataBind()
System.Web.UI.Control.DataBind(System.Boolean)
System.Web.UI.Control.DataBindChildren()
System.Web.UI.Control.AddParsedSubObject(System.Object)
System.Web.UI.Control.EnsureID()
System.Web.UI.Control.ClearChildState()
System.Web.UI.Control.ClearChildControlState()
System.Web.UI.Control.ClearChildViewState()
System.Web.UI.Control.ClearEffectiveClientIDMode()
System.Web.UI.Control.ClearCachedClientID()
System.Web.UI.Control.Focus()
System.Web.UI.Control.LoadControlState(System.Object)
System.Web.UI.Control.MapPathSecure(System.String)
System.Web.UI.Control.OpenFile(System.String)
System.Web.UI.Control.OnLoad(System.EventArgs)
System.Web.UI.Control.BuildProfileTree(System.String, System.Boolean)
System.Web.UI.Control.SaveControlState()
System.Web.UI.Control.RenderChildren(System.Web.UI.HtmlTextWriter)
System.Web.UI.Control.RenderControl(System.Web.UI.HtmlTextWriter)
System.Web.UI.Control.RenderControl(System.Web.UI.HtmlTextWriter, System.Web.UI.Adapters.ControlAdapter)
System.Web.UI.Control.OnUnload(System.EventArgs)
System.Web.UI.Control.Dispose()
System.Web.UI.Control.RaiseBubbleEvent(System.Object, System.EventArgs)
System.Web.UI.Control.AddedControl(System.Web.UI.Control, System.Int32)
System.Web.UI.Control.CreateControlCollection()
System.Web.UI.Control.ResolveUrl(System.String)
System.Web.UI.Control.ResolveClientUrl(System.String)
System.Web.UI.Control.FindControl(System.String)
System.Web.UI.Control.FindControl(System.String, System.Int32)
System.Web.UI.Control.GetDesignModeState()
System.Web.UI.Control.HasControls()
System.Web.UI.Control.IsLiteralContent()
System.Web.UI.Control.EnsureChildControls()
System.Web.UI.Control.RemovedControl(System.Web.UI.Control)
System.Web.UI.Control.SetDesignModeState(System.Collections.IDictionary)
System.Web.UI.Control.SetRenderMethodDelegate(System.Web.UI.RenderMethod)
System.Web.UI.Control.System.Web.UI.IParserAccessor.AddParsedSubObject(System.Object)
System.Web.UI.Control.System.Web.UI.IControlDesignerAccessor.GetDesignModeState()
System.Web.UI.Control.System.Web.UI.IControlDesignerAccessor.SetDesignModeState(System.Collections.IDictionary)
System.Web.UI.Control.System.Web.UI.IControlDesignerAccessor.SetOwnerControl(System.Web.UI.Control)
System.Web.UI.Control.ClientIDMode
System.Web.UI.Control.ClientID
System.Web.UI.Control.ClientIDSeparator
System.Web.UI.Control.Context
System.Web.UI.Control.Adapter
System.Web.UI.Control.DesignMode
System.Web.UI.Control.Events
System.Web.UI.Control.ID
System.Web.UI.Control.IsChildControlStateCleared
System.Web.UI.Control.EnableViewState
System.Web.UI.Control.ViewStateMode
System.Web.UI.Control.IsViewStateEnabled
System.Web.UI.Control.NamingContainer
System.Web.UI.Control.IdSeparator
System.Web.UI.Control.LoadViewStateByID
System.Web.UI.Control.Page
System.Web.UI.Control.RenderingCompatibility
System.Web.UI.Control.TemplateControl
System.Web.UI.Control.Parent
System.Web.UI.Control.TemplateSourceDirectory
System.Web.UI.Control.AppRelativeTemplateSourceDirectory
System.Web.UI.Control.Site
System.Web.UI.Control.Visible
System.Web.UI.Control.UniqueID
System.Web.UI.Control.HasChildViewState
System.Web.UI.Control.Controls
System.Web.UI.Control.ValidateRequestMode
System.Web.UI.Control.ViewState
System.Web.UI.Control.ViewStateIgnoresCase
System.Web.UI.Control.ChildControlsCreated
System.Web.UI.Control.IsTrackingViewState
System.Web.UI.Control.System.Web.UI.IDataBindingsAccessor.HasDataBindings
System.Web.UI.Control.System.Web.UI.IDataBindingsAccessor.DataBindings
System.Web.UI.Control.System.Web.UI.IControlDesignerAccessor.UserData
System.Web.UI.Control.System.Web.UI.IControlBuilderAccessor.ControlBuilder
System.Web.UI.Control.System.Web.UI.IExpressionsAccessor.HasExpressions
System.Web.UI.Control.System.Web.UI.IExpressionsAccessor.Expressions
System.Web.UI.Control.Disposed
System.Web.UI.Control.DataBinding
System.Web.UI.Control.Init
System.Web.UI.Control.Load
System.Web.UI.Control.PreRender
System.Web.UI.Control.Unload
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Votations.NSurvey.WebControls.UI
Assembly: SurveyProject.WebControls.dll
Syntax
public abstract class SectionQuestion : ActiveQuestion, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, INamingContainer, IPostBackDataHandler

Properties

AddSectionLinkText

Text show to the user to add a new section

Declaration
public string AddSectionLinkText { get; set; }
Property Value
Type Description
System.String

CancelButtonText

Cancel button caption

Declaration
public string CancelButtonText { get; set; }
Property Value
Type Description
System.String

DeleteSectionLinkText

Text show to the user to delete a section

Declaration
public string DeleteSectionLinkText { get; set; }
Property Value
Type Description
System.String

EditSectionLinkText

Text show to the user to edit a section in the grid

Declaration
public string EditSectionLinkText { get; set; }
Property Value
Type Description
System.String

EnableGridSectionClientSideValidation

Enable client side validation of grid answer section items

Declaration
public bool EnableGridSectionClientSideValidation { get; set; }
Property Value
Type Description
System.Boolean

EnableGridSectionServerSideValidation

Enable server side validation of grid answer section items

Declaration
public bool EnableGridSectionServerSideValidation { get; set; }
Property Value
Type Description
System.Boolean

GridAnswers

Answers that will be shown in the section's grid overview

Declaration
public int[] GridAnswers { get; set; }
Property Value
Type Description
System.Int32[]

GridMode

In which state is the current grid

Declaration
protected SectionGridMode GridMode { get; set; }
Property Value
Type Description
SectionGridMode

MaxSections

how many section is the user allowed to create in this question

Declaration
public int MaxSections { get; set; }
Property Value
Type Description
System.Int32

RepeatMode

How the user can create sections

Declaration
public RepeatableSectionMode RepeatMode { get; set; }
Property Value
Type Description
RepeatableSectionMode

SectionCount

Number of sections owned by this question

Declaration
public int SectionCount { get; set; }
Property Value
Type Description
System.Int32

SectionGridAnswersAlternatingItemStyle

Sets the style for the section's answer grid overview items

Declaration
[PersistenceMode(PersistenceMode.InnerProperty)]
public Style SectionGridAnswersAlternatingItemStyle { get; set; }
Property Value
Type Description
System.Web.UI.WebControls.Style

SectionGridAnswersHeaderStyle

Sets the style for the section's answer grid header

Declaration
[PersistenceMode(PersistenceMode.InnerProperty)]
public Style SectionGridAnswersHeaderStyle { get; set; }
Property Value
Type Description
System.Web.UI.WebControls.Style

SectionGridAnswersItemStyle

Sets the style for the section's answer grid overview items

Declaration
[PersistenceMode(PersistenceMode.InnerProperty)]
public Style SectionGridAnswersItemStyle { get; set; }
Property Value
Type Description
System.Web.UI.WebControls.Style

SectionGridAnswersStyle

Sets the style for the section's answer grid table

Declaration
[PersistenceMode(PersistenceMode.InnerProperty)]
public Style SectionGridAnswersStyle { get; set; }
Property Value
Type Description
System.Web.UI.WebControls.Style

SectionOptionStyle

Style for the section's option row

Declaration
public Style SectionOptionStyle { get; set; }
Property Value
Type Description
System.Web.UI.WebControls.Style

SectionPanel

Contains all sections and section options

Declaration
protected Panel SectionPanel { get; set; }
Property Value
Type Description
System.Web.UI.WebControls.Panel

SectionUids

Section Uids must be stored between postbacks to make sure that the section control gets the correct uid back

Declaration
protected ArrayList SectionUids { get; set; }
Property Value
Type Description
System.Collections.ArrayList

TargetSection

To which section are the new answer in the grid be assigned

Declaration
public int TargetSection { get; set; }
Property Value
Type Description
System.Int32

UpdateSectionLinkText

Text show to the user to edit a section in the grid

Declaration
public string UpdateSectionLinkText { get; set; }
Property Value
Type Description
System.String

Methods

AddSection(Int32, Int32)

Adds a new section using the provided section Uid

Declaration
protected virtual void AddSection(int sectionNumber, int sectionUid)
Parameters
Type Name Description
System.Int32 sectionNumber
System.Int32 sectionUid

AddSectionButton_Click(Object, CommandEventArgs)

Adds / inserts a new full answer section

Declaration
protected virtual void AddSectionButton_Click(object sender, CommandEventArgs e)
Parameters
Type Name Description
System.Object sender
System.Web.UI.WebControls.CommandEventArgs e

AnswersGrid_AddSection(Object, SectionAnswersItemEventArgs)

A new section has been requested on the grid. Show a "new section" area

Declaration
protected virtual void AnswersGrid_AddSection(object sender, SectionAnswersItemEventArgs e)
Parameters
Type Name Description
System.Object sender
SectionAnswersItemEventArgs e

AnswersGrid_DeleteSection(Object, SectionAnswersItemEventArgs)

A section has been removed on the grid. Update the target section number if any was setup or show a "new section" area if the last section has been removed on the grid

Declaration
protected virtual void AnswersGrid_DeleteSection(object sender, SectionAnswersItemEventArgs e)
Parameters
Type Name Description
System.Object sender
SectionAnswersItemEventArgs e

AnswersGrid_EditSection(Object, SectionAnswersItemEventArgs)

A new section has been requested for edit Show a "new section" area with the section's answers

Declaration
protected virtual void AnswersGrid_EditSection(object sender, SectionAnswersItemEventArgs e)
Parameters
Type Name Description
System.Object sender
SectionAnswersItemEventArgs e

BuildMultipleSections()

Creates the section's container

Declaration
protected virtual void BuildMultipleSections()

BuildQuestion()

Build the question layout with its child controls

Declaration
protected virtual void BuildQuestion()

CreateChildControls()

Compose all answer sections into a question

Declaration
protected override void CreateChildControls()
Overrides
System.Web.UI.Control.CreateChildControls()

CreateSection(Int32, Int32)

Must return a new section populated with its answers or child questions

Declaration
protected abstract Section CreateSection(int sectionNumber, int sectionGuid)
Parameters
Type Name Description
System.Int32 sectionNumber
System.Int32 sectionGuid
Returns
Type Description
Section

DeleteSectionAnswers(Int32, PostedAnswerDataCollection)

Removes all answers related to the target section number

Declaration
protected void DeleteSectionAnswers(int targetSection, PostedAnswerDataCollection answers)
Parameters
Type Name Description
System.Int32 targetSection
PostedAnswerDataCollection answers

GetGridVoterAnswers()

Parse the answer state and returns the answers of this question

Declaration
protected virtual GridAnswerDataCollection GetGridVoterAnswers()
Returns
Type Description
GridAnswerDataCollection

GetSectionAnswersGrid()

Must return a valid grid that will be use in grid section mode. Null can be returned if no grid can be generated

Declaration
protected abstract SectionAnswersGridItem GetSectionAnswersGrid()
Returns
Type Description
SectionAnswersGridItem

GetSectionCountFromAnswers(PostedAnswerDataCollection)

Returns the section based count on the current posted answer's data, doesnt include the count of any "add new section" only counted are the section already posted, validated and stored in the grid

Declaration
public int GetSectionCountFromAnswers(PostedAnswerDataCollection postedAnswers)
Parameters
Type Name Description
PostedAnswerDataCollection postedAnswers
Returns
Type Description
System.Int32

GetSectionCountFromState()

Must returns the number of sections that must be restored for this question, should be based on the current answerstate

Declaration
protected abstract int GetSectionCountFromState()
Returns
Type Description
System.Int32

GetSectionOptions(Int32, Int32)

Builds a section option table for the given section number

Declaration
protected virtual Panel GetSectionOptions(int sectionNumber, int sectionUid)
Parameters
Type Name Description
System.Int32 sectionNumber
System.Int32 sectionUid
Returns
Type Description
System.Web.UI.WebControls.Panel

GetSectionUid(Int32)

Returns the exsiting Uid of the section if it doesnt exists creates a random UId and store it in the viewstate collection for futur postbacks

Declaration
protected virtual int GetSectionUid(int sectionNumber)
Parameters
Type Name Description
System.Int32 sectionNumber
Returns
Type Description
System.Int32

InsertSection(Int32)

Inserts a new section at the given section number

Declaration
protected virtual void InsertSection(int sectionNumber)
Parameters
Type Name Description
System.Int32 sectionNumber

OrderTargetSectionAnswers(Int32, PostedAnswerDataCollection)

Reorder the posted section in the correct order based on the target section's new section number new section answers are marked with a -1 sectionnumber

Declaration
protected void OrderTargetSectionAnswers(int targetSection, PostedAnswerDataCollection answers)
Parameters
Type Name Description
System.Int32 targetSection
PostedAnswerDataCollection answers

PostedAnswersHandler(PostedAnswerDataCollection)

Handles posted answers and make sure to post answers if there aren't any in the section or delete all unvalidated answers if answers exist in the section

Declaration
protected override void PostedAnswersHandler(PostedAnswerDataCollection answers)
Parameters
Type Name Description
PostedAnswerDataCollection answers
Overrides
ActiveQuestion.PostedAnswersHandler(PostedAnswerDataCollection)

RemoveSectionButton_Command(Object, CommandEventArgs)

Deletes a section from the question

Declaration
protected virtual void RemoveSectionButton_Command(object sender, CommandEventArgs e)
Parameters
Type Name Description
System.Object sender
System.Web.UI.WebControls.CommandEventArgs e

Section_ClientScriptGenerated(Object, QuestionItemClientScriptEventArgs)

Notify subscriber that a script has been generated for the given section

Declaration
protected void Section_ClientScriptGenerated(object sender, QuestionItemClientScriptEventArgs e)
Parameters
Type Name Description
System.Object sender
QuestionItemClientScriptEventArgs e

Implements

System.ComponentModel.IComponent
System.IDisposable
System.Web.UI.IParserAccessor
System.Web.UI.IUrlResolutionService
System.Web.UI.IDataBindingsAccessor
System.Web.UI.IControlBuilderAccessor
System.Web.UI.IControlDesignerAccessor
System.Web.UI.IExpressionsAccessor
System.Web.UI.IAttributeAccessor
System.Web.UI.INamingContainer
System.Web.UI.IPostBackDataHandler
In This Article
Back to top Generated by DocFX