"jquery save method" Code Answer's
You're definitely familiar with the best coding language Javascript that developers use to develop their projects and they get all their queries like "jquery save method" answered properly. Developers are finding an appropriate answer about jquery save method related to the Javascript coding language. By visiting this online portal developers get answers concerning Javascript codes question like jquery save method. Enter your desired code related query in the search bar and get every piece of information about Javascript code related question on jquery save method.
jquery save method
<script type="text/javascript">
$(document).ready(function () {
$("#Button1").click(function () {
$.ajax({
type: 'POST',
contentType: "application/json;charset=utf-8",
url: 'Default2.aspx/InsertMethod',
data: "{'username':'" + document.getElementById('txtusername').value + "','password':'" + document.getElementById("txtpassword").value + "'}",
async: false,
success: function (response) {
$('#txtusername').val('');
$('#txtpassword').val('');
alert("record has been saved in database");
},
error: function () {
console.log('there is some error');
}
});
});
});
Source: stackoverflow.com
jquery save method
[WebMethod]
public static string InsertMethod(string username, string password)
{
SqlConnection con = new SqlConnection();
con.ConnectionString = ConfigurationManager.ConnectionStrings["con"].ConnectionString;
con.Open();
SqlCommand cmd = new SqlCommand("insert jquerydata values('" + username + "','" + password + "'", con);
cmd.CommandType = CommandType.Text;
cmd.ExecuteNonQuery();
cmd.Dispose();
con.Close();
return "true";
}
Source: stackoverflow.com
jquery save method
SqlCommand cmd = new SqlCommand("insert jquerydata values('" + username + "','" + password + "'", con);
Source: stackoverflow.com
All those coders who are working on the Javascript based application and are stuck on jquery save method can get a collection of related answers to their query. Programmers need to enter their query on jquery save method related to Javascript code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about jquery save method for the programmers working on Javascript code while coding their module. Coders are also allowed to rectify already present answers of jquery save method while working on the Javascript language code. Developers can add up suggestions if they deem fit any other answer relating to "jquery save method". Visit this developer's friendly online web community, CodeProZone, and get your queries like jquery save method resolved professionally and stay updated to the latest Javascript updates.