Join us this Friday for AI in Action at the Virtual Happy Hour! This free virtual event is open to all—enroll now on Academy and don’t miss out.

 

Using right frame from EditTree

Vote:
 

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?

#28747
Mar 20, 2009 11:25
Vote:
 
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?
#28828
Mar 24, 2009 9:42
Vote:
 
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)
#28844
Mar 25, 2009 0:33
Vote:
 

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 :)

#28851
Mar 25, 2009 8:28
Vote:
 
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...
#28860
Mar 25, 2009 9:21
Vote:
 

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

#34591
Nov 10, 2009 13:13
Vote:
 

I found an alternative to this:

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

this works :)

 

#34615
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.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.