English 中文(简体)
Sitefinity - ViewState + Life Cycle for controls?
原标题:

I built a custom control that acts as a wizard and contains other controls within it. I built and tested the control using a blank asp.net webform page and everything was working perfectly. I add the control to a page in SiteFinity and it seems like there is no viewstate. Nothing is saved or reloaded. The page has a huge viewstate blob in page source but when I watch the traffic using fiddler, the _viewstate is sent as empty. The control i build has an update panel.

What s the deal? I ve tried to change where I handle things in the life cycle but nothing helps. I m pretty sure its a viewstate issue. What s going on? How can I get the viewstate to post without doing a full post back?

Yes, I enabled viewstate on the page and the control through sitefinity and I set viewstate enabled for my control and all sub controls.

最佳回答

UPDATE: This issue has been resolved as of Sitefinity 4.1. For further problems don t hesitate to contact me or write in our forums.

There s nothing wrong you are doing in the implementation of your control. The issue you describe is a broader problem with handling ViewState in Sitefinity pages, and other people in the Sitefinity community have also reported it. We have been working on it for a while, but it turned out to be not as trivial to fix as we expected. Unfortunately I cannot currently offer a workaround. I m sorry.

I can assure you, though, that our senior developers are working hard on resolving this. We ll do everything we can to ship a fix for our next Q1 release.

Sincerely,
Slavo
The Sitefinity Team @ Telerik

问题回答

I thought you d like to know that there s a long thread about this on the SiteFinity general discussion forum -- and the fix will be coming out with the Q1 release, expected during the week of April 13.

Today Ivan (from SiteFinity support) posted:

We have moved completely to the Virtual Path Provider, which means that Sitefinity pages will now behave exactly as any other ASP.NET page. Apart from the obvious functional benefits (exact lifecycle), this also brings about a significant performance improvement.

The fix will be made available in Sitefinity 2011 Q1, which is due on April 13th.

Once again, to you and all other affected, we are really sorry about this problem and that it took us so long to fix it.

Good luck.

HTH - Hoyt





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签