1

I have a Form based authentication website in SharePoint 2010 . Now I want to create a custom registration web part in which users themselves can register on the website and can get their account created.

Remember the backend of users information will be in SQL server. My main problem is that I'm not quite sure how to connect SharePoint webpart or SharePoint application page with SQL server.

How to store the values of a custom form in SQL Server?

For ex , I have placed a text box for username and I want that when users save the info the value should get stored in SQL server table.

Also if I can similarly display the values of column into the fields so that user can edit their info.

1 Answer 1

0

If you want to use the FBA Pack's Membership Request web part on the login page, I've listed instructions here: https://sharepoint2013fba.codeplex.com/discussions/647777


If you want to add a web part on an application page, you can add it to the ASPX just like you would a standard control. Here's an example of how I do it for custom login pages:

first you need a register directive to the assembly that contains the control:

<%@ Register TagPrefix="FBA" Namespace="Visigo.Sharepoint.FormsBasedAuthentication"
    Assembly="Visigo.Sharepoint.FormsBasedAuthentication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9dba9f460226d31d" %>

And then in the body you can just reference the control itself:

<FBA:MembershipRequestWebPart frametype="None" chrometype="None" id="PasswordWebPart" runat="server" 
    groupName="FBA Users"
    HipErrorMessage="<br>The characters do not match the picture"
    CaptchaValidation="false"
    AutoGeneratePassword="false"
     />

As for adding custom fields to the FBA Pack web part, I usually store the values in SharePoint on the user's profile. To add the custom fields, i'd just search the code for an existing field (I usually search for 'email') - and then copy the logic for the new field.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.