Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. MaskedEditExtender and MaskedEditValidator

MaskedEditExtender and MaskedEditValidator

Scheduled Pinned Locked Moved ASP.NET
questionsysadmin
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    paper67
    wrote on last edited by
    #1

    Hi, I have the following code :

    <form id="form1" runat="server">
        <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" />
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <asp:TextBox ID="TextBox1" runat="server" Width="70px" ValidationGroup="ValGrp"/>
                <asp:MaskedEditExtender ID="TextBox1MaskedEditExt" runat="server" TargetControlID="TextBox1"
                    Mask="99/99/9999" MaskType="Date" UserDateFormat="DayMonthYear" />
                <asp:MaskedEditValidator ID="TextBox1MaskedEditVal" runat="server" ControlExtender="TextBox1MaskedEditExt"  
                    ControlToValidate="TextBox1" IsValidEmpty="False" EnableClientScript="False" ValidationGroup="ValGrp"
                    EmptyValueMessage="\*" InvalidValueMessage="dd/mm/jjjj" /><br />
                <asp:Button ID="SubmitButton" runat="server" Text="Submit" ValidationGroup="ValGrp" />
            </ContentTemplate>    
        </asp:UpdatePanel>    
    </form>
    

    TextBox1 is a required date field. On submitting the code throws me a client exception saying : 'className' is null or not an object What is wrong here ?

    S 1 Reply Last reply
    0
    • P paper67

      Hi, I have the following code :

      <form id="form1" runat="server">
          <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" />
          <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
              <ContentTemplate>
                  <asp:TextBox ID="TextBox1" runat="server" Width="70px" ValidationGroup="ValGrp"/>
                  <asp:MaskedEditExtender ID="TextBox1MaskedEditExt" runat="server" TargetControlID="TextBox1"
                      Mask="99/99/9999" MaskType="Date" UserDateFormat="DayMonthYear" />
                  <asp:MaskedEditValidator ID="TextBox1MaskedEditVal" runat="server" ControlExtender="TextBox1MaskedEditExt"  
                      ControlToValidate="TextBox1" IsValidEmpty="False" EnableClientScript="False" ValidationGroup="ValGrp"
                      EmptyValueMessage="\*" InvalidValueMessage="dd/mm/jjjj" /><br />
                  <asp:Button ID="SubmitButton" runat="server" Text="Submit" ValidationGroup="ValGrp" />
              </ContentTemplate>    
          </asp:UpdatePanel>    
      </form>
      

      TextBox1 is a required date field. On submitting the code throws me a client exception saying : 'className' is null or not an object What is wrong here ?

      S Offline
      S Offline
      Sandeep Mewara
      wrote on last edited by
      #2

      Do you have any Javascript code too associated with the page? 'className' is a javascript attribute and the error sounds like client side. Check if you have assigned/missed any css.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups