Example #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //generate an image of length 5 for verification
     if (!IsPostBack)
     {
         ImageVerifierService.Service verifierService = new ImageVerifierService.Service();
         Session["verifyString"]     = verifierService.GetVerifierString("5");
         ImageVerifierImage.ImageUrl = "data:image/jpeg;base64," + Convert.ToBase64String(verifierService.GetImage(Session["verifyString"].ToString()));
     }
 }
Example #2
0
 //in case the image is too hard to read
 protected void ReloadVerification_Click(object sender, EventArgs e)
 {
     ImageVerifierService.Service verifierService = new ImageVerifierService.Service();
     Session["verifyString"]     = verifierService.GetVerifierString("8");
     ImageVerifierImage.ImageUrl = "data:image/jpeg;base64," + Convert.ToBase64String(verifierService.GetImage(Session["verifyString"].ToString()));
 }