.net usercontrols
I need to make a div a开发者_运维知识库ct like an .net button. So i figured there are two ways of doing this
1)Use onclick in the div properties and have javascript click a .net button which isn't visible to user 2) Make a user control that fires an event when it is clicked. (It would in essence take method 1 and just wrap that functionality in a user control. But when developing no one would know the difference. I am stuck at, which method to chose (i feel method 2 is cleaner). I also need to bind data to this div I would like to do that on pageLoad. Pass in an object and have page load do it for me. The problem is I am calling this user control in a repeater, and do not want to do the databinding in the code-behind.It looks like I can just developer a custom server control to fit my needs.
精彩评论