In IE8 it will not fire, in everything else IE9, IE10, Chrome and Firefox there is no problem.
2. problem
There is genereted more the one, and first time you click on it nothing hapens, but then you can click on nomatter witch one and the popup comes, and if you closes the popup and click on an other it comes first time.
Is there any one ho have any suggestions for thes to problems.
Member
9 Points
53 Posts
Problems with LinkButton generated from code behind
Aug 21, 2013 04:46 PM|Bendix BP Tech|LINK
Hey
I have a problem with LinkButtons that I am generating from code behind.
LinkButton lbt = new LinkButton();
lbt.Text = "<table><tr><td style=\"width:268px;\"><h4 style=\"color:Black;margin;\">" + DbHandler.getInstance().getUserName(m.from) +
"</h4><h5 style=\"margin:0;color: Gray\">" + date +
"</h5></td><td><h3 style=\"margin:0;color: Black;\">" + m.subject + "</h3></td></tr></table>";
lbt.CommandArgument = m.id + "|Send|Rediger";
lbt.Command += new CommandEventHandler(lbtMessage_Command);
1. problem
In IE8 it will not fire, in everything else IE9, IE10, Chrome and Firefox there is no problem.
2. problem
There is genereted more the one, and first time you click on it nothing hapens, but then you can click on nomatter witch one and the popup comes, and if you closes the popup and click on an other it comes first time.
Is there any one ho have any suggestions for thes to problems.
Star
13450 Points
2764 Posts
Re: Problems with LinkButton generated from code behind
Aug 21, 2013 05:06 PM|Nasser Malik|LINK
Dont put special characters spaces in ID .. Remove pipe | from ID. Also your ID should start from Character not digit.. Change it to
Make sure you define CommandEventHandler
and you have to recreate on page_load on postbacks
http://www.codeproject.com/Articles/8114/Dynamically-Created-Controls-in-ASP-NET
Skype: maleknasser1
LinkedIn: https://www.linkedin.com/in/maliknasser