Results 1 to 3 of 3

Thread: create RangeValidator at Runtime [RESOLVED]

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member johnweidauer's Avatar
    Join Date
    Sep 2002
    Location
    SLC, UT
    Posts
    314

    create RangeValidator at Runtime [RESOLVED]

    I am dynamically creating my form because the information I want in this form is controlled by a database and therefore needs to be dynamic. I am creating a RangeValidator:
    Code:
                    QtyVal = New RangeValidator()
                    QtyVal.ID = CStr("ValQty" & DBReader("ProdSKU"))
                    QtyVal.Attributes.Add("Type","Integer")
                    QtyVal.ControlToValidate = CStr(NewTxtBx.ID)
                    QtyVal.MaximumValue = "30"
                    QtyVal.MinimumValue = "1"
                    QtyVal.Attributes.Add("runat","server")
                    QtyVal.Text = "<BR>Must be between 1 and 30"
                    QtyVal.Attributes.Add("display","static")
    My problem is that it validates the values as a string (i.e. User enter 1-3 everything ok, 4 and up and validation dies). Any ideas?
    Last edited by johnweidauer; May 20th, 2004 at 01:38 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width