Hi all, here's my problem, I have a dynamic form that contains a profile, all the textboxes in the form are enabled = false. When I click on a dynamic hyperlink I pass a value that puts all the textboxes enabled = true and I create a Button, I want to call a function with this button that will do a sql request. But my problem is, the function wont start...
Here's some code :
if (passe == false)
{
HyperLink btn = new HyperLink();
btn.Target = "main";
btn.Text = "Modifier mon profil";
btn.NavigateUrl = "profile.aspx?passe=true";
tcell.Controls.Add(btn);
}
else
{
Button btn = new Button();
btn.Text = "valider";
btn.Click += new System.EventHandler(this.btnClick);
tcell.Controls.Add(btn);
}
And then I have the function...
private void btnClick(Object sender, EventArgs e)
{
Response.Write("I clicked it, wont work!!"
}
What I did wrong?
thx!
Mc
Here's some code :
if (passe == false)
{
HyperLink btn = new HyperLink();
btn.Target = "main";
btn.Text = "Modifier mon profil";
btn.NavigateUrl = "profile.aspx?passe=true";
tcell.Controls.Add(btn);
}
else
{
Button btn = new Button();
btn.Text = "valider";
btn.Click += new System.EventHandler(this.btnClick);
tcell.Controls.Add(btn);
}
And then I have the function...
private void btnClick(Object sender, EventArgs e)
{
Response.Write("I clicked it, wont work!!"
}
What I did wrong?
thx!
Mc