WebFormHtml5DataList 2.0.0

dotnet add package WebFormHtml5DataList --version 2.0.0                
NuGet\Install-Package WebFormHtml5DataList -Version 2.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="WebFormHtml5DataList" Version="2.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add WebFormHtml5DataList --version 2.0.0                
#r "nuget: WebFormHtml5DataList, 2.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install WebFormHtml5DataList as a Cake Addin
#addin nuget:?package=WebFormHtml5DataList&version=2.0.0

// Install WebFormHtml5DataList as a Cake Tool
#tool nuget:?package=WebFormHtml5DataList&version=2.0.0                

WebFormHtml5DataList

Extender to Show HTML5 DataList to webform

Usage

  1. register DLL
    • sepcify at page start

    [!IMPORTANT] use correct namespace for proper Control.

    • Extender:WebFormHtml5DataList.Extender
    • Validator:WebFormHtml5DataList.Validator
    • WebFormHtml5DataList.GridView:WebFormHtml5DataList.GridView
    • MaskInput:WebFormHtml5DataList.MaskInput
    <%@ Register TagPrefix="CustomExtenderInPage" Namespace="WebFormHtml5DataList.Extender" Assembly= "WebFormHtml5DataList" %>
    
    • specify once at web.cofnig
    <system.web>
      <compilation debug="true" targetFramework="4.8" />
      <httpRuntime targetFramework="4.8" />
      <pages>
        ...
        <controls>
          <add tagPrefix="CustomExtenderInWebConfig" assembly="WebFormHtml5DataList" namespace="WebFormHtml5DataList.Extender"/>
        </controls>
      </pages>
    </system.web>
    
  2. DataListExtender
    1. add the extender and set TargetControlID to TextBox control
      <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
      <CustomExtenderInPage:HTML5DataListControlExtender ID="HTML5DataListControlExtenderFromDataSource" TargetControlID="TextBox1" runat="server">                
      </CustomExtenderInPage:HTML5DataListControlExtender>
      
    2. use it like ListControl
      • from datasource
      DataTable dt = new DataTable();
      dt.Columns.Add(new DataColumn("OptionText"));
      
      DataRow dr = dt.NewRow();
      dr["OptionText"] = "option1";
      dt.Rows.Add(dr);
      
      dr = dt.NewRow();
      dr["OptionText"] = "option2";
      dt.Rows.Add(dr);
      
      this.HTML5DataListControlExtenderFromDataSource.DataSource = dt;
      this.HTML5DataListControlExtenderFromDataSource.DataValueField = "OptionText";
      this.HTML5DataListControlExtenderFromDataSource.DataBind();
      
      • set items from bode behind
      this.HTML5DataListControlExtenderListItem.Items.Add(new ListItem("option1"));
      this.HTML5DataListControlExteanderListItem.Items.Add(new ListItem("option2"));
      
      • or set items in aspx page
      <CustomExtenderInWebConfig:HTML5DataListControlExtender ID="HTML5DataListControlExtenderListItemInPage" TargetControlID="TextBox3" runat="server">
        <asp:ListItem Value="123"></asp:ListItem>
        <asp:ListItem Value="456"></asp:ListItem>
      </CustomExtenderInWebConfig:HTML5DataListControlExtender>
      
    3. Validator
      • just sepcify the dependency
      <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
      <CustomValidatorInPage:CustomRequiredValidator ID="CV1_Required" runat="server" ControlToValidate="TextBox1" Display="Dynamic" ></CustomValidatorInPage:CustomRequiredValidator>
      <CustomValidatorInPage:CustomRegexValidator ID="CV1_Regex" runat="server" ControlToValidate="TextBox1" DependentValidatorControl="CV1_Required" RegexFormat="^\d{1,3}$" isplay="Dynamic"></CustomValidatorInPage:CustomRegexValidator>
      <CustomValidatorInPage:CustomDependepntValidator ID="CV1_CV" runat="server" ControlToValidate="TextBox1" DependentValidatorControl="CV1_Required, CV1_Regex" OnServerValidate="CV1_CV_ServerValidate" isplay="Dynamic"></CustomValidatorInPage:CustomDependepntValidator>
      
    4. MaskInput
      • must import jquery and jquery.mask[https://igorescobar.github.io/jQuery-Mask-Plugin/]
        <script src="js/jquery-3.5.1.min.js"></script>
        <script src="js/jquery.mask-1.4.1.min.js"></script>        
        
      • just specify format
        Decimal(5,0)
        <br />
        <CustomMaskInputInPage:DecimalTextBoxControl ID="DecimalTextBox1" runat="server" IntPart="5"></CustomMaskInputInPage:DecimalTextBoxControl>
        <br />
        ROCDate
        <br />
        <CustomMaskInputInPage:ROCDateTextBoxControl ID="ROCDateTextBox1" runat="server" ></CustomMaskInputInPage:ROCDateTextBoxControl>
        <br />
        ROCMonth
        <br />
        <CustomMaskInputInPage:ROCMonthTextBoxControl ID="ROCMonthTextBox1" runat="server" ></CustomMaskInputInPage:ROCMonthTextBoxControl>
        <br />
        English + digit only
        <br />
        <CustomMaskInputInPage:AnyCharTextBoxControl ID="AnyCharTextBox1" runat="server" UTF8="false" MaxLength="20" ></CustomMaskInputInPage:AnyCharTextBoxControl>        
        
    5. CustomEncodeBoundField
      • just use CustomEncodeBoundField to replace BoundField and set HeaderHtmlEncode=true
      <CustomGridViewInPage:CustomHeaderEncodeBoundField DataField="Val" HeaderHtmlEncode="false" HeaderText="two<br/>line"></CustomGridViewInPage:CustomHeaderEncodeBoundField>
      
Product Compatible and additional computed target framework versions.
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.8

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.0 188 10/17/2023
1.0.0 176 7/31/2023

1.Add CustomDepdencyValidotr 2.Add MaskInput 3.Add CustomHeaderEcnodeBoundField