Sunday, 15 January 2012

Linkbutton inside ASP.NET custom composite control template losing its ViewState -



Linkbutton inside ASP.NET custom composite control template losing its ViewState -

i've made asp.net custom composite command has itemtemplate children. it's based on rssfeed (http://msdn.microsoft.com/en-us/library/aa479322.aspx) example. template has linkbutton binds commandname , commandargument properties in datasource. on postback commandname , commandargument empty, , text of linkbutton disappears after rendering on postback. leads me believe linkbutton losing viewstate. custom composite command overrides createchildcontrols , creates children. template instantiated in contentplaceholder, viewstate enabled. control, represents item inheriting generic html command , using "div" tag. has viewstate enabled. when databinding composite command trackviewstate called. have thought why linkbutton losing viewstate? thanks

i've found error i've made. when creating children items adding them parent. databinding them, problem parent not added command hierarchy , viewstate tracking never turned on.

asp.net templates control viewstate composite

No comments:

Post a Comment