Captcha in Visual Webpart SharePoint 2013

I want to insert a captcha control like below in my visual web part in sharepoint 2013.
Please suggest how can i achieve this.

Hello,
Hope the below link helps you
http://recaptchaforsp.codeplex.com/
http://www.etechplanet.com/blog/create-captcha-image-using-c-and-aspnet.aspx
Please remember to click 'Mark as Answer' on the answer if it helps you

Similar Messages

  • AppGlobalResource File In Visual Webpart SharePoint 2013

    Hi,
    I am trying to get resource file entry in the visual web part but wen i try to deploy the solution it's showing an error as below.
    Error    14    The name 'MyResourceFile' does not exist in the current context    C:\Users\Administrator\Documents\Visual Studio 2012\Projects\MySolution\MySolution\WebParts\Test\Test.ascx.g.cs    56  
     60    MySolution
    What i did:
    I right click on my project name and choose "Add" >> "New Item"
    In the next dialog select the "Empty Element" and name it e.g. "GlobalResources"
    Now click right on the new "GlobalResources" folder (Module) and add a new resource file.
    I named it MyResourceFile.resx
    Enter some keys and values in the resource file
    In the next step click on the MyResourceFile.resx file to display the properties. Change the "Deployment Type" attribute to "AppGlobalResource".
    Now i created a asp literal control and in the text property i did the following
    <asp:Literal ID="litControl" runat="server" Text="<%$ Resources:MyResourceFile, Name %>"></asp:Literal>
    and then i tried to deplo the solution i get the following error
    Error    14    The name 'MyResourceFile' does not exist in the current context    C:\Users\Administrator\Documents\Visual Studio 2012\Projects\MySolution\MySolution\WebParts\Test\Test.ascx.g.cs    56  
     60    MySolution
    Please let me know what am i missing,actually i want to deploy my resource files under the AppGlobalResource folder.

    I am trying to get value from the resource file but not able to deploy my solution.
    I  added an empty element in my solution and then added resource file in it,after that i used to get resource file value in the mark up file like this
    <asp:Literal ID="litControl" runat="server" Text="<%$ Resources:MyResourceFile, Name %>"></asp:Literal>
    but when i build/deploy the solution i am getting the following error.
    The name 'MyResourceFile' does not exist in the current context.
    Note: I am using SharePoint 2013 and using Visual Studio 2012 Premium edition,and this issue is occuring in both sandboxed and farm solution.
    please help.

  • Error In Visual WebPart SharePoint 2013

    So I was creating a SharePoint 2013 visual web part on Visual Studio 2012 and came to this problem. Visual Studio automatically creates WebPartUserControl.ascx.cs and WebPartUserControl.ascx.g.cs. the WebPartUserControl.ascx.g.cs is generated automatically
    when you edit the WebPartUserControl.ascx file. So I've added a couple of ContentTemplate tags into .ascx file and Visual Studio generated this code in WebPartUserControl.ascx.g.cs :
    public partial class WebPartUserControl {
       public static implicit operator global::System.Web.UI.TemplateControl(AjaxVisualWebPart target)
           return target == null ? null : target.TemplateControl;
    When I try to deploy the solution, Visual Studio underlines the implicit operator
     global::System.Web.UI.TemplateControl and
    I get this error:
    Namespace.WebPart.WebPartUserControl.implicit operator
    System.Web.UI.TemplateControl(Namespace.WebPart.WebPartUserControl)':
    user-defined conversions to or from a base class are not allowed
    I don't even imagine how to solve this even though im struggling on this issue for a couple of hours now... Can somebody help me, please? I assume I have to add something to the .ascx file or to WebPartUserControl.ascx.cs maybe? Thanks in advance!

    Hi somu1,
    I suggest you check if the parameter is valid in the function.
    By default, the parameter is the same as you class name like below:
    public partial class HelloWorldWebPart {
    public static implicit operator global::System.Web.UI.TemplateControl(HelloWorldWebPart target)
    return target == null ? null : target.TemplateControl;
    Here is a detailed code demo for your reference:
    A look at Visual Web Parts in Visual Studio 11
    Best Regards
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Zhengyu Guo
    TechNet Community Support

  • 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

  • Using CreatedModifiedInfo in custom webpart SharePoint 2013

    We've used those lines of code in SharePoint 2010 for a long time and we never had any issues with them. We've created a custom webpart and added the modifiedinfo toolbar to the bottom. Now we've moved our site from SP2010 to a SP2013 while still using SP2010
    UI. So we're still in 2010 mode while this problem occurs.
    internal static void AddToolBarInfo(this ToolBar toolBar, SPControlMode mode)
    info = new CreatedModifiedInfo();
    info.ControlMode = mode;
    toolBar.Buttons.Controls.Add(info);
    The control is added properly but no information are shown inside the toolbar. Somehow not many persons have used this toolbar, so I'm not able to find many informations about it. Since we've never done more than adding the control, I don't know where to
    start looking when the control is not properly filled.
    Regards Andreas MCPD SharePoint 2010. Please remember to mark your question as "answered"/"Vote helpful" if this solves/helps your problem.

    Has anyone used the CreatedModifiedInfo before in his code?
    Regards Andreas MCPD SharePoint 2010. Please remember to mark your question as "answered"/"Vote helpful" if this solves/helps your problem.

  • Sharepoint 2013 -webpart question

    hi,
    I need to create a page that will display list items based on a value users enter in drop-down or text box. This would contain the months of the year.  Then, I need to display the list items based on that selection.  I would include the month
    field  in that list.
    Is there a web part that will do this?  My manager doesn't want me to create a content query web part, he wants it out of the box.
    Thanks
    mhoran

    hi
    use list view web part+filter webpart
    SharePoint 2013 Out of Box Web Parts
    yaşamak bir eylemdir

  • Asynchronous visual webpart for SharePoint 2013

    HI,
    How to create asynchronous visual webparts in SharePoint 2013 (VS 2012) . I can see lot of examples for 2010 version, but not for SP 2013.
    I have 2 visual webparts, which I want to make it as a asynchronous webpart. One webpart has the code written in Javascript client object model(loads lot of images), another is a server side webpart which has a SPGridview.
    Is there any sample code available for SP 2013?
    Thanks

    Hi,
    Please try to convert the SharePoint 2010 project to SharePoint 2013.
    http://sadomovalex.blogspot.kr/2013/02/convert-visual-studio-sharepoint-2010.html
    In SharePoint 2013, we can create a visual web part, then we can use jQuery Ajax and REST API to achieve asynchronous data loading.
    More information:
    http://www.dotnetcurry.com/showarticle.aspx?ID=1009
    http://asyncwebpartframewrk.codeplex.com/releases/view/52459
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • SharePoint 2013 Query string parameter pass between visual webparts

    Hi,
    I have created one web part called Latest News in SharePoint 2013 which is
    visual web part(Sandbox Solution).
    In that, there is button called "Read More". Now when I click on that button I want to show only that item in the new page which is clicked using query string. but the data which will be shown after Read More button will be coming
    from a different Visual Web Part.
    How should I pass a query string value from one visual webpart to another visual webpart in SharePoint 2013 ?
    Could anyone please help me like how we can pass.
    Thanks in Advance.

    Hi,
    To pass information from one web part to another, we can use the consumer and provider web part with the
    IWebPartParameters interface.
    There are some articles about this topic, you can refer to them.
    http://msdn.microsoft.com/en-us/library/office/ms469765(v=office.14).aspx
    http://www.c-sharpcorner.com/UploadFile/40e97e/sharepoint-2010-connected-web-parts/
    http://underthehood.ironworks.com/2011/03/how-to-build-a-consumer-web-part-in-sharepoint-2010-using-iwebpartparameters-that-works-with-html-fo.html
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Could not load file or assembly AjaxToolkit error in SharePoint 2013 Visual Webpart

    I wanted to use ajax controls in visual webpart for sharepoint 2013 so i followed steps.
    1-I cut this snippet (see below) from <head></head> Section and paste in <body></body> Section for my master page since it's a requirement for SharePoint 2013 ajax functionality.
    Snippet:
    <!--MS:<SharePoint:AjaxDelta id="DeltaSPWebPartManager" runat="server">-->
    <!--MS:<WebPartPages:SPWebPartManager runat="server">-->
    <!--ME:</WebPartPages:SPWebPartManager>-->
    <!--ME:</SharePoint:AjaxDelta>-->
    2-downloaded a latest ajax tool kit and then added ajax toolkit dll from the toolkit library in my solution's bin-->debug folder
    now add ajax entries in web.config in these sections
    in <SafeControls>
          <SafeControl Assembly="ajaxcontroltoolkit, Version=4.1.7.1213, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e, processorArchitecture=MSIL" Namespace="AjaxControlToolkit" TypeName="*" />
    in <assemblies>
    <add assembly="AjaxControlToolkit, Version=4.1.7.1213, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" />
    in <controls>
    <add tagPrefix="ajax" namespace="AjaxControlToolkit" assembly="AjaxControlToolkit, Version=4.1.7.1213, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" />
    finally registered ajax in visual web part as 
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxtoolkit" %>
    added following calender control
    <asp:TextBox MaxLength="10" ID="txtToDate" runat="server" CssClass="FormTextBoxSmall"></asp:TextBox>
    <asp:ImageButton ID="calReqDateTo" runat="server" ImageUrl="" />
    <ajaxtoolkit:CalendarExtender id="CalendarExtender2" runat="server" targetcontrolid="txtToDate"
        format="dd/MM/yyyy" popupbuttonid="calReqDateTo" />
    reset iis and deployed my solution but when i deployed it throws error 
    "could not load file or assembly AjaxToolkit,Version=4.1.7.1213 "
    please help

    Hi,
    In this below thread they have discussed and resolved your issue.
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/60fa19fe-86a0-446b-b61f-11a82fe4287f/how-to-implement-ajax-toolkit-for-sharepoint2013?forum=sharepointdevelopment&prof=required
    Please let us know if you need further details
    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

  • Visual Webpart Sandboxed Solution Error in SharePoint 2013

    I am trying to insert a visual web part using sand boxed solution on a page.But when i insert a web part on page i get the following error.
    "Web Part Error: Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust app domain: The type is not registered as safe".
    Please suggest how do i get rid off this error as I've to use sand boxed solutions not farm solution.

    Hi ,
    According to your description, my understanding is that you got an error when you used visual web part solution in SharePoint 2013.
    Whether you have enabled the web part solution in Site Collection Administrator->Site Collection features.
    Whether there were some non-authorized methods called in your code.
    Here are some similar posts for you to take a look at:
    http://blogs.msdn.com/b/vincent_runge/archive/2010/05/12/support-answers-on-sandboxed-solutions-in-sharepoint-2010.aspx
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/8573ec4c-8fdb-40f5-b730-250174a08efb/sandbox-solutions-with-web-parts-upgrade-error?forum=sharepointdevelopmentprevious
    http://sharepoint.stackexchange.com/questions/59679/sandbox-unhandled-exception-was-thrown-partial-trust-app-domain
    http://scrum.codeplex.com/workitem/11222
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Installing and deploying a .webpart file in SharePoint 2013

    I have a webpart that took from a SharePoint 2010 web site from its webparts library. This webpart has the .webpart extension. I downloaded it as a copy. Now I want to install it to a SharePoint 2013 site ti its webpart gallery. I tried using Visual Studio
    by opening the .webpart file and copy its XML to the new empty .webpart source code. Also I uploaded the .webpart file to the Sharepoint 2013 WebPart Library. That also not successful. There was an error regarding when I insert the webpart to a page with a
    Correlation ID.
    The error is at the below.
    Unable to display this web part. To troubleshoot the problem, open this web page in a Microsoft SharePoint Foundation compatible HTML editor such as ...........................
    Correlation ID: cb3b839c-b011-e0f5-999c-31292d78623c
    Then how am I supposed to do this properly. I am new to Sharepoint.
    Could someone please help me to solve this matter?
    Thank you,
    Regards,
    Chiranthaka

    What web part is it?  Is it a custom / third party one?
    Also, more information on the .webpart structure might be handy -
    http://www.wictorwilen.se/Post/Web-Part-Properties-part-3-the-webpart-file.aspx
    Steven Andrews
    SharePoint Business Analyst: LiveNation Entertainment
    Blog: baron72.wordpress.com
    Twitter: Follow @backpackerd00d
    My Wiki Articles:
    CodePlex Corner Series
    Please remember to mark your question as "answered" if this solves (or helps) your problem.

  • SharePoint DatePicker is not working in Visual webpart

    Hi,
    The sharepoint date picker is not working for Visual webparts created in VS 2012 (SP 2013).
    In my visual webpart, I added the form digest, and then the sharePoint date control.
    <script type="text/javascript" src="/_layouts/15/datepicker.js"></script>
    <SharePoint:DateTimeControl ID="dtDate" runat="server" DateOnly="true" />
    I get the "/ error in Application". Many websites are saying to add the below line to the datepicker:
    <SharePoint:DateTimeControl ID="dtDate" runat="server"
    DateOnly="true" DatePickerFrameUrl="<%
    $SPUrl:~sitecollection/_layouts/15/iframe.aspx %>" />
    But adding the "DatePickerFrameUrl" gives error in the "InitializeControl()" method available in OnInit().
    Error: The name InitializeControl does not exist in the current context.
    I have checked this:
    http://developmentsimplyput.blogspot.in/2013/04/sharepoint-datetimecontrol-issue-when.html
    http://sharepoint.stackexchange.com/questions/57092/sharepointdatetimecontrol-crashes-in-sp2013-webpart
    but did not solve the issue. Also creating a root site for just a DatePicker control is not an option for me.
    Has anybody found a solution to this?
    How to use the SharePoint datepicker in visual webpart for SP 2013?
    Thanks

    hi
    did you try to investigate the initial error more deeply, e.g. check stack trace in the logs? In our case it worked quite straightforward (but it was in SP2010) by adding the following control on ascx control:
    <SharePoint:DateTimeControl ID="Foo" OnDateChanged="StartTimeChanged" HoursMode24="true" FirstDayOfWeek="1" AutoPostBack="true" runat="server" />
    If it is problematic to check logs, you may create custom control which inherits OTB DateTimeControl, override appropriate methods in it and then check the error in debugger:
    public class MyDateTimeControl : DateTimeControl
    Blog - http://sadomovalex.blogspot.com
    Dynamic CAML queries via C# - http://camlex.codeplex.com

  • How to Add a User Control to a SharePoint 2013 Visual Web Part ?

    Hi,
    1.I have created SharePoint 2013 Farm Solution through VS 2012.
    2.Added visual Web part
    3.Created a User control (Farm Solution ) and added some Control From tool Box.
    4.Drag and drop user control from solution explorer to visual web part.
    so its  Register tag and with prefix tag user controls automatically added on visual web part source. when i try to build solution it throws Exception:
    Exception :The name 'InitializeControl' does not exist in the current context.
    Please Provide solution after try/or proper workaround.
    Thanks,
    Siddheshwar

    Site name=http://sitename:22222/
    Visual Web part:
    <%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
    <%@ Assembly Name="Microsoft.Web.CommandUI, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
    <%@ Import Namespace="Microsoft.SharePoint" %>
    <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register Src="~/_controltemplates/15/SP2013Controls/SPControls.ascx" TagPrefix="uc1" TagName="SPControls" %>
    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SPWebpart.ascx.cs" Inherits="SP2013Controls.SPWebpart.SPWebpart" %>
    <uc1:SPControls runat="server" id="SPControls" />
    User Control Code:
    <%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
    <%@ Assembly Name="Microsoft.Web.CommandUI, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.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" %>
    <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SPControls.ascx.cs" Inherits="SP2013Controls.ControlTemplates.SP2013Controls.SPControls" %>
    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><asp:Button ID="Button1" runat="server" Text="Button" />
    Deployement Location:{SharePointRoot}\Template\ControlTemplates\SP2013Controls\
    After User controls added on webpart .g.cs file getting blank.
    After 1st Build:
    'InitializeControl' does not exist in the current context
    The file '/_controltemplates/15/SP2013Controls/SPControls.ascx' does not exist.
    after 2nd Build Try:
    'InitializeControl' does not exist in the current context

  • 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"/>

  • Webpart Install - Very Disappointed with Sharepoint 2013

    I have tried various ways to install various webparts with no success:
    Using STSADM Solution Deployment - which is also being deprecated in Sharepoint 2013
    Also tried Powershell
    Central Administration Interface - deploying solution from there
    Sharepoint Interface (uploading solution and then Webpart)
    All of these methods stop at the deployment stage. I see a message that the Webpart has been added but Install-SPFeature doesn't work and the Webpart is not visible in 'Site Collection Features' to activate.
     I receive an error when trying to run the 'Install-SPFeature' command: "the feature is not a farm level feature"
    Then I opened VisualStudio to modify the Webpart to Farm Level scope (ridiculous!) and finally when I try to deploy and
    STILL does not work!!!
    I have 2 books from Microsoft on Sharepoint Administration - these do not help at all. This is terrible and I don't know how Microsoft is still the standard enterprise solution for content management systems.
    Can anyone please help on this issue?

    Hi Daniel - I didn't see your answers as I hadn't enabled 'Alerts' yet.
    Yes, I attempted to deploy the webpart using Visual Studio. It turns out the issue was related to having 2 servers related to one farm. Adding an alias that both servers point to helped solve this. I was able to deploy the webparts (Nivo Slider and MultiTab)
    - however, the webparts themselves from:
    Listed my 10 plus free Web Parts for SharePoint 2013 and 2010 in Codeplex and listly
    do not work. The jquery libraries were not created in the correct places. I also tried both of these ways of loading the jquery libraries and they did not work.
    Choose SPServices vs. the Client Side Object Model (CSOM)
    I have resorted to adding the jquery script on page directly and loading it from a CDN.

Maybe you are looking for

  • HT1695 how to choose which app to connect?

    Hello, While using cellular data, I don't want all apps that sync online to automatically sync... what shall I do? Regards

  • Mapping Row & Column

    Is it possible for mapping row to column with JDeveloper.

  • My charger's light won't turn on and it won't charge the MacBook

    Hi guys, I have a MacBook that is around 2 years old and last night when I was going to plug in the charger, I didn't see the light turning on I have had this problem before but after 10-60 minutes it went back to normal, now I'm stuck with my unchar

  • Editing Themes in Captivate 7

    I want to edit a theme from Adobe Captivate 7.  I like the layout and features on a provided theme but want to change the colors.  I've saved it as another name but don't know how to open it. I've tried editing the colors in the project I'm in using

  • Problem with sending sms with FM SO_NEW_DOCUMENT_SEND_API1

    Hi All , I'm facing a peculiar issue where the SMS is being sent to one document type but not for second document type. When the code is executed at this FM SO_NEW_DOCUMENT_SEND_API1  in the working scenario  I see that table SOSC is updated with tra