SharePoint DataView Webpart

Hello Techies,
I have  a list which has one column as Status(Dropdown-Choice) with following options: Assigned, Rejected,Answered.
I need to get the count of all item based of Status-options.
for eg Count of all Assigned Items, Rejected Items and Answered Items
I have tried with dataview webpart through SPD but facing few issues .Any help will be appreciated.

Hello Vivek,
I used below code in dataview webpart
<xsl:variable name="Rejected"
select="count(/dsQueryResponse/Rows/Row[normalize-space(@Status)='Rejected'])" />
<xsl:with-paramname="Value"><xsl:value-ofselect="$Rejected"/></xsl:with-param>It displays 0 as count and i have couple items as rejected

Similar Messages

  • To show ECB in dataview webpart Sharepoint 2013

    HI
    I have to add ECB to my dataview webpart. Normally it was not feasible in 2010 but is it possible now in 2013.
    Can we add the ECB or it remains same 
    Thanks

    Hi,
    According to your post, my understanding is that you wanted to show ECB in dataview webpart Sharepoint 2013.
    If you want to enable ECB menu on a column in dataview webpart, you need to open the SharePoint Designer 2013, select the web part, under
    <View> locate  <ViewFields> and then the
    <FieldRef Name=”Title”> or the field where you want to enable the ECB menu and then add the attribute
    ListItemMenu=”TRUE”.
    Here is a similar blog for you to take a look at:
    http://www.dhirendrayadav.com/2013/12/enabling-ecb-menu-on-custom-column-in.html
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • SharePoint 2010 Dataview webpart in Datasheet view

    Is it possible to display a Dataview webpart in Datasheet view?
    To be more precise,I am using Dataview webpart to display a XML file data(using XML file connection in SPD).I would like to know if i can display this data using Datasheet view from the DVWP.
    Any inputs/suggestions would be highy appreciated....

    Is it possible to display a Dataview webpart in Datasheet view?
    To be more precise,I am using Dataview webpart to display a XML file data(using XML file connection in SPD).I would like to know if i can display this data using Datasheet view from the DVWP.
    Any inputs/suggestions would be highy appreciated....

  • How to delete multiple items in XSLT Dataview webpart

    Hi,
       I am creating a combined view based on 3 lists with common column like (number) with merge option and now I have added a delete button on top and my requirement is to delete multiple items on selection in combined view using linked data
    source and for single item I am able to delete but I am unable to get the data from number field on multiple selection. deletion is performing in 3 lists based on number column value.
                   Kindly give me any better procedures than this for deletion of multiple item on selection.
    Thanks
    Razvi444

    Hi  Razvi444,
    According to your description, my understanding is that you want to delete multiple items in XSLT Dataview webpart on button click.
    For achieving your demand, you can refer to the blog:
    http://tanveerkhan-sharepoint.blogspot.in/2011/08/delete-multiple-items-using-dataview.html
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Dataview webpart

    Hi
    I am trying to use dataview webpart on SharePoint 2013, I am using SPD to create dataview web part and added couple of columns from my forms. I can see my newly create webpart page, I would like to total columns value using sum function but
    not getting result.Also, how do you apply filter on column
    I have used command <xsl:value-of select="sum(@TJun_x0020_14)"/>
    please help, also do not know exact placement in code
    tp

    Hi Tejal,
    According to your description, my understanding is that you want to use sum function in the dataview web part.
    You can add a new your XSL to emit the total like this:
    <xsl:template name="dvt_1.body">
    <xsl:param name="Rows"/>
    <xsl:for-each select="$Rows">
    <xsl:call-template name="dvt_1.rowview"/>
    </xsl:for-each>
    <tr>
    <td>
    TOTAL
    </td>
    <td>
    <xsl:value-of select="format-number(sum($Rows/@Potential_x0020_Value),'#,##0')"/>
    </td>
    </tr>
    </xsl:template>
    Here is a detailed article for your reference:
    Summing a Column in a Data View Web Part
    Best Regards
    Zhengyu Guo
    TechNet Community Support

  • ASP Gridviews in Sharepoint Visual WebPart

    Hi all, 
      I have developed a grid view in sharepoint visual webpart using asp.net grid view. In that grid view I have footer row ,in footer row i have one drop down list ,label,one text box etc... 
      When even I am changing the drop down It needs to post back and get some value and assigned to label. this is working fine but when  there are no rows in grid view at that time while changing drop down list I am getting one empty row in  grid
    view for that one of my colleague suggested that keep a update panel for both drop down and label . I kept and working fine but when I am trying to insert a row from footer with out any data selection again I am getting am empty row in grid view
      Could you    please any help me out from this error
    Thanks & Regards,
    Nag

    Hi Vivek,
      I am using that code logic  previously, when I am opening very first time it is showing "No Results found" text  but in my Case there is a drop down list in footer that needs to  the data from server so "autopost back"
    property is true for drop down list
       While I am changing drop down the grid view automatically adding an empty row without showing any text and also it is showing edit and delete button.
        Please  Help me.
    Thanks & Regards,
    Nag

  • Sharepoint 2010 Webpart debugging - Writing to the console

    I am creating a SharePoint 2010 Webpart, and I'd like to write to the console for debugging purposes. Unfortunately the command Console.Writeline doesn't seem to work for me. How do I fix this??

    Unfortunately, the functionality you're looking for doesn't exist.  Web parts are primarily used for web applications and are built within class libraries, which have no console functionality at all. Therefore, prevents writing to the console.
    Alternatively, you can use Visual Studio to debug the web part and step through the code using breakpoints.  Visual Studio 2010 allows you to Debug the web part by hitting "F5".
    Here's a link for some resources to help you get started developing web parts for SharePoint 2010.
    http://donahoo-development.com

  • Cannot covert type 'Microsoft.SharePoint.Client.WebParts.WebPart' to 'GenericSmartPart.SmartPart'

    Hi Concern,
    I am using Client Site CSOM coding and getting error
    Smart Parts user control detail is required and while converting throws error.
    Cannot covert type ‘Microsoft.SharePoint.Client.WebParts.WebPart’ to ‘GenericSmartPart.SmartPart’
    Code is associted as problem.
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Microsoft.SharePoint.Client;
    using Microsoft.SharePoint.Client.WebParts;
    using Microsoft.SharePoint.Client.Utilities;
    using System.Data;
    namespace TrainingCsharp
    class Class1
    public void print()
    // Starting with ClientContext, the constructor requires a URL to the
    // server running SharePoint.
    using (ClientContext context = new ClientContext("Site URL "))
    // The SharePoint web at the URL.
    Web web = context.Web;
    // We want to retrieve the web's properties.
    // context.Load(web, w => w.Title, w => w.Description);
    context.Load(web, w => w.Title, w => w.Description, w => w.ServerRelativeUrl);
    context.ExecuteQuery();
    string sUrl= web.ServerRelativeUrl;
    File oFile = context.Web.GetFileByServerRelativeUrl(sUrl+"/Pages/default.aspx");
    LimitedWebPartManager limitedWebPartManager = oFile.GetLimitedWebPartManager(PersonalizationScope.Shared);
    context.Load(limitedWebPartManager.WebParts,
    wps => wps.Include(
    wp => wp.WebPart.Title, wp => wp.WebPart.ZoneIndex ));
    context.ExecuteQuery();
    int count = limitedWebPartManager.WebParts.Count;
    string[] arr, arr1;
    if (count == 0)
    Console.WriteLine("No Web Parts on this page.");
    else
    arr = new string[count];
    arr1 = new string[count];
    string sControlName = null;
    for (int i = 0; i < count; i++)
    WebPartDefinition oWebPartDefinition = limitedWebPartManager.WebParts[i];
    WebPart oWebPart = oWebPartDefinition.WebPart;
    arr[i] = oWebPart.Title;
    if (arr[i].ToLower().Contains("generic"))
    sControlName = ((GenericSmartPart.SmartPart)(oWebPart)).UserControlPath;
    //else if (arr[i].ToLower().Contains("smartpart"))
    //sControlName = ((SmartPart.SmartPart)(oWebPart)).UserControl;
    //else if (arr[i].EndsWith("ListViewWebPart"))
    //sControlName = ((Microsoft.SharePoint.Client.ListItemCollection)(oWebPart)).ListName;
    //else if (arr[i].StartsWith("Microsoft.SharePoint.WebPartPages."))
    //sControlName = arr[i].Length > 34 ? arr[i].Substring(34) : "";
    //else
    //sControlName = "";
    arr1[i] = Convert.ToString(oWebPart.ZoneIndex);
    Console.Write(arr[i] + " ");
    Console.WriteLine("Position" + arr1[i]);
    // ctx.ExecuteQuery();
    List announcementsList = context.Web.Lists.GetByTitle("Announcements");
    // This creates a CamlQuery that has a RowLimit of 100, and also specifies Scope="RecursiveAll"
    // so that it grabs all list items, regardless of the folder they are in.
    CamlQuery query = CamlQuery.CreateAllItemsQuery(1000);
    ListItemCollection items = announcementsList.GetItems(query);
    // Retrieve all items in the ListItemCollection from List.GetItems(Query).
    context.Load(items,
    itema => itema.Include(
    item => item,
    item => item["Title"],
    item => item["Expires"],
    item => item["Body"],
    item => item.FieldValuesAsText["Body"],
    item => item["Author"],
    item => item["Editor"]
    context.ExecuteQuery();
    foreach (ListItem listItem in items)
    // We have all the list item data. For example, Title.
    Console.WriteLine("Title" + listItem["Title"]+ " ");
    Console.WriteLine("Body" + listItem["Body"] != null ? Convert.ToString(listItem.FieldValuesAsText["Body"]) : string.Empty + " ");
    Console.WriteLine("Expires " + Convert.ToDateTime(listItem["Expires"] + " "));
    FieldUserValue oValue = listItem["Author"] as FieldUserValue;
    String strAuthorName = oValue.LookupValue;
    Console.WriteLine("Created at " + strAuthorName + " ");
    FieldUserValue oValue1 = listItem["Editor"] as FieldUserValue;
    String strAuthorName1 = oValue1.LookupValue;
    Console.WriteLine("Last Modified " + strAuthorName1);
    //Console.ReadKey();
    DataTable table = new DataTable();
    table.Columns.Add("Title");
    table.Columns.Add("Body");
    table.Columns.Add("Expires");
    table.Columns.Add("Author");
    table.Columns.Add("Editor");
    foreach (ListItem listItem in items)
    FieldUserValue oValue = listItem["Author"] as FieldUserValue;
    String strAuthorName = oValue.LookupValue;
    FieldUserValue oValue1 = listItem["Editor"] as FieldUserValue;
    String strAuthorName1 = oValue1.LookupValue;
    table.Rows.Add(listItem["Title"],listItem["Body"],Convert.ToDateTime(listItem["Expires"]),strAuthorName,strAuthorName1);
    //datagrid.DataSource = table;
    //ctx.ExecuteQuery();
    List EventsList = context.Web.Lists.GetByTitle("Event Calendar");
    // This creates a CamlQuery that has a RowLimit of 100, and also specifies Scope="RecursiveAll"
    // so that it grabs all list items, regardless of the folder they are in.
    CamlQuery queryEvent = CamlQuery.CreateAllItemsQuery(1000);
    ListItemCollection itemsEvent = EventsList.GetItems(queryEvent);
    // Retrieve all items in the ListItemCollection from List.GetItems(Query).
    context.Load(itemsEvent,
    itema => itema.Include(
    item => item,
    item => item["Title"],
    item => item["Location"],
    item => item["EventDate"],
    item => item["EndDate"],
    item => item["Description"],
    item => item.FieldValuesAsText["Description"],
    item => item["Event_x0020_Contact"],
    item => item["Event_x0020_Category"],
    item => item["Inhouse_x0020__x002f__x0020_Exte"],
    item => item["Expires_x0020_On"],
    item => item["Author"],
    item => item["Editor"]
    context.ExecuteQuery();
    foreach (ListItem listItemEvent in itemsEvent)
    // We have all the list item data. For example, Title.
    Console.WriteLine("Items of Events to be Printed");
    Console.WriteLine("Title: " + listItemEvent["Title"] + " ");
    Console.WriteLine("Title: " + listItemEvent["Location"] + " ");
    Console.WriteLine("Event Date: " + Convert.ToDateTime(listItemEvent["EventDate"] + " "));
    Console.WriteLine("End Date: " + Convert.ToDateTime(listItemEvent["EndDate"] + " "));
    string sDescription = listItemEvent["Description"] != null ? Convert.ToString(listItemEvent.FieldValuesAsText["Description"]) : "";
    Console.WriteLine("Description: " + sDescription);
    Console.WriteLine("Event Contact: " + listItemEvent["Event_x0020_Contact"] + " ");
    Console.WriteLine("Event Category: " + listItemEvent["Event_x0020_Category"] + " ");
    Console.WriteLine("Inhouse / External: " + listItemEvent["Inhouse_x0020__x002f__x0020_Exte"]);
    Console.WriteLine("Expires: " + Convert.ToDateTime(listItemEvent["Expires_x0020_On"]));
    FieldUserValue oAuthor = listItemEvent["Author"] as FieldUserValue;
    String sAuthor = oAuthor.LookupValue;
    Console.WriteLine("Author: " + sAuthor);
    FieldUserValue oEditor = listItemEvent["Editor"] as FieldUserValue;
    String sEditor = oEditor.LookupValue;
    Console.WriteLine("Editor: " + sEditor);
    //Console.ReadKey();
    DataTable tableEvents1 = new DataTable();
    tableEvents1.Columns.Add("Title");
    tableEvents1.Columns.Add("Location");
    tableEvents1.Columns.Add("EventDate");
    tableEvents1.Columns.Add("EndDate");
    tableEvents1.Columns.Add("Description");
    tableEvents1.Columns.Add("Event Category");
    tableEvents1.Columns.Add("Event Contact");
    tableEvents1.Columns.Add("Inhouse / External");
    tableEvents1.Columns.Add("Expires On");
    tableEvents1.Columns.Add("Author");
    tableEvents1.Columns.Add("Editor");
    foreach (ListItem listItemEvent in itemsEvent)
    FieldUserValue oValue = listItemEvent["Author"] as FieldUserValue;
    String strAuthorName = oValue.LookupValue;
    FieldUserValue oValue1 = listItemEvent["Editor"] as FieldUserValue;
    String strAuthorName1 = oValue1.LookupValue;
    tableEvents1.Rows.Add(listItemEvent["Title"]
    , listItemEvent["Location"]
    ,Convert.ToDateTime(listItemEvent["EventDate"])
    , Convert.ToDateTime(listItemEvent["EndDate"]), listItemEvent["Description"],
    listItemEvent["Event_x0020_Category"],listItemEvent["Event_x0020_Contact"],listItemEvent["Inhouse_x0020__x002f__x0020_Exte"]
    ,Convert.ToDateTime(listItemEvent["Expires_x0020_On"])
    ,strAuthorName,strAuthorName1);
    //datagrid.DataSource = table;
    // ctx.ExecuteQuery();

    Hi,
    Would you mind providing more details about why you want to perform the type conversion?
    According to your code, you might want to retrieve some properties of a web part in a page, please check that whether the built-in properties of
    Microsoft.SharePoint.Client.WebParts.WebPart can fulfill your requirement.
    WebPart members
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.webparts.webpart_members(v=office.15).ASPX
    Feel free to reply if there are still any questions.
    Best regards
    Patrick Liang
    TechNet Community Support

  • List threshold error on SharePoint Documents webpart under Mysite Content tab

    Hi,
    Even though the list threshold limit has been increased for a team site to 40k in CA -> Web App -> Resource Throttling options when a user goes to his/her mysite and are member of a particular team site they get the following error message on the SharePoint
    Documents webpart:
    An error has occurred.
    The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator.
    The number of items in the document library for that particular team site are 14k where as the limit has been increased to 40k.
    Can anyone help why we are getting this error message? Thanks
    Regards,
    Kashif

    Hi,
    According to your post, my understanding is that you had List threshold error on SharePoint Documents webpart under Mysite Content tab.
    Items in the recycle bin count towards the limit, please make sure you did not delete items from this list recently and if you did, remove them from the recycle bin too.
    Please make sure you removed the 'Assigned to' criteria from the view.
    I also recommend to increase the threshold limit and see if that works, though it is not a good idea for the long term.
    The default value for this limit is based on farm and list performance and how SQL Server manages locks.
    Rather than bumping the List View Threshold or the List View Threshold for Auditors and Administrators, you should modify your query.  The best ways to do this are:
    Execute the query against a limited view rather than the default list view containing all items by specifying the view name in the new SPQuery object constructor.
    If you can’t execute your query against a limited view, create a column index for each column contained in the <Where> clause of your SPQuery.
    Here is a similar thread for you to take a look at:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/bb7cf9b5-1473-4ab8-be32-75a62a34dc10/the-attempted-operation-is-prohibited-because-it-exceeds-the-list-view-threshold-enforced?forum=sharepointadminprevious
    More information:
    http://thedotnetter.wordpress.com/2013/04/25/spquery-and-the-list-view-threshold/
    http://www.collabshow.com/2011/08/03/managing-large-lists-in-sharepoint-for-users-and-site-admins/
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Perform CRUD operation on List using Gridview control (SharePoint Visual webpart)

    Hi Friends,
    I have SharePoint Visual webpart and I want to perform CRUD operation on SharePoint list using Gridview control.
    Is there any other way to implement it , please suggest me the solution approach.
    Thanks,
    Digambar Kashid

    Is there any specific reason you dont want to use Out Of the Box list CRUD operation? Anyways, if you want to use custom approach I think SPGridView is good approach. 
    There are some samples available for what you are trying to achieve.
    Samples on how to use SharePoint's GridView
    Also There is similar thread which might be helpful as well. 
    http://social.msdn.microsoft.com/Forums/en-US/7b4f69e9-36b5-4188-8b75-1f727d0bb594/is-there-any-posibility-to-do-crud-operations-with-gridview-control?forum=sharepointdevelopmentprevious
    Amit

  • How can we access Page metadata in DataView Webpart in SharePoint Designer 2013?

    Hi,
     I need to access Page metadata in my Data view web part and I am having a feeling, that the "Form" option can help me getting Page metadata, but I am not able to get much information about using this field as a parameter source on net? Can
    anybody advise, how to use "Form" option in "Parameter Source" in SharePoint Designer 2013
     OR Suggest me any other way to get Page metadata in Data View Webpart?
    Thanks in advance,
    Regards,
    Deepali
    Deepali

    Hi  Deepali,
    All the parameter source are ASP Request Object collections  which is used to get information from a visitor.  
    For accessing page metadata, you can select Server  Variable.
    For more information ,you can refer to the following article:
    http://www.w3schools.com/asp/asp_ref_request.asp
    http://blogs.msdn.com/b/spdsupport/archive/2008/07/25/data-view-data-form-parameters-you-don-t-know-about.aspx
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Sharepoint 2013 XSLT view in Dataview webpart

    I have one doubt. Recently I seen that in sharepoint 2013, for data view webpart xslt view is not available in Sharepoint Designer. I came to know that XSLT view will not be supported in 2013. My query is whether Microsoft will remove complete XSLT part
    in next version of sharepoint. Like Content query webpart and all. Also am not getting why they removed that XSLT view in 2013. Because if they are going to remove XSLT, then it will create a problem in migration and all. Please clear me if you have any idea
    on the same.

    Hi,
    You should use CSR(Client Side rendering)
    http://sharepoint.stackexchange.com/questions/75451/xsl-to-customize-xsltlistviewwebpart-sharepoint-foundation-2013
    http://www.rbradbrook.co.uk/blog/2013/04/14/introduction-to-client-side-rendering-in-sharepoint-2013/
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Paging is not working in xslt dataview webpart

    Hi,
        Problem: Paging is not working in combined views, created by using linked data source
        Decription: Created a combined view using 3 different lists with merge option and enabled paging and grouping. Paging is not working and I have set display sets up to 30 items. Kindly provide any possible scenarious which causes this issue
    and any solutions.
    Thanks
    Razvi444

    Hi Razvi444,
    I assume you created the view web part as the link below:
    http://sp2013.blogspot.com/2013/11/two-sharepoint-lists-in-dataview-linked.html
    After that, we could add web part on our site page by insert > web part > miscellaneous > data source name. By default, the data source is set to display sets of 10 items in Paging.
    If you would like to switch it to 30 items, please save it and save the web part to Site Gallery as well. Then give it a new name and re-add the web part to our page.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Visio document imported into a SharePoint VisioWebAccess webpart : open links in new tab or window

    Hello.
    I'm using a SharePoint Server 2010, with a Visio Web Access WebPart.
    With Visio 2010, I created a vdw document which I put in this webpart.
    This works very well, but i have some hyperlinks which I want to be opened in a new tab (or a new window), so that he SharePoint page won't be replaced by the target page.
    So, in Visio, I tried to modify the ShapeSheet of each hyperlink, by setting the "NewWindow" to true. Unfortunately, it does not work : links are replacing the current page.
    I found nothing on the web that could give me a trick to do this.
    Has anyone an idea ?
    Thanks a lot
    _David

    Hello _David C,
    You can create some JavaScript code that will open the hyperlink in a new window. Here is a JavaScript sample that will open the first hyperlink applied to a shape in a new browser window. I have tested it in both IE and FireFox.
    <script type="text/javascript">
    // Declare the global variables for the script, for the Visio Web Access Web Part, the active page in the Web Part,
    // the shapes on the active page, and the shape on the page without hyperlinks.
    var vwaControl;
    var vwaPage;
    var vwaShapes;
    var coldShape;
    // Add a handler to the AJAX Sys.Application.load event.
    Sys.Application.add_load(onApplicationLoad)
    function onApplicationLoad()
    try{
    // Capture a reference to the current instance of the Visio Web Access Web Part.
    // Add a handler to the 'diagramcomplete' event.
    vwaControl= new Vwa.VwaControl(getVWAWebPartID());
    vwaControl.addHandler("diagramcomplete", onDiagramComplete);
    catch(err){
    alert(err);
    function getVWAWebPartID()
    // Search all of the <div> tags on the page to find the div tag with the ID of the VWA Web Part.
    var divArray = document.getElementsByTagName("div");
    var webPartElementID;
    for (var i = 0; i < divArray.length; i++) {
    var node = divArray[i];
    if (node.className == "VisioWebAccess")
    webPartElementID = node.parentNode.parentNode.id;
    break;
    return webPartElementID;
    function onDiagramComplete()
    try{
    // Set the vwaPage and vwaShapes variables to the active page and the shapes collection on that page, respectively.
    vwaPage = vwaControl.getActivePage();
    vwaShapes = vwaPage.getShapes();
    // Set the 'cold shape' for the current active page in the drawing.
    selectColdShape();
    // Remove the handler from the shape selection changed event and then add it back to the event.
    vwaControl.removeHandler("shapeselectionchanged", onShapeSelectionChanged);
    vwaControl.addHandler("shapeselectionchanged", onShapeSelectionChanged);
    catch(err)
    alert(err);
    onShapeSelectionChanged = function (source, args)
    try{
    // Get the array of hyperlinks from the selected shape.
    var vwaShape = vwaShapes.getItemById(args);
    var newURLArray = vwaShape.getHyperlinks();
    var newURL;
    // Check to see whether the shape has any hyperlinks.
    if (newURLArray.length > 0)
    newURL = newURLArray[0].value;
    // Check to see if the hyperlink goes to another page in the drawing.
    if (newURL.indexOf('vdw') < 0)
    // Open the hyperlink in a new window.
    var newWindow = window.open(newURL);
    else
    // Set the active page to the new page.
    setNewPage(newURL);
    catch(err)
    alert(err);
    function selectColdShape() {
    try {
    // Set variables with the names of shapes on the pages that do not contain hyperlinks.
    // Customize the values for these variables to fit your web drawing.
    var coldShapePg1 = "Sheet.6";
    var coldShapePg2 = "Sheet.10";
    // Check to see if the coldShape exists on this page.
    if (vwaShapes.getItemByName(coldShapePg1)) {
    // Set the active shape to the shape without hyperlinks on page 1.
    coldShape = vwaShapes.getItemByName(coldShapePg1);
    vwaPage.setSelectedShape(coldShape.getId());
    else if (vwaShapes.getItemByName(coldShapePg2)) {
    // Set the active shape to the shape without hyperlinks on page 2.
    coldShape = vwaShapes.getItemByName(coldShapePg2);
    vwaPage.setSelectedShape(coldShape.getId());
    catch (err) {
    alert(err);
    function setNewPage(pageId) {
    // Set the active page in the drawing to the page ID passed in as argument.
    var indexOfAmp = pageId.indexOf("&");
    var page = pageId.slice(6, indexOfAmp);
    vwaControl.setActivePage(page);
    </script>
    Note that this code requires that each page have a "cold shape" that does not have any hyperlinks applied to it. In my test drawing, I added a hidden shape (in ShapeSheet, Width = 0, Height = 0) that did not have any hyperlinks. This is because the Vwa.shapeselectionchanged
    event fires when you switch pages, which creates the possibility that the JavaScript code will open a new window when you change pages in the viewer.
    If you are not familiar with the Visio Services JavaScript Object Model, I suggest that you check out the following resources:
    http://blogs.msdn.com/b/visio/archive/2010/02/21/the-visio-services-javascript-mashup-api.aspx
    http://msdn.microsoft.com/en-us/library/ff394649.aspx
    http://msdn.microsoft.com/en-us/library/ff394600.aspx
    I hope that this helps,
    E. Schmidt, Technical Writer
    Microsoft Corporation

  • Cannot view SharePoint 2013 WebPart Page in Html iframe

    I would like to use html iframe for display sharepoint 2013 webpage page , it return following error :
    "This content cannot be displayed in a frame"
    Here is my code:
    <iframe width="100%" src="http://xxxx-dev-int:6346/Test/SitePages/wpSPFolderControl.aspx"> </iframe>
    i try to follow
    http://blogs.msdn.com/b/officeapps/archive/2012/12/12/iframing-sharepoint-hosted-pages-in-apps.aspx , but another error message shown
    "The Visible property cannot be set on Web Part 'g_5bf75035_be44_437a_8752_6360297f3f13'.  It can only be set on a standalone Web Part."
    The webpart page is correct , that can browse directly.
    Working environment:
    - SharePoint 2013
    - Windows Server 2012
    - Visual Studio Professional 2012
    - .Net framework 3.5
    Thanks for your help

    TRY
    <WebPartPages:AllowFraming ID="AllowFraming1" runat="server" />
    http://msdn.microsoft.com/en-us/library/office/fp179921(v=office.15).aspx
    http://blogs.msdn.com/b/officeapps/archive/2012/12/12/iframing-sharepoint-hosted-pages-in-apps.aspx
    or
    http://social.msdn.microsoft.com/Forums/en-US/fa6abb31-7251-4744-ab14-634cde38a42d/error-when-viewing-apps-that-utilize-webparts-this-content-cannot-be-displayed-in-a-frame?forum=appsforsharepoint
    <WebPartPages:AllowFramingID="AllowFraming1"runat="server"/>

Maybe you are looking for