Sitefinity - ViewState +控件的生命周期?
我构建了一个充当向导的自定义控件,并在其中包含其他控件。我使用空白的 ASP.NET Web 表单页面构建并测试了该控件,一切都运行良好。我将控件添加到 SiteFinity 中的页面,但似乎没有视图状态。没有保存或重新加载任何内容。该页面在页面源代码中有一个巨大的视图状态 blob,但是当我使用 fiddler 查看流量时,_viewstate 被发送为空。我构建的控件有一个更新面板。
这是怎么回事?我尝试改变生命周期中处理事情的位置,但没有任何帮助。我很确定这是一个视图状态问题。这是怎么回事?如何在不进行完整回发的情况下发布视图状态?
是的,我通过 sitefinity 在页面和控件上启用了视图状态,并为我的控件和所有子控件设置了启用视图状态。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我想您想知道 SiteFinity 一般讨论论坛 - 修复程序将在第一季度版本中发布,预计在 4 月 13 日这一周内
发布。今天 Ivan(来自 SiteFinity 支持)发布了:
祝你好运。
HTH-霍伊特
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:
Good luck.
HTH - Hoyt
更新:自 Sitefinity 4.1 起,此问题已得到解决。如有其他问题,请随时与我联系或在我们的论坛中留言。
您在实施控制时没有做错任何事情。您描述的问题是在 Sitefinity 页面中处理 ViewState 时出现的一个更广泛的问题,Sitefinity 社区中的其他人也报告了该问题。我们已经为此努力了一段时间,但事实证明修复起来并不像我们预期的那么简单。不幸的是,我目前无法提供解决方法。对不起。
不过,我可以向您保证,我们的高级开发人员正在努力解决这个问题。我们将尽一切努力为下一个第一季度版本提供修复程序。
此致,
斯拉沃
Sitefinity 团队@Telerik
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