Adding a custom Webpart in Application Page

Hi , 
I have an Application page, now i have got a requirement to add another custom webpart in that.
I tried editing them in Sharepoint designer and adding a zone.. but its not supproting "runat=server" tag.
Hence i m failing to add a custom webpart.
Please help in this regard.

Hi,
Did you have the correct "register"  on your application page :
<%@ Register TagPrefix="WpNs0" Namespace="CustomForm.MyWebPartName" Assembly="CustomForm, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8834df117dc574a9"%>
Have a look at this post :
https://social.msdn.microsoft.com/Forums/sharepoint/en-US/fa372eec-4945-4297-afb1-c7183b007ff1/how-can-i-add-custom-webpart-to-application-page-or-site-page-in-visual-studio?forum=sharepointdevelopment
Regards
Gilles Martinez
Twitter
Blog
Please mark as helpful/answer if this resolved your post

Similar Messages

  • 404 error while adding custom webpart to the page

    I have my solution working in development environment. I deployed the wsp in prod env. While adding one specific webpart to the page leads to 404 error page.
    Thanks in advance.

    Hi,
    boreal123's reply makes sense.
    I would say that somewhere in your specific method call a web service, but it cannot find. You can check the related code snippet.
    I suggest that you can try to store the url in a webpart property so that it can be modified easily.
    Best Regards
    Guangchao chen
    TechNet Community Support

  • Adding a custom webpart to webpart page not a safe control issue

    When I am adding a custom web part to web part page I am getting below error as a popup. Plz help if any body resolved the same issue.
    Unable to add selected web part(s). (Web Part Name): A Web Part or Web Form Control on this Page cannot be displayed or imported.
    The type could not be found or it is not registered as safe
    Regards.
    Avinash.
    Avinash

    Hi,
    Here you go. This should help you.
    ow many times have you guys faced an issue like this ?"The type could not be found or it is not registered as safe." .To resolve this, make sure that you add safe controls around your web part assembly in web.config.
    <SafeControls>
    < SafeControl Assembly=”WebPart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=abcdeddf23232″ Namespace=”Mywebpart.WebPart” TypeName=”*” Safe=”True” />
    < /SafeControls>
    The above ensure that your web part code is secured and wont let any anonymous users to access the web part.
    Happy SharePointing ;-)
    http://www.c-sharpcorner.com/Blogs/15024/
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Webdynpro Application Page in portal in CE7.1

    Hi,
        I have created a webdynpro application with property u201Csap.canBeSplitInIviewsu201D set to u201Ctrueu201D.I have deployed the application  and in Portal Content I have created a webdynpro page out of this application.So now my webdynpro page is having two iviews.
    Now I want to know the answers for below questions
    1)Can we  embed a url iview it in to the above created Webdynpro Application page in portal.I tried for it but couldnu2019t do so.
    2)So,as an alternative I created a Page,added the above created Webdynpro Application page and a url iview to that page.Now that url iview is displayed along with the Webdynpro iview.Bot the problem is url iview is getting refreshed when ever I click a button in the webdynbpro application view .It even refreshes when I select a table row in webdynpro.
    Please let me know if we can prevent url iview to refresh.
    Regards,
    Sudhir

    Hi,
    >1)Can we embed a url iview it in to the above created Webdynpro Application page in portal.I tried for it but couldnu2019t do so.
    No, I don't think so.
    >Please let me know if we can prevent url iview to refresh.
    For the parent page which hosts both the WD and the URL iview, set the property Isolation Method to URL. You can find this property under the property category Load.
    Regards,
    Satyajit.

  • Adding Custom WebPart in AllUsersWebPart in SharePoint 2013

    Hi 
    I am trying to add the Custom WebPart to Custom PageLayout using 
    AllUsersWebPart.But the webpart is not adding to the page when created. The same code if i am adding to Pages AllUsersWebPart , its coming.Is there any thing need to do with PageLayout AllUsersWebPart property  <![CDATA[              
            <?xml version="1.0" encoding="utf-8"?>
            <webParts>
              <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
                <metaData>
                  <type name="SolutionX.ProjectY.WebParts.MyWebPart, $SharePoint.Project.AssemblyFullName$" />
                  <importErrorMessage>$Resources:core,ImportErrorMessage;</importErrorMessage>
                </metaData>
                <data>
                  <properties>
                    <property name="Title" type="string">My WebPart</property>
                    <property name="Description" type="string">My WebPart for XYZ</property>
                    <property name="ListName" type="string">ExampleList</property>
                    <property name="RowLimit" type="string">5</property>
                  </properties>
                </data>
              </webPart>
            </webParts>
            ]]>
          </AllUsersWebPart>Thanks SPKids

    Hi,
    I assume you are attempting to add this to a standard page layout and not a HTML Page Layout.
    My suggestion is that you add your webpart to a standard content page in the browser first. Save the content page and check in / publishing a major version. Now open your site in SPD and navigate to the Pages library. Your content page should be listed.
    Right click this content page and "Detach" the page from its page layout. You will receive a warning, ok that.
    Once the content page has been detached from the page layout, open the content page in SPD and view the HTML source. Look for your custom webpart in the source. This is the tags / source that you need to add to your custom page layout. You can reattach this
    content page to its page layout now if you wish.
    Eric Overfield - PixelMill -
    ericoverfield.com -
    @EricOverfield

  • Read contents of Pages library and show in custom webpart

    Hi,
    How to read the contents of "Pages" library (Published pages  and custom created pages only and not reading OOB pages)?
    I have a publishing site, in which I need to read the "Title" and URL" of the pages which are created by users and show in a custom webpart. If a new page is published, that page data should be added to the webpart.
    Is it possible to achieve this? I know of Content Query webpart, but I need to custom create a custom webpart with custom styling. Is it possible to use the logic of content query webpart in a custom visual webpart? How to achieve this programmatically?
    Thanks

    The process in 2013 is essentially the same as it was in 2010.  The only difference is that you don't have to manually add additional fields to the datafields list in the .webpart file.  But the .XSL customization is identical.  That's why
    you won't find many articles on how to do it in 2013.  It was already covered in 2010 and hasn't changed.  Here is one example from 2013.
    http://sp2013.blogspot.com/2012/09/content-query-and-metadata-driven.html
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • Adding welcome Menu Box in custom webpart

    Hi
    i want to add the OOB welcome menu box in a custom webpart.
    Am developing a webpart for adding  in the master page which should have the default welcome note included. In default master page, i checked and it was having <wssuc:welcome> tag. I tried adding this tag in webpart, it is throwing error.
    Please help me to add this in the custom webpart
    Harikrishna Baskaran

    this might help you .
    http://blogs.msdn.com/b/richin/archive/2012/07/04/how-to-display-profile-thumbnail-photo-next-to-welcome-message-in-sharepoint.aspx
    Thanks and Regards
    Er.Pradipta Nayak
    Visit my Blog
    Xchanging

  • How to set up Application specific custom ogoff (sign-off) page.

    Hi,
    I'm using OracleAS 10.1.2.2
    Note 333638.1 shows us how do make a custom SSO login page to be application specific. This works.
    Now, I want to do a custom SSO logout (sign-out) page. Using the redirect method described does not seem to work. Please note that in our version 10.1.2.2, there is no default logout.jsp page in the /sso/jsp directory. To deploy a custom logout page, I would need to update the WWSS_LS_CONFIGURATION_INFO$ view.
    I was able to test a custom SSO logout.jsp page sucessfully. However, when I tried using a redirect_logout.jsp to make it application, it no longer works.
    Does anyone know or have any idea on how to deploy an application specific logout page? (i.e. only specific applications uses the custom logout page, otherwise go to the default one).
    Thanks.
    - Kevin

    Well,
    There are 5 choices to choose from on the page. In the description of the choices at the bottom of the page there are 7, and the two additional choices talk about having to first have registered the site with SSO. So...I'm interpreting that as meaning that other 2 possible choices would be displayed if the site is registered with SSO. That, plus the fact that the page which describes how to add the site to SSO seems to think that the SSO choices are displayed in the wizard.
    So, no, there's no "exact launguage" that says what the reason is for the choices not being displayed. Can you point me to some exact language that tells me how to get those choices displayed?

  • How to set custom master page for sharepoint application page ?

    Hello,
    I need to apply custom master page for the custom application page I created for login purpose.
    Can anyone please let me know how to apply master page for custom application page ?
    Note : I need to set custom master page for application page at web application level.
    thanks,
    Dipti Chhatrapati

    Hi Dipti,
    You can use the same reference as ASP.NET
    Example
    "<%@ Page Language="C#" masterpagefile="../_catalogs/masterpage/minimal.master" title="teste" inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" meta:webpartpageexpansion="full"
    meta:progid="SharePoint.WebPartPage.Document" %>"
    You can use SharePoint Designer 2010
    http://www.microsoft.com/download/en/details.aspx?id=16573 to make the reference from you aspx page to you custom masterpage.
    When you are editing a aspx page you can go to ribbon "Style" and attach the custom Masterpage.
    André Lage Microsoft SharePoint, CRM Consultant
    Blog:http://aaclage.blogspot.com
    Codeplex:http://spupload.codeplex.com/http://simplecamlsearch.codeplex.com/

  • More than one custom ResultScriptWebpart in the application page

    I am currently working on a scenario where I have to use an application page for search with different tabs showing the results from different Result Sources created at site collection level.
    So in the .aspx page, I have added two ResultScriptWebpart instances; one on each tab in the aspx page. One of them displaying results from the 'Local SharePoint Results' (OOTB result source) and using '-Path' parameter i have excluded one
    particular SPList from the 'Local SharePoint Results'. The other ResultScriptWebpart displays the result from the SPList which was excluded in the first one.
    I am using DataProviderJSON property to specify the 'SourceName', 'SourceLevel' and 'QueryTemplate' which will give the results as I want in the application aspx page. But I am not getting results on both tabs at the same time.
    When I use these Result sources on separate test pages, I get results on them both as expected. 
    Can there be only one ResultScriptWebpart on an aspx page? Any other possible reasons?

    Brent,
    In the statement
    ${JHS.pageDefGenerator.addBinding($JHS.page,"JhsUsers","#CUSTOM_BINDING2()")}
    the second argument should be the id of the binding you want to add. You use twice "JhsUsers" as id for the binding.
    This id should be the same id as used in your XML page snippet, so for the first binding it should be "SubjectsActiveVisitsGraph" and for the second binding it should be "SitesActiveVistsGraph"
    Steven Davelaar,
    Jheadstart Team.

  • I-view for custom WD ABAP application opening in new page

    Hi,
    We have created a new i-view and page in ESS for a custom WD ABAP application.
    Our requirement is that all i-views open in the same page (i.e. portal content area). I have set the property - launch in new window as ' display in portal content area'. The work protect mode settings for opening in the same window have also been done.
    Yet, the i-views that have been created for custom WD ABAP applications are opening in a new page while the standard i-views are opening in the same page.
    Would appreciate pointers on how can this issue can be resolved.
    TIA.

    hi,
    check your homepage configuration and makesure nothing is there on window name in the resource.
    thanks,
    pkv

  • Create Custom Application Page using SharePoint designer

    Hi All,
               I have a task to create the Custom Application page using SharePoint designer.Can any one help me how can I do this.Can any one help me how can I achieve this
    Samar

    Hi Samar,
    By application page do you mean writing C# code from SP designer? If so as far as I know you can't write C# code from designer, you have to use Visual Studio for it.
    But if you only want an aspx page with some JS code you can create one from "all files" in designer. you will see files menü on ribbon from where you can create aspx page.
    Best regards,
    Mustafa Yılmaz
    Best Regards, Mustafa Yılmaz MCITP, MCPD | www.mustafa-yilmaz.org | www.sharepointciyiz.biz

  • Adding more custom tags to large product page

    Is there any way to add more custom tags past tag_custom4?

    That's not possible. Those 4 custom fields is all you can use.
    There is a keywords field which you can utilise maybe. I think the tag for
    it is .
    Cheers,
    Mario Gudelj
    www.twoblokeswithapostie.com - Talk to us before you tell your clients:
    "No, Business Catalyst can't do that."
       Adding more custom tags to large product page  created by AnneGerber<http://forums.adobe.com/people/AnneGerber>in
    eCommerce - View the full discussion<http://forums.adobe.com/message/5050617#5050617

  • Adding custom stamps to many pages in white space.

    Is there any way to add a custom stamp to every page of a PDF book and having it placed into the white space on the document? I have found a script that will do every thing except for the 'white space' part of my query, so I don't think I will have much luck.
    Watermarks will probably not work in this instance, the stamp needs to be noticible but not in the way, and the watermark will encouter the same placement problem (as it is preferable if the stamp/watermark is not getting the in way of the drawing pdf's content).
    Any help will be appreciated, just let me know if you need more clarification.

    The question is what do you mean by "white space"? Is it always the same area on the page (like a 2" margin), or is it a different location for each page, where there happens to be no text or images? The former is possible, the latter only partially, and is very difficult to implement with a script.

  • 'My Application Page' is not allowed here because it does not extend class 'System.Web.UI.Page'

    I have a custom SharePoint 2010 solution that includes an aspx page. The aspx page in is in the /layouts folder within the solution and I created it by just adding an application page to the solution. I am trying to create a parent-child relationship between
    two different lists in SharePoint. From the parent I have a custom button on the ribbon that creates a child item with the ID of the parent stamped on it.
    The page is just a processing page that forwards on parameters from the parent to the new child item. (i.e. the ID value)
    The code generated when I add the aspx page is below:
    <%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
    <%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
    <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
    <%@ Import Namespace="Microsoft.SharePoint" %>
    <%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="processingpage.aspx.cs" Inherits="MY.Solution.Layouts.MY.Solution.processingpage" MasterPageFile="~/_layouts/application.master" %>
    <asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
    </asp:Content>
    <asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
    </asp:Content>
    <asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server"> Processing Page </asp:Content>
    <asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server" > Processing Page </asp:Content>
    The code behind is as follows:
    using System;
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.Administration;
    using Microsoft.SharePoint.WebControls;
    using Microsoft.SharePoint.Utilities;
    using System.Reflection;
    namespace MY.Solution.Layouts.MY.Solution
    public partial class processingpage : LayoutsPageBase
    protected void Page_Load(object sender, EventArgs e)
    try
    //Get a reference to the SPWeb object
    SPWeb oWeb = SPContext.Current.Web;
    //Use the Parameters That Are Passed In
    SPList thisList = oWeb.Lists[new Guid(Request.QueryString["List"])];
    SPListItem thisItem = thisList.GetItemById(int.Parse(Request.QueryString["ID"]));
    sContentType = thisItem["ContentType"].ToString();
    sContentTypeID = thisItem.ContentTypeId.ToString();
    if (sContentType == "Some Content Type")
    sContentTypeID = "";
    sAIID = thisItem["ID"].ToString();
    //Redirect to newform.aspx with the Appropriate parameters.
    Context.Response.Redirect(oWeb.Url + "/Lists/Blist" + "/NewForm.aspx?AIID=" + sAIAuditID.ToString() + "&ContentTypeId=" + sContentTypeID + "&ParentItemID" + Context.Request["ID"]);
    else if (sContentType == "Some Content Type")
    sContentTypeID = "";
    sAIID = thisItem["AIID"].ToString();
    //Redirect to newform.aspx with the Appropriate parameters.
    Context.Response.Redirect(oWeb.Url + "/Lists/AList" + "/NewForm.aspx?AIID=" + sAIID.ToString() + "&ContentTypeId=" + sContentTypeID + "&ParentItemID" + Context.Request["ID"]);
    else if (sContentType == "Some Content Type")
    sContentTypeID = "";
    sAICID = thisItem["AICID"].ToString();
    //Redirect to newform.aspx with the Appropriate parameters.
    Context.Response.Redirect(oWeb.Url + "/Lists/CList" + "/NewForm.aspx?AICID=" + sAICID.ToString() + "&ContentTypeId=" + sContentTypeID + "&ParentItemID" + Context.Request["ID"]);
    else
    LoggingService.LogError("MY.Solution - Processing Page", "No Applicable Content Type Found.");
    catch (Exception ex)
    LoggingService.LogError("My.Solution - Processing Page", ex.Message);
    finally
    //DO SOME FINAL THINGS HERE WHEN REQUIRED.
    In the page I need to use Request.QueryString to get the values from the URL. But when I deploy the solution and load the page I get the error:
    'MY.Solution.Layouts.MY.Solution.processingpage' is not allowed here because it does not extend class 'System.Web.UI.Page'.
    When I change the line:
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="processingpage.aspx.cs" Inherits="MY.Solution.Layouts.MY.Solution.processingpage" MasterPageFile="~/_layouts/application.master" %>
    to inherit as follows:
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="processingpage.aspx.cs" Inherits="Microsoft.SharePoint.WebControls.LayoutsPageBase" MasterPageFile="~/_layouts/application.master" %>
    it does not work either.
    If I change it to inherit like below:
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="processingpage.aspx.cs" Inherits="System.Web.UI.Page" MasterPageFile="~/_layouts/application.master" %>
    it also does not work.
    What does this error actually mean?  And why doesn't the default code generated by Visual Studio work?

    @NadeemYousuf I have tried this too and it didn't work.  
    What does the error even mean?  And why does the error appear with default Visual Studio code?  In my example I have just added a basic application page with no other code in it and it still does not work.

Maybe you are looking for

  • Print Job Error in F110

    Hi all,      I am getting an error when I try to schedule print job in F110. After giving the Run date and identification, I am clicking on the printout button and filling the scheduling details there. But when I take the payment log, it is showing t

  • CCM Publisher issue

    wh have CCM version5.1 and the publisher keeps on rebooting. Any idea why this could be happening or has anyone come across this problem before

  • What is the best way to erase half of an image but keep the other half of the image and make it look real

    I have an image of bracelet with a tube in the middle and need to erase the tube but keep the bracelet to make it look as though the tube was never there, what's the best tool in CS6 to use

  • How do I prioritize 256 bit encryption over the 128 bit variant?

    Hello folks, been using the fox for ages now. Thanks for the fine product :) . Up to now I also never had a problem I couldn't find a solution for, but strangely enough, that one gets me, since I seem to be unable to find an option allowing me to dea

  • I'm buying the iPhone 5 tomorrow (currently have the 4s)

    how do I make sure all my sms texts transfer from my current phone to my new one? I backed it up on my itunes, and I'm not backing up on iCloud (says it'll take 3 hours) I made sure all my photos are synced up, but I'm really concerned about my texte