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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. CUSTOM WEB SERVER CONTROL THAT VALIDATE ITSELF

CUSTOM WEB SERVER CONTROL THAT VALIDATE ITSELF

Scheduled Pinned Locked Moved Web Development
csharpjavascriptdesignsysadmin
4 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.
  • J Offline
    J Offline
    JohnyCoder
    wrote on last edited by
    #1

    hello everybody: i am new to VB.net I have to design a custom web server control which validates itself on client side and server-side. which means that i would not use a seperate custom validator for validation, but it should be a part of the custom control itself.and this validation would be done on clientside first, and incase javascript is off in browser then validation is done on server side. The description of the custom control is as follows: its a date control which has 3 dropdowns(dds).one for month, second for days and third for days.it has two properties isDOB(boolean) and getDate which returns the date in the format mm/dd/yyyy. one method setDate which takes the string inn the format mm/dd/yyyy.This will set date according to the input string. can somebody point me to the rite direction.any help would be deeply appreciated. Thanks Cheers! AB

    G 1 Reply Last reply
    0
    • J JohnyCoder

      hello everybody: i am new to VB.net I have to design a custom web server control which validates itself on client side and server-side. which means that i would not use a seperate custom validator for validation, but it should be a part of the custom control itself.and this validation would be done on clientside first, and incase javascript is off in browser then validation is done on server side. The description of the custom control is as follows: its a date control which has 3 dropdowns(dds).one for month, second for days and third for days.it has two properties isDOB(boolean) and getDate which returns the date in the format mm/dd/yyyy. one method setDate which takes the string inn the format mm/dd/yyyy.This will set date according to the input string. can somebody point me to the rite direction.any help would be deeply appreciated. Thanks Cheers! AB

      G Offline
      G Offline
      George L Jackson
      wrote on last edited by
      #2

      Sounds like you want to create a custom control with the controls that are supplied with ASP.NET. Among these controls will be your validation controls that can create validation code on both the client and server. There is a lot of information on the web that demonstrates how to do this via http://www.google.com/microsoft[^]

      J 1 Reply Last reply
      0
      • G George L Jackson

        Sounds like you want to create a custom control with the controls that are supplied with ASP.NET. Among these controls will be your validation controls that can create validation code on both the client and server. There is a lot of information on the web that demonstrates how to do this via http://www.google.com/microsoft[^]

        J Offline
        J Offline
        JohnyCoder
        wrote on last edited by
        #3

        Thanks for reply. I think u got it rite. but the question is how can use the validation controls as part of my custom sever control.i can write a seperate custom validator for my date control. but that won't serve my purpose. basically my date control would be self validating(on client and server side) control. now how can i use a custom validator inside my date control.i dont know. mostly on the web i m finding seperate validators. there is very less info about self validating controls. if u come acoss some thing like this. please do let me know. Thanks. Ab

        G 1 Reply Last reply
        0
        • J JohnyCoder

          Thanks for reply. I think u got it rite. but the question is how can use the validation controls as part of my custom sever control.i can write a seperate custom validator for my date control. but that won't serve my purpose. basically my date control would be self validating(on client and server side) control. now how can i use a custom validator inside my date control.i dont know. mostly on the web i m finding seperate validators. there is very less info about self validating controls. if u come acoss some thing like this. please do let me know. Thanks. Ab

          G Offline
          G Offline
          George L Jackson
          wrote on last edited by
          #4

          On the client-side, Microsoft uses javacript to handle validation. I believe you can call this code via yourown injected javascript. On the server-side, it is a little easier. I believe you can validate your control via code and set a property (the name eludes me for now) to indicate the success of the validation. This might get you started: http://www.15seconds.com/issue/020319.htm[^]

          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