How to edit the navigation settings using sandboxed code?

Hello. I need to create web-provisioned event that changes current navigation settings to "Structural Navigation: Display the current site, the navigation items below the current site, and the current site's siblings".
Currently I am using following code which does not work (I used SharePont manager to get the xml for _webnavigationsettings).
public const string Webnavigationsettings = "_webnavigationsettings";
public const string GlobalNavigationIncludeTypes = "__GlobalNavigationIncludeTypes";
protected void Button1_Click(object sender, EventArgs e)
SPWeb web = SPContext.Current.Web;
const string webnavigationsettings = @"<?xml version='1.0' encoding='utf-16' standalone='yes'?>
<WebNavigationSettings Version='1.1'>
<SiteMapProviderSettings>
<SwitchableSiteMapProviderSettings Name='CurrentNavigationSwitchableProvider' TargetProviderName='CurrentNavigation' />
<TaxonomySiteMapProviderSettings Name='CurrentNavigationTaxonomyProvider' Disabled='True' />
<SwitchableSiteMapProviderSettings Name='GlobalNavigationSwitchableProvider' UseParentSiteMap='True' />
<TaxonomySiteMapProviderSettings Name='GlobalNavigationTaxonomyProvider' UseParentSiteMap='True' />
</SiteMapProviderSettings>
<NewPageSettings AddNewPagesToNavigation='True' CreateFriendlyUrlsForNewPages='True' />
</WebNavigationSettings>";
if (web.GetProperty(Webnavigationsettings) != null)
web.DeleteProperty(Webnavigationsettings);
web.AddProperty(Webnavigationsettings, webnavigationsettings);
if (web.GetProperty(GlobalNavigationIncludeTypes) != null)
web.DeleteProperty(GlobalNavigationIncludeTypes);
web.AddProperty(GlobalNavigationIncludeTypes, 3);
web.Update();
I can do this with javascript but what about sandboxed c#?  

Hi,
 Please follow the below links which may help you to do accomplish your work
http://francoisverbeeck.wordpress.com/2013/01/15/sharepoint-tip-of-the-day-programmatically-ro/ 
http://discoveringsharepoint.wordpress.com/2013/03/19/programmatically-set-navigation-settings-in-sharepoint-2013/
Sekar - Our life is short, so help others to grow
Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
you see a reply being an answer to the question of the thread, click "Mark As Answer

