English 中文(简体)
现场记录 后退方面的实地错误(未能达到负荷观察状态)
原标题:Sitecore Custom Field error on postback (Failed to load viewstate)

I have a custom field with a TextBox, a Button, a ListBox, and another Button. When I click one of the buttons, I get the following error (there is currently no logic or data populating the textbox or listbox, I m just trying to wire things up):

"Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request."

我也增加了我对洛德的每一个控制。 任何建议?

问题回答

看看伙伴关系。 净页寿命周期。 我认为,当控制树从产生观察效果时起发生变化时,就会出现这一错误,因此它不再与控制相匹配,即不能从观察状态中恢复控制。

洛德的管制工作太晚,无法达到<><>>>> > > > > 。 也许你只是需要把这一点转向仁爱。

见其他答复:。 在伙伴关系中增加动态控制。 NET在1.1和2.0之间是否有差别?

我曾经历过类似的问题。 你们是否需要这种观点? 否则,通过在您的<代码><%@ page %>的声明中设置<编码>>enableviewstate=“false>。





相关问题
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!

热门标签