Results 1 to 4 of 4

Thread: Custom Validation in asp.net

  1. #1
    Join Date
    Jan 2011
    Posts
    9

    Custom Validation in asp.net

    I am software developer in VB 6.0. Last week I got a job in MNC, but as a ASP.net developer. I really don’t know too much about ASP.net. In VB6.0 I normally developed desktop applications and for performing validations on I simply put all code related to validations in module. As module is easily accessible to all pages in the project I used that same code written in that module throughout the project. Is there any pace available in .Net where I can put my all code related to validations. I really want to know answer of this question as early as possible. Yesterday I got first project to develop and I still don’t know how to perform this basic thing.

  2. #2
    Join Date
    May 2009
    Posts
    637

    Re: Custom Validation in asp.net

    Actually I don’t think so that this kind of place is available in .net where you place the code which is accessible to whole page. As you know Asp.net is developed language compared to Vb6.0. I have alternative solution for you, which I hope help you lot while validating particular control. There are some pre- defied validation controls available on .Net. With the help of which you can easily validate lots of things like checking empty fields, checking particular range, validating particular expression without writing hell amount of code. You just need to change properties after dragging them on your form. Some common properties’ associated with each control are control to validate, type and operator.

  3. #3
    Join Date
    May 2009
    Posts
    529

    Re: Custom Validation in asp.net

    If you are not able to use validation controls as you wanted to do some validation which are out of range of pre-defined validation controls for that kind of validation you can first create an function in the source file under the script tag. Write functions just as same as your VB6.0 functions but don’t forget to make necessary changes in arguments. After writing this function you can easily called these function on variety of events of particular control like buttons click event and drop down list box’s selected index change event.

  4. #4
    Join Date
    May 2009
    Posts
    539

    Re: Custom Validation in asp.net

    I don’t think so that the script tag is ideal place to store information regarding validation as if you want to write hell amount of validation in script tag than it become extremely difficult to find bugs in that. There is another control available in ASP.net to put all such things into it. It is a custom validation control. Custom validation control allows you to write code related to tricky validations in it. AS custom validation control allows you to separate your actual functionality coding with validation. I am sure that this will solve your problem. To use that you just have to make necessary changes in its properties only.

Similar Threads

  1. Replies: 8
    Last Post: 06-05-2012, 12:21 PM
  2. How to use Attributes for Validation
    By Appaji in forum Software Development
    Replies: 5
    Last Post: 11-02-2010, 03:24 AM
  3. CSS Validation problem
    By Camdean in forum Software Development
    Replies: 5
    Last Post: 29-12-2009, 06:47 PM
  4. validation help
    By puk284 in forum Software Development
    Replies: 1
    Last Post: 26-09-2009, 09:00 AM
  5. WGA validation crack
    By migons in forum Operating Systems
    Replies: 4
    Last Post: 19-08-2009, 07:30 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,310,489.40543 seconds with 17 queries