Similar Messages

  • How do I edit the default settings to always embed fonts?

    How do I edit the default settings in Acrobat Pro XI to always embed fonts?

    Do not use the Std job settings, but use the Press or Print settings. You can also edit the properties of the Job Settings (best done in Distiller) to not exclude any fonts and embed all as subset fonts. Be sure to check the option to continue if embedding is not possible or your creation will fail if you used a font that is not licensed for embedding (Acrobat will only embed fonts that are legally licensed for embedding -- most are, but not all).
    If you edit the Std, you will need to save to a new name. You might use MyStd or such. Then go to the Start>Printers and edit the properties of the Adobe PDF printer to make that settings file the default. If you use PDF Maker, you will have to change the PDF Maker preferences also (PDF Maker seems to use the last selection, not the default in the printer). Hopefully that is clear enough.

  • How to analyze the navigation flow in Oracle Portal, Number of unique users, downloads and other estastisticas of use of the Portal and Documents

    Dear
    Experts, I have a very exciting demand, the board of a customer.
    I need to create an analytical application on Oracle Portal, UCM, Spaces, WebCenter, to inform me which quantitatively pages, url and documents are accessed.
    How to analyze the navigation flow in Oracle Portal, Number of unique users, downloads and other estastisticas of use of the Portal and Documents?
    I thought I'd create a ods with the data of Content Tracker and Google Analytics, and model the analysis through the BIEE.
    I ask, what is the standard solution that is used in these cases?
    Thank you
    Miki

    Dear
    Experts, I have a very exciting demand, the board of a customer.
    I need to create an analytical application on Oracle Portal, UCM, Spaces, WebCenter, to inform me which quantitatively pages, url and documents are accessed.
    How to analyze the navigation flow in Oracle Portal, Number of unique users, downloads and other estastisticas of use of the Portal and Documents?
    I thought I'd create a ods with the data of Content Tracker and Google Analytics, and model the analysis through the BIEE.
    I ask, what is the standard solution that is used in these cases?
    Thank you
    Miki

  • I get the following message when opening itunes: "the registry settings used by the itunes drivers for importing and burning cd's and dvd's are missing" how do I repair? downloading latest virsion of itunes doesn't work

    I get the following message when opening itunes: "the registry settings used by the itunes drivers for importing and burning cd's and dvd's are missing. Downloading the latest version does no fix the problem

    I'd start with the following document, with one modification. At step 12 after typing GEARAspiWDM press the Enter/Return key once prior to clicking OK. (Pressing Return adds a carriage return in the field and is important.)
    iTunes for Windows: "Registry settings" warning when opening iTunes

  • I have windows 7 and when i start up i tunes i get a message..."The registry settings used by the i Tunes drivers for importing and burning CD's and DVD's are missing. This can happen as a result of installing other CD burning software. Please reinstall i

    when i start up i tunes i get the message,"The registry settings used by the i Tunes drivers for importing and burning CD's and DVD's are missing. This can happen as a result of installing other CD burning software. Please reinstall i Tunes." I tried reinstalling and still get the same message. when I ran the i Tunes diagnostics is says that the high and low filters are missing.
    when i was having trouble with my optical drive(before Dell sent me a new one) the dell tech support representative had me delete some reg. files to try to fix the problem. I was told this would not affect the new drive when i install it or any of my existing programs. here is what he had me do....
    Agent (CLKsmb_RyanJose_224427): "Click on Start
    Click on Run
    Type in REGEDIT
    Click on OK
    Click on the plus sign next to HKEY_LOCAL_MACHINE
    Click on the plus sign next to SYSTEM
    Click on the plus sign next to CurrentControlSet
    Click on the plus sign next to Control"
    Click on the plus sign next to Class
    Click on the plus sign next to {4D36E965-E325-11CE-BFC1-08002BE10318}
    On the right pane, click to highlight Upperfilters
    Right click on Upperfilters
    Click on Delete
    Click on OK
    On the right pane, click t
    o highlight Lowerfilters
    Right click on Lowerfilters
    Click on Delete
    Click on OK
    Right click on Silent Install
    Click on Delete
    Click on OK
    Close the Registry Editor
    Reboot the computer
    how can i get this message box to stop poping up every time i open i tunes? otherwise i tunes works fine. it still rips cd's. I just keep getting this message even after reinstalling i tines.
    thanks,
    chris

    Refer to this article to fix:
    iTunes for Windows: "Registry settings" warning when opening iTunes
    http://support.apple.com/kb/TS3299

  • I recently had some 8mm film transferred to DVD. I am trying to edit the film clips using Premier Elements 4.0.  Some of the film clips copy into the project but others don't. I tried copying the VOB filed onto my hard drive and then changing the file ext

    I recently had some 8mm film transferred to DVD. I am trying to edit the film clips using Premier Elements 4.0. so I can reburn the films on a single BluRay disc. Some of the film clips copy into the project but others don't. I tried copying the VOB filed onto my hard drive and then changing the file extensions on the VOB files to MPEG but this was no help. Some of the VOB files contain numerous film clips but my software does not appear to be able to recognize them as such. I need to know if replacing my old Premier Elements with the new Version 13 would solve this problem or not. Any advice would be greatly appreciated!
    Bob

    Bob
    What do you have now.....
    What computer operating system do you have?
    We can go into the finer points of source and your intentions, but for now it would appear that you are using SD 4:3 source media to get to a HD 16:9 result. Lots to discuss in this regard.
    What was given to you on the DVD disc? DVD-VIDEO 4:3 or something else?
    If DVD-VIDEO on DVD disc, you should expect to find on the disc a folder named VIDEO_TS. That is your target for your video files.
    If you were given a DVD-VIDEO on DVD disc, then all you want from it are the video files, specifically
    VTS_01_1.VOB, VTS_01_2.VOB, and so on through that series until possibly getting to
    VTS_02_1.VOB, and so on. How many files you have beyond the VTS_01_1.VOB file will depend on the size of the DVD-VIDEO.
    Does the above scenario apply to you?
    The alternative might be someone giving a DVD disc (data disc) which contains just the VTS files mentioned which were copied from
    the VIDEO_TS Folder. So, you do not get the whole VIDEO_TS Folder, just the essential video files. Does this scenario apply to you.
    I see no need to replace your Premiere Elements 4 with a later version unless you have a huge project and need a later version that will be a 64 bit application running specifically on Windows 7, 8, or 8.1 64 bit computer.
    Consider...Premiere Elements 4 and if you have DVD-VIDEO on DVD....
    1. Place the DVD disc in the burner tray
    2. Open Premiere Elements 4 and set the project preset for NTSC DV Standard (assuming you are working in a NTSC setup)
    3. Go to
    Get Media
    "DVD, Digital Camera, Mobile Phone, Hard Drive Camcorder, Card Reader"
    "Adobe Premiere Elements - Media Downloader" and its Advanced dialog.
    Set the Source in the latter dialog for the drive which has your DVD disc inserted in its tray
    You should see your VTS_01_1.VOB thumbnail in the "Adobe Premiere Elements - Media Downloader" Advanced dialog.
    With this VOB selected, click on Get Media to get the file from there into the project.
    Should work fine.
    Complications may be involved if the people who processed your footage gave you something other what is described above.
    Please review and consider, and then we can plan our project strategy accordingly.
    Thank you.
    ATR

  • I received the following message when iTunes launches: "The registry settings used by the iTunes drivers for importing and burning CD's or DVD's are missing.  This can happen as a result of installing other CD burning softwarre.  Please reinstall iTunes"

    Everytime I connect my iPod Touch (4th Gen) to my laptop, running Win 7 (64 bit) I get the message "The registry settings used by the iTunes drivers for importing and burning CDs and DVDs are missing.  This can happen as a result of installing other CD burning software.  Please reinstall iTunes"  I have reinstalled iTunes several times and it has not fixed the issue.  I am running ver 10.2.2.12 of iTunes.  I HAVE NOT installed any other burning software to my laptop either.  I haven't tried uninstalling iTunes and then re-installing it yet.  Would that perhaps fix the problem?  I've read that many users have had issues with the new version of the software and I was wondering if that might be causing my issue.  I'd like to point out that iTunes seems to work after getting rid of the message, but I haven't tried to burn any CDs or put music from a CD to my laptop.  Any ideas on how to get rid of the annoying message?
    I also am having trouble hooking up with our other computers using  Homegroup.  I noticed quite a lot of people are having the same issue and hopefully they come up with a fix for that soon.
    Thanks in advance.

    I'd start with the following document, with one modification. At step 12 after typing GEARAspiWDM press the Enter/Return key once prior to clicking OK. (Pressing Return adds a carriage return in the field and is important.)
    iTunes for Windows: "Registry settings" warning when opening iTunes
    If you're still getting the error message (especially when you plug in the Touch), I'd check for a device filter confusion on the PC. (They can affect the connection of USB devices to a PC, as well as burning and importing CDs.) For that one, see:
    iTunes for Windows: Troubleshooting CD issues caused by device filters

  • How to edit the existing data in the XML file from java programming.

    Hi all
    i am able to create XML file with the sample data as below from java programming.
    i need sample code on how to edit the existing data in the XML file?
    for example
    <?xml version="1.0"?>
       <mydata>
               <data1>
                         <key1>467</key1>
                        <name1>Paul</name1>
                        <id1>123</id1>
              </data1>
              <data2>
                         <key2>467</key2>
                        <name2>Paul</name2>
                        <id2>123</id2>
              </data2>
        </mydata>
    i am able to insert the data in the XML.
    now i need sample code on how to modify the data in the above XML file from the java programming for only key2,name2,id2 tags only. the remaining tags data in the XML file i want to keep same data except for key2,name2,id2 which are i want to modify from java code
    Regards
    Sunil
    [points will be always rewardable]

    hi
    u need a parser or validate the xml file for to read the xml file from java coding u need for this
    xml4j.jar u can download this file  from here
    http://www.alphaworks.ibm.com/tech/xml4j
    or we can use the SAX(simple API for XML)
    some sample applications for this
    http://www.java-tips.org/java-se-tips/javax.xml.parsers/how-to-read-xml-file-in-java.html
    http://www.developertutorials.com/tutorials/java/read-xml-file-in-java-050611/page1.html
    http://www.xml-training-guide.com/e-xml44.html
    let me know u need any other info
    bvr

  • How to edit the find-and-replace dialog in Dreamweaver 8

    For over 13 years I have been a happy user of Macromedia Dreamweaver 8. And I still see no reason to use any other program for editting PHP.
    However, 1 thing has been bugging me for years. In the find-and-replace dialog there is a select "Find in". The options are in a dropdown.
    I want this select to be a multiselector (not in functionality, but just so I don't need to click to get the dropdown, but just one click to select).
    I read in the help at 'Customizing the appearance of dialog boxes' at point 4
    On your disk, find the appropriate HTM file in the Configuration/Objects, Configuration/ Commands, or Configuration/Behaviors folder.
    I've been searching but can not find the code for that dialog, althou it should be easy. Also did a search for that 'save' image, because once I find that, I can find this form, but its not in the macromedia folder.
    how to edit the find-and-replace dialog in Dreamweaver 8?

    It's looks less like an image and more like a form drop list to me.
    Yes its a dropdown list. But to find the code for that select I tried to find the htm file that code is on by searching for the save-image which is also on that page (next to the yellow folder). I did a search on all folders in c:/programfiles/macromedia and that image is not in there. If I could find the image name, I could search the code for that and should find that htm (or javascript) which is outputting it, then the select must be near to that.
    I also searched the code for the various texts on the page and got many hits, but not from the dialog page. I can't search dll files, so maybe thats where that code is in.

  • When i click on itunes to open, message says: the registry settings used by the itune drivers for importing and burning cds and dvds are missing. this can result from installing other cd burning software. Reinstall itunes.  I'm inexperienced. Please help

    When I click on itunes, I get a message that says, "the registry settings used by the itune drivers for importing and burning cds and dvds are missing.  this can result from installing other cd burning software.  Reinstall itunes."  I am a really inexperienced computer user. My computer is a windows 7.  Would someone please walk me through this or tell me where to find information on how to do this. Thanking in advance, Laurie

    Check out this Apple article -> iTunes for Windows: "Registry settings" warning when opening iTunes
    The article will walk you through reinstalling iTunes and then checking for or creating device filters. Did it help? Did you run into any problems?

  • How to Edit the CheckBox in Classic ALV GRID Display

    Hi,
    I want to Edit the checkbox in Grid Display.
    I have one checkbox field in my internal Table,
    Code Of the Program,
    Data :
    Begin of itab occurs 0,
    CHK type C,
    MATNR like MARA-MATNR,
    end of itab.
    Iam building the fieldcatelog using Merge Funcion module.
    After that I am chaning the properties of the field
    catelog like below,
    loop at I_FCAT assigning <FCAT>.
    Case <FCAT>-Fieldname
    When 'CHK'.
    <FCAT>-Checkbox = 'X'.
    <FCAT>-INPUT = 'X'.
    I dont have edit option in fieldcatelog.
    modify I_FCAT from <FCAT>.
    endcase.
    endloop.
    In the Layout,
    I_LAYOUT-box_fieldname = 'CHK'.
    I_LAYOUT-box_tabname = 'ITAB'.
    It is displaying the Checkbox field.but I couldnt edit the checkBox.
    I can able to edit in REUSE_ALV_LIST_DISPLAY.
    But I  have to use REUSE_ALV_GRID_DISPLAY.How to edit the checkbox.
    Thanks in Advance,
    Sumithra

    Hi vasu,
    The below procedure explains you to create a checkbox cloumn in the grid and allows you to edit i hope this will helps u.
    The ALV Grid Control displays the cells of a column as checkboxes if the column is marked as a checkbox column in the field catalog.
    •     Add another field to the output table in which you want to display checkboxes
    OR
    •     Define an existing field as a checkbox.
    Procedure
    1.     Add a field to your output table:
    Data: gt_fieldcat type lvc_t_fcat.
    Types: begin of gs_outtab.
    Types: checkbox type c. "field for checkbox
    Include structure <ABAP Dictionary structure> .
    Types: end of gs_outtab.
    Data: gt_outtab type gs_outtab occurs 0 with header line.
    2 * Add an entry for the checkbox to the field catalog
    clear ls_fcat.
    ls_fcat-fieldname = 'CHECKBOX'.
    * Essential: declare field as checkbox and
    * mark it as editable field:
    ls_fcat-checkbox = 'X'.
    ls_fcat-edit = 'X'.
    * do not forget to provide texts for this extra field
    ls_fcat-coltext = text-f01.
    ls_fcat-tooltip = text-f02.
    ls_fcat-seltext = text-f03.
    append ls_fcat to gt_fieldcat.
    regards,
    venu.

  • How to edit the list box items in labwindow/​CVI?

     how to edit the list box items in labwindow/CVI?

    Listbox items cannot be edited directly in the control: what you can do is to select a line an, transfer its content to a textbox control, edit text there and move text back to the listbox control. Available interactions with the listbox control are listed in the help.
    An alternative to it is to use a tree customized to appear like a listbox: tree item labels can be edited directly in the control, at least those in the base column of the tree. You can look at the example \samples\userint\treelist.cws that shows how a tree can be customized this way. I haven't opened it, but this old example too should show the ability to edit tree cells.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How to edit the include in the user-exit

    hi experts,
    how to edit the include in EXIT_SAPMM07R_001 fuction module exit.
    when i am trying to edit the incude include zxmbcu08 .
    it was giving the message" Program names ZX... are reserved for includes of exit  function groups ". at status bar.
    what is the way to edit include  the fuction module above specified.
    what is the issue !
    please post ur reply as early as possible.
    Thanks in Advance ..,
    Regards,
    Hitu

    Hi,
    Are you creating the include for the first time??
    If you are modifying the include..Probably you have to use the modification assistant..
    In the application toolbar...There are button for INSERT, REPLACE, DELETE..
    Place the cursor on the code...Then press INSERT button..
    It will open a block in that place..
    Thanks,
    Naren

  • How to change the security settings of tomcat5.0

    hi i am new to servlets. i am using tomcat5.0 to run my servlets.i have created two web applications under webapps directorywith the names ourwa and new ourwa.as part of ourwa i have developed a servlet with name Caller that includes another servlet named Calle of newourwa. to do this i got the Servlet Context object newourwa with the code below
    ServletContext application=getServletContext( );
    ServletContext newapplication=getContext("/newourwa" );
    and i included Calle servlet using this newApplication with the code below
    RequestDispatcher rd=newapplication.getRequestDispatcher("/calle");
    rd.include(request,response);
    i am not getting the ServletContext object of newourwa. so i am getting null pointer exception while running the servlet Caller.
    i read the documentation on servlet context inteface.there is a method with the name get Context( ).in this method they clearly specified that "in a security conscious environment this method returns null".
    please help me by giving answers to the following questions:
    1)wat is the alternative to dispatch the request from one application to another application?
    2)how to change the seurity settings of tomcat5.0?
    thanks.

    There has been a change in the Java security settings, see:
    *http://kb.mozillazine.org/Java#Java_security_prompts
    *"What should I do when I see a security prompt from Java?":<br>http://www.java.com/en/download/help/appsecuritydialogs.xml
    If you visit a website regularly then a possible workaround is to add the URL to the Java Exceptions Site List, see:
    *"Why are Java applications blocked by your security settings?":<br>http://www.java.com/en/download/help/java_blocked.xml
    *"How can I configure the Exception Site List?":<br>http://www.java.com/en/download/faq/exception_sitelist.xml

  • How to edit the records value fetched by select statement query in sqldever

    How to edit the records value fetched by select statement query in sqldever 2.1.1.
    EX-
    SELECT * FROM emp WHERE ename like 'Jaga%'
    Edited by: user9372056 on Aug 31, 2010 2:16 AM

    Hi,
    Although some forum members may be using that tool, there is still a dedicated forum for SQL Developer.
    SQL Developer
    Maybe your chances are better there.
    Regards
    Peter

