开发者

Expose div as property

开发者 https://www.devze.com 2022-12-13 11:41 出处:网络
I\'m trying to figure out how I can expose a div in my .ascx that has a runat=\"serv开发者_开发技巧er\" and id through a property in my code-behind so that I can manipulate it through whatever .aspx p

I'm trying to figure out how I can expose a div in my .ascx that has a runat="serv开发者_开发技巧er" and id through a property in my code-behind so that I can manipulate it through whatever .aspx page is utilizing my control. I wasn't sure what type to use for the property.


So you can see your <div id="mydiv" runat="server" /> in your ascx's code behind? What type does it have there?

TYpically, those things would be surfaced as System.Web.UI.HtmlControls.GenericHtmlControl in your code.

0

精彩评论

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