मैं साबुन का उपयोग कर jQuery केसी # WebMethod साथ डेटा को बचाने के लिए एसक्यूएल सर्वर में डेटा नहीं बचा कृपया मेरी मदद कर सकते कोशिश कर रहा हूँ लेकिन मैं साबुन jQuery का उपयोग कर डेटा कैसे बचा सकता है। मैं आईडीई विजुअल स्टूडियो 2015 का उपयोग कर रहा हूं।SQL सर्वर 2012 में साबुन Jquery का उपयोग कर डेटा कैसे सहेज सकता हूं?
<script type="text/javascript">
function SavePersonRecord() {
var Name = $.trim($('#<%=txtName.ClientID %>').val());
var LName = $.trim($('#<%=txtlname.ClientID %>').val());
var Company = $.trim($('#<%=txtCompany.ClientID %>').val());
var Messege = "";
if (Name == '') {
Messege = "Can not Blank Name";
}
if (LName == '') {
Messege += "Can not Blank Last Name";
}
if (Company == '') {
Messege += " Company Name Can not Blank";
}
if (Messege.length == 0) {
$.ajax({
type: "POST",
dataType: "json",
contentType: "application/json; charset=utf-8",
url: "Soap-Service.aspx/InsertPersonRecord",
data: "{'FirstName':'" + Name + "', 'LastName':'" + LName + "','Company':'" + Company + "'}",
success: function (Record) {
$('#txtName').val();
$('#txtlName').val();
$('#txtCompany').val();
if (Record.d == true) {
$('#Result').text("Your Record insert");
}
else {
$('#Result').text("Your Record Not Insert");
}
},
Error: function (textMsg) {
$('#Result').text("Error: " + Error);
}
});
}
else {
$('#Result').html('');
$('#Result').html(Messege);
}
$('#Result').fadeIn();
}
</script>
<table border="0" cellpadding="5" cellspacing="5" style="border: solid 2px Green;">
<tr>
<td colspan="2" style="background-color: red; color: white; font-weight: bold; font-size: 12pt; text-align: center; font-family: Verdana;">Enter Employee Information</td>
</tr>
<tr>
<td>First Name:
</td>
<td>
<asp:TextBox ID="txtName" runat="server" Text="" />
</td>
</tr>
<tr>
<td>Last Name:
</td>
<td>
<asp:TextBox ID="txtlname" runat="server" />
</td>
</tr>
<tr>
<td>Company
</td>
<td>
<asp:TextBox ID="txtCompany" runat="server" />
</td>
</tr>
<tr>
<td></td>
<td>
<asp:Button ID="btnInsertRecord" Text="Save" runat="server" OnClientClick="SavePersonRecord(); return false" />
</td>
</tr>
</table>
कैसे इस सवाल का upvoted होता है? कृपया अपने प्रयासों और एक विशिष्ट समस्या का वर्णन करें। –
@ रोमानोज़ंबे वास्तव में जो मैं सोच रहा था, कुछ कोड (आपके द्वारा किए गए किसी भी कोड) भी सहायक होंगे। –