Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 5th, 2003, 03:23 AM
Friend of Wrox
 
Join Date: Aug 2003
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to life_s Ng Send a message via MSN to life_s Ng
Default page.isvalid... pls help

hi... i tried to set the page.IsValid value to false as the code below...

  if Session("validator")="0"
          lblRef.Text="Pls Search the history of visitor b4 proceed"
            page.isValid.value=False
          else
            Page.IsValid=True
  end if

and it show me error,"'value' is not a member of 'Boolean'." And "Property 'IsValid' is 'ReadOnly'" with this code

 if Session("validator")="0"
          lblRef.Text="Pls Search the history of visitor b4 proceed"
            page.isValid="False"
          else
            Page.IsValid=True
 end if

I dont wish to use validator for the page for certain reason... can any1 provided some ducumentation to set the page.IsValid condition...? thanks in advance...

Best Regards
life's Ng


 
Old November 5th, 2003, 09:45 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

I don't think you want to do it that way. Here is the way I learned it:

If Page.IsValid Then
            Try
                objConn.Open()
                dbComm.ExecuteNonQuery()
            Catch ex As Exception
                Response.Write(ex.Message)
                Response.End()
            Finally
                If objConn.State = ConnectionState.Open Then
                    objConn.Close()
                End If
            End Try

            Response.Write("Thank you for submitting news<br>")
            Response.Write("<a href=""review.aspx"">Review Changes</a>")
            Response.End()
        End If

 
Old November 5th, 2003, 10:59 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

If you want to Not validate your page's controls under certain conditions, you need to tell the validators not to validate. You should be able to set the validator(s) to "Enabled=False" so they don't validate. I haven't worked with validators much, so I can't provide much more than that suggestion.

Peter
----------------------------------------
Work smarter, not harder.
 
Old November 10th, 2003, 11:45 PM
Friend of Wrox
 
Join Date: Aug 2003
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to life_s Ng Send a message via MSN to life_s Ng
Default

yeah, thanks Peter~~~

Best Regards
life's Ng






Similar Threads
Thread Thread Starter Forum Replies Last Post
Help me pls BIndhu J2EE 0 June 17th, 2007 10:52 PM
pls auwalsaleh Crystal Reports 0 February 20th, 2006 10:18 AM
Help Pls fiero5220 Classic ASP Components 0 November 23rd, 2005 07:18 AM
Pls help me hoailing22 ASP.NET 1.0 and 1.1 Basics 3 May 24th, 2005 11:08 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.