开发者

Expose method as a property in user control

开发者 https://www.devze.com 2023-04-12 21:16 出处:网络
I created user control for textbox with autocompleteextender, and its working fine, but now i wanted to expose methods in user con开发者_开发知识库trol to aspx page as a one of the property in user co

I created user control for textbox with autocompleteextender, and its working fine, but now i wanted to expose methods in user con开发者_开发知识库trol to aspx page as a one of the property in user control,like in button control having onClientClick event. and forgive my English.


Try adding a property like this to your user control:

public string OnClientClick
{
    get { return Button1.OnClientClick; }
    set
    {
        Button1.OnClientClick = value;
    }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号