Author: crouchie2004 | Posted on: 9/27/2010 11:42:04 AM | Views : 406

Hi,
VS.NET 2010/ VB/ASP.NET
Have created a Captcha class which works fine however I am having the following issues:
For testing purposes I am posting the Captcha text in one of the contact textboxes.
1) Image1.ImageUrl = HttpContext.Current.Server.MapPath("FilenameHere.jpg")
Captcha image not visible in the image control
2) Behind the validation button as a test:
If txtValidationCode.Text = CaptchaImage.Text Then 'If the code typed in matches the image
 txtValidationCode.BackColor = Color.Green
Else
 txtValidationCode.BackColor = Color.Red
End If
However, when the button is pressed the page refreshes creating a new CaptchaImage/text to validate against so it's always going to be incorrect. How do I stop this image change when validating the text input & only redraw a new image if the input is incorrect?
Annoyance:
If at design ...

Go to the complete details ...