How can I add my method instead of URL of a website, I can see another option as "ClientOnClickScript" but not sure how exactly I can do it tho, here's my code
public class MyUserControl: WebControl
{
private MenuItemTemplate _action;
protected override void CreateChildControls()
{
_action = new MenuItemTemplate
{
Text = "hahahahaha",
Description = "whatever",
ImageUrl = "/_layouts/images/abc.gif",
ClientOnClickNavigateUrl = "http://www.freehostingmarket.co.uk"
};
Controls.Add(_action);
}
private void myMethod(string linkToURL, string documentLibraryName)
{
//mYcode
}
}
I got these 4 options I think but not sure which one will work,
- ClientOnClickNavigateUrl
- ClientOnClickPostBackConfirmation
- ClientOnClickScript
- ClientOnClickUsingPostBackEvent
