Hello Everyone.
I am trying to create an HTML button that can use a C# server side delete function. since I don't know how many results I will have at the page, the control is created dynamically when the end user searches for current Messages:
There is a Class called ContactMessage and I'd like at each iteraion to allow the user to delete the current message through this function:
However, the event does not fire. any ideas?
I am trying to create an HTML button that can use a C# server side delete function. since I don't know how many results I will have at the page, the control is created dynamically when the end user searches for current Messages:
Code:
CmsContactUsContent += string.Format(" "<input type='image' value='delete' id='del{8}' runat='server' onClick='DeleteItem' img src='/MaromyDotNet/img/AdminIcons/note.png' style='width:16px;'/>" + "</div>" + "<div style='clear:both'></div></div>", message.ContactMessageId);
Code:
public void DeleteItem(object sender, EventArgs e) { int idToDelete = 41; BLLContactMessage.deleteMessageById(idToDelete); }
Comment