Using right frame from EditTree


I have created a plugin in PlugInArea.EditTree where I wish to list a number of tasks. Clicking one of the tasks should open a corresponding settings page in the right frame of edit mode. What is the correct way to do this? Before I have used constructs like:

<a href="#" onclick="window.parent.commandEvent(window, new window.parent.commandDescriptor('','<%=ResolveUrl("~/path/to/settingspage.axps")%>',''));">Link<a>

But is this really the way to go?

Mar 20, 2009 11:25
No suggestions? I have now run into a problem. I get a viewstate encryption exception, and according to various forum posts on the Internet this is because of a duplicate aspnet form. The page i load above has it's own form, and I guess the Edit mode masterpage also contains a form. So I need an other way of using the masterpage to load my settings page?
Mar 24, 2009 9:42
Why use viewstate on that code? make a placeholder around it and turn of viewstate. That way it dont write to viewstate and the problem will go away Wink (hopefully)
Mar 25, 2009 0:33

Good suggestion! I tried to set EnableViewState=false on the form element of the "settingspage.aspx" loaded in the right frame, and also on a new placeholder in the form. Neither worked. As soon as the form posts back i get:

Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

And I don't have a web farm, it's on my developer PC :)

Mar 25, 2009 8:28
Solved it. Apparently the form Action attribute could not be empty (=current page), I had to specifically set it to the aspx name. I suppose the Iframe structure of the edit interface confuses aspnet, or something...
Mar 25, 2009 9:21

Solution which you gave works only for the first time click. next time when i cleck there is no change.

can you explain in detail about the solution for this problem.

Thanks in advance

Nov 10, 2009 13:13

I found an alternative to this:

<a href="~/path/to/desiredPage.axps" target="EditPanel">LinkText</a>

this works :)


Nov 10, 2009 15:19
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.