Maybe you are looking for

  • Error while executing the SOAP-XI-JDBC(syn) scenario

    Dear Forum, We have done SOAP-XI-JDBC(synch) scenario with out BPM. When we sent the request data from EP to Oracle database through XI, we got an error,Runtime in Message-Mapping transformation~. com.sap.aii.utilxi.misc.api.BaseRuntimeException: Run

  • Can't view WMP files in Safari on Intel machine unless in Rosetta??

    I am trying to set up my parent's new Mac Mini w/ a core Solo Intel chip. They want to be able to view videos on CNN, but the only way i've been able to get them to work is by downloading the WM9 player, then launching Safari under Rosetta, which is

  • IMac Screen has burn marks developing

    I have a late 2008 iMac that up to now seems to be operating ok. But recently there have been dark spots occurring on the screen after the unit warms up. It's most definitely caused by heat because the spots on the screen are hot to the touch. When I

  • CiscoWorks: Windows server, service-Task Manager has any role in CW application.

    Hi, Our CiscoWorks is residing on a windows server, and this server Task Manager Services are turned off. Does the Task Manager have any role in CiscoWorks application?

  • Regex & Special Characters

    I needed a quick means of limiting characters in user-provided form data throughout my application, so I came up with the following regex script which can be modified on a per-field basis for whatever characters I want a given field to support. As a