function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Gerald GeorgeGerald George 

post fields from web to lead form with mvc c# both to salesfoce and sql

I want to post form fields from my web page into salesforce via web to lead and also in my local database.  Can anyone show me how to do this with .Net mvc c# ? I have common fields like user name,email,phone etc 
Please look at my code here

my code
<script type="text/javascript">
        function submitPractice() {
                oid: '00D20000000l2qZ'
                //, debugEmail: ''
 , first_name: $("#PracticeUserDetail_FirstName").val()
 , last_name: $("#PracticeUserDetail_LastName").val()
 , email: $("#Email").val()
 , country_code: $("#PracticeUserDetail_Country").val()
 , lead_source: 'web demo'
 , description: 'This is an automated transparent lead'

            var formData = JSON.stringify($("#practiceform").serializeArray());
                type: "POST",
                url: "/Account/Practice",
                data: formData,
                success: function () { },
                dataType: "json",
                contentType: "application/json"

function webToLead(fields) {
 var customHiddenIframeName='JLA_API';
  var theiFrame=document.createElement("iframe");;;
 fields['retURL'] = '';//dummy URL
 var form = document.createElement("form");
 form.method = "POST";
 form.action = "";
 form.setAttribute("target", customHiddenIframeName);
 for (var fieldName in fields) {
  var theInput = document.createElement("input");;
  theInput.setAttribute("type", "hidden");