TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
zafer ozer
NA
3
2.1k
c# eventhandler
Apr 6 2012 7:59 AM
hi, i need help on my lessons about eventhandler.
i will add imagebuttons into the cells of a table(asp:table):
ImageButton btnconfirm = new ImageButton();
btnconfirm.ImageUrl = "images/confirm.jpg";
btnconfirm.ID = bugun.AddDays(ekle).ToShortDateString();
and then i want to run the "btnconfirm_click" program, when user clicks a imagebutton.
btnconfirm.Click += new ImageClickEventHandler(this.btnconfirm_click);
i add the imagebuttons into the cells:
myCells.Controls.Add(btnconfirm);
then i add the cell to the row, and row to the table. when i run the program everything is allright, but when click the imagebuttons, they dont work.
where is the mistake, please help.
all the codes are these:
TableCell myCell= new TableCell();
ImageButton btnconfirm = new ImageButton();
btnconfirm.ImageUrl = "images/confirm.jpg";
btnconfirm.ID = bugun.AddDays(nmbr).ToShortDateString();
nmbr++;
btnconfirm.Click += new ImageClickEventHandler(this.btnconfirm_click);
myCells.Controls.Add(btnconfirm);
myCells.CssClass = "stil1";
myRows.Cells.Add(myCells);
Table1.Rows.Add(myRows);
Reply
Answers (
2
)
retriving datagridview record into textbox
how can i use imagelist to send cards randomly