Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Custom Validator

    I added a custom validator and added some code to its ServerValidate event
    but when a data which is not accepted is entered, it gives the warning as it
    should do, but doesn't stop the execution of Click event of my submit
    button. RequiredFieldValidator for example, gives the error when the field
    is empty and does not let the code continue execution. So do I miss
    something in definition of CustomValidator?

    Serdar KALAYCI

    --



    Serdar Kalaycý Guest

  2. Similar Questions and Discussions

    1. validator qs.(1.5)
      Hi, I have a field in the form for which I have to check that it should have some specific string e.g 1234. I tried using below it works if I...
    2. Adding Validator Control at runtime in a Custom Control
      Hi Wim, How do we link the TextBox to this validator control class in runtime ? Could you please tell. Thanks _ Muds. Wim Hollebrandse...
    3. custom validator and ControlToValidate in a composite control...
      The ControlToValidate property is wrecking my head. I have a custom composite server control defined as follows: internal abstract class...
    4. Validator and custom control question
      Hello, I have a custom control that overrides the base class render method. From the Render method I got a call to the follwing method in the...
    5. Custom Range Validator how-to?
      Would appreciate some help, as I am blanking on the best way to do this. I want to have a Range Validator for a textbox where the Minimum and...
  3. #2

    Default Re: Custom Validator

    Ok, I understand that I have to use client side validation with server side
    validation. But I cannot access server side components in my client side
    script (eg. TextBox1.Text) and because my validation relies on more than one
    component, it's also impossible to get the values from parameters. What must
    I do?

    Serdar Kalayci
    "Teemu Keiski" <joteke@aspalliance.com> wrote in message
    news:u4ZBKgIRDHA.2320@TK2MSFTNGP12.phx.gbl...
    > Hi,
    >
    > take a look at this article:
    >
    > ASP.NET Validation In Depth
    >
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html[/url]
    /aspplusvalid.asp
    >
    > It will explain you all the details about validation, including
    > CustomValidator.
    >
    > --
    > Teemu Keiski
    > MCP,Designer/Developer
    > Mansoft tietotekniikka Oy
    > [url]http://www.mansoft.fi[/url]
    >
    > ASP.NET Forums Moderator, [url]www.asp.net[/url]
    > AspAlliance Columnist, [url]www.aspalliance.com[/url]
    >
    > Email:
    > [email]joteke@aspalliance.com[/email]
    >
    >
    > "Serdar Kalaycý" <serdarkalayci@unisec.com.tr> kirjoitti viestissä
    > news:e9OiiQIRDHA.3796@tk2msftngp13.phx.gbl...
    > > I added a custom validator and added some code to its ServerValidate
    event
    > > but when a data which is not accepted is entered, it gives the warning
    as
    > it
    > > should do, but doesn't stop the execution of Click event of my submit
    > > button. RequiredFieldValidator for example, gives the error when the
    field
    > > is empty and does not let the code continue execution. So do I miss
    > > something in definition of CustomValidator?
    > >
    > > Serdar KALAYCI
    > >
    > > --
    > >
    > >
    > >
    >
    >

    Serdar Kalaycý Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139