JavaScript
$(function () {
$("#btnSubmit").click(function () {
var divContents = $("#Grid").html();
//var encodedStr = Base64.encode(divContents)
//var encodedData = window.btoa(divContents);
// var encdata = encode64(divContents);
var JsonModel = '@Html.Raw(Json.Encode(@Model))';
alert(divContents);
var data = JSON.encode64(divContents.trim().toString());
//alert(data);
// var htmldata = document.getElementById("divhtml").innerHTML;
$.ajax({
type: 'POST',
url: "/PreviewForm4/ExportExcel",
data: '{exportdata: "' + data + '"}',
contentType: "application/json; charset=utf-8",
dataType: "html",
success: function (response) {
},
failure: function (response) {
alert(response.responseText);
},
error: function (response) {
alert(response.responseText);
}
});
});
});
(Note :- Every column appearing in the form has to be filled in words not by dashes and dots)
1. The permanent address(with Telephone no and Mobile no. if any) of the public servant
7 th, Shivaji Nagar, ???????? ??????
,BENGALURU, 630047
Landline: 040-4232324
Mobile Number:7411211953
2. Names of the members of the Family of the public servant and his relationship with each of them (Reg. 'Family', see explanation to section 22 of the Lokayukta Act)
Public Servant
Relationship
Pakala Thulasi Ram
Self
Prameela
Wife
Bhavitha
Daughter
PSC
Father
AM
Mother
3. Present annual income of the public servant and each one of the family members
Public Servant
Relationship
Annual Income (in Rupees)
Pakala Thulasi Ram
Self
400000.00
Prameela
Wife
300000.00
Bhavitha
Daughter
0.00
PSC
Father
600000.00
AM
Rajkiran SwainRank #165 · 14.4K reputationPosted Jun 2, 2023, 4:07 AM EDT
$(function () { $("#btnSubmit").click(function () { var divContents = $("#Grid").html(); var encodedData = btoa(divContents); // Convert HTML data to Base64 $.ajax({ type: 'POST', url: "/PreviewForm4/ExportExcel", data: JSON.stringify({ exportdata: encodedData }), contentType: "application/json; charset=utf-8", dataType: "html", success: function (response) { // Handle success response }, failure: function (response) { alert(response.responseText); }, error: function (response) { alert(response.responseText); } }); }); });Thulasiram pakalaRank #1,835 · 808 reputationPosted Jun 2, 2023, 4:52 AM EDT
Large data action event not call issue if i send small data action event called mvc this code EportEvent not Calling