Skip to content
September 17, 2011 / kiranpatils

Disable save prompt when you have modified something from code

Challenge:

First of all apologize for not writing and sharing anything new since so long with every one of you! As I was busy doing something critical and as it was critical you should be sure that I’ve learnt a lot from it. So, it means that I’ve lot of stuff to share with you. Stay tuned!

Anyways, let’s come to the point While working on QuickItemSearch module (Basic feature of this module is to jump to an item which you provided in text box [You haven't tried it yet? I strongly recommend you to try it out!]), I faced one problem which I came across again on SDN forum : http://sdn.sitecore.net/forum//ShowPost.aspx?PostID=39755

Basically it prompts you “Save” prompt even if you have not changed anything.

The solution for this problem is simple. But figuring it out was not so simple! :) That’s why thought worth to document it here :

Solution:

To disable this when you are doing something programmatically, Including following line in your code file:

// To disable the page modified alert message
Context.ClientPage.Modified = false;

Happy Coding! :-)

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 292 other followers

%d bloggers like this: