+ Reply to Thread
Results 1 to 4 of 4

Implement Validation in our Project

  1. #1
    joe41
    Guest

    Implement Validation in our Project

    Hello friends,

    How can i implement the validation in our project, means if validation == true then the next page will open else shows an error message.
    please reply.

    Thanks.

  2. #2
    Webtekr
    Guest

    Re: Implement Validation in our Project

    Hi,

    You can implement page validations but,

    Page.Validate is not the same as Page.IsValid (obviously)

    I've never found a reason to call Page.Validate myself (not that there probably aren't some good ones). Here is a contrived example from the help files.

    Sub Page_Load
    If Not IsPostBack
    ' Validate initially to force the asterisks
    ' to appear before the first roundtrip.
    Validate()
    End If
    End Sub
    I always do a check of Page.IsValid first thing in my button click events.

    If Not Page.IsValid Then Return, if (for whatever reason) your client-side javascript didn't prevent the page from posting in the first place then the server validate
    events will run.
    You use Page.IsValid to make sure that the server validation didn't catch anything.

  3. #3
    joe41
    Guest

    Re: Implement Validation in our Project

    Thats very much fine my friend but my need is that i have 2 pages and want to valiadate

    page1 by user name and password.....if the password is correct only then one should

    reach on the next page.

    Thanks very much for this information and please suggest me how can i do that?

  4. #4
    Forum Administrator ExlGuru's Avatar
    Join Date
    03-17-2009
    Location
    India
    MS-Off Ver
    2003,2007
    Posts
    222

    Re: Implement Validation in our Project

    Hi joe,

    Here is the code might help you:

    Option Explicit
    Please Login or Register  to view this content.
    ExlGuru

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1