Button click event in asp.net web sever control

N

nguyen nguyen

Hi all.
I have a web sever control that generate a verify image (CAPTCHA). It works, then i trying to add a button to this control. But when the button clicked, it's function wasn't performed. So, what's wrong ?
-- sorry, my english isn't good -- thanks --

Code:
........
public class Control_Captcha_v3 : WebControl
{
public static bool SButton_Clicked;
.....
protected override void CreateChildControls()
{
.......  SButton.Click += new   ImageClickEventHandler(SButton_Click);
.........
}
void SButton_Click(object sender, ImageClickEventArgs e)
{
SButton_Clicked = true;  <== it's alway false
}
...........


Submitted via EggHeadCafe - Software Developer Portal of Choice
Uploading & Downloading Files using ASP.NET
http://www.eggheadcafe.com/tutorials/aspnet/aa36fbdd-b4be-4ecc-b9cd-7cc6fc1980a4/uploading--downloading-f.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top