Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Persist Tool Part Values

  Asked By: Clem    Date: Jul 30    Category: Sharepoint    Views: 13342

Is there any way to have a tool part persist it's values from session to session?
I have tried overriding the SyncChanges method to no avail.
public override void SyncChanges()
{
this.EnsureChildControls();
SLIVersionHistoryView webPartToEdit = (SLIVersionHistoryView)this.WebPartToEdit;
if (webPartToEdit != null)
{
Comment.Text = wp1.HostString;
ddl.SelectedIndex = ddl.Items.IndexOf(ddl.Items.FindByValue(webPartToEdit.HostString));
}
}

This does not work.
Any ideas on the correct means to accomplish this?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Vladi Gubler     Answered On: Aug 02

Your code is not clear, what is this wp1 object? SyncChanged is used to load the property values  from the web part  to the tool  part, it is called when you open the toolpane the first time, if you need to postback while inside the toolpane, say reload some ddl as a response to another ddl you should rely on viewstate as you would in any ASP.NET app.

 
Didn't find what you were looking for? Find more on Persist Tool Part Values Or get search suggestion and latest updates.




Tagged: