StrawPollControlBuilder.cs
Upload User: lxycoco
Upload Date: 2022-07-21
Package Size: 38457k
Code Size: 1k
Category:

CSharp

Development Platform:

Others

  1. using System;
  2. using System.Web.UI;
  3. using System.Web.UI.WebControls;
  4. using System.ComponentModel;
  5. using System.Collections;
  6. namespace PCSCustomWebControls
  7. {
  8.    internal class StrawPollControlBuilder : ControlBuilder
  9.    {
  10.       public override Type GetChildControlType(string tagName,
  11.          IDictionary attribs)
  12.       {
  13.          if (tagName.ToLower().EndsWith("candidate"))
  14.             return typeof(Candidate);
  15.          return null;
  16.       }
  17.       public override void AppendLiteralString(string s)
  18.       {
  19.          // Do nothing, to avoid embedded text being added to control
  20.       }
  21.    }
  22. }