How To Make A Simple Captcha Control In ASP.NET

this is my first tutorial on asp.net by the way i am a beginner , i dont think this is something advanced but hope this is useful . i am gonna teach you how to make a simple captcha control without using any HTTP HANDLERS and you can easily add it to your website . all you need is a aspx page so create one ,, the aspx page will have image/jpg . i am using system.drawing namespace to create dynamic images , system will be generating two random numbers and it will store the results of the two numbers into a session variable .

for instance :

a = 2 + 6 (2 and 6 are two random numbers)

session("Answer") = 8

code for captcha.aspx