View Single Post
  #2 (permalink)  
Old June 21st, 2004, 05:58 AM
happygv happygv is offline
Friend of Wrox
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post


You can use something like this to achieve that.

Dim testVal, TestValErrMsg

If Request.form("Submit")<>"" then
    If len(trim(testVal))=0 then
        TestValErrMsg = "Cannot be Empty String.Please re-enter the value"
     ''' Process the value, may be store that in db and then,
     ''' Redirect to another page, that says, the values are stored.
     ''' or say that values are processed in the same page at the top
     ''' and clean up the values of all the form variables, without redirecting to another page.
     End If
End If


<Form action="" method="post">
    <input type="text" name="testVal" value="<%=testVal%>">
    If len(trim(TestValErrMsg))>0 then Response.write TestValErrMsg
    <input type="Submit" name="Submit" value="Submit">
Hope that helps.

-Vijay G
Strive for Perfection
Reply With Quote