Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @(Html.Kendo().Button()
- .Name("btnSubmit")
- .HtmlAttributes(new { type = "button", title= "Report1", url = "/Controller1/Method1/" })
- .Icon("k-icon k-i-file-txt")
- .Content("View Details")
- .Events(e => e.Click("ShowDetails"))
- )
- function ShowDetails() {
- var URL = this.element.attr("url")
- $('#win_wnd_title').text(this.element.attr("title"));
- $.ajax(
- {
- url: URL,
- type: 'post',
- dataType: "html",
- data: ?
- contentType: 'application/json; charset=utf-8',
- success: function (result) {
- var dialog = $("#win").data("kendoWindow");
- $("#dataWin").html(result);
- dialog.open();
- showLoaderPopup();
- }
- })
- }
- If (flag == 1)
- {
- var myData = JSON.stringify({ ID: id, Amount: amount, Desc: desc });
- }
- else
- {
- var myData = null
- }
- $.ajax(
- {
- .
- .
- .
- data: myData
- }
- )
- Button()
- .Name("btnSubmit")
- .HtmlAttributes(new { type = "button", title= "Report1", url = "/Controller1/Method1/", sendData = "true" })
- .Icon("k-icon k-i-file-txt")
- .Content("View Details")
- .Events(e => e.Click("ShowDetails"))
- )
- function ShowDetails() {
- var URL = $(sender).data('url');
- var myData = null;
- if($(sender).data('sendData') == "true")
- {
- myData = JSON.stringify({ ID: id, Amount: amount, Desc: desc });
- }
- $.ajax(
- {
- ...
- data: myData
- success: function (result) {
- ...
- }
- })
Add Comment
Please, Sign In to add comment