c# - open browser instance from $ajax -


i trying open new browser instance popup show contents of file not staying in same page?

    $(document).ready(function (event) {          $.ajax({             type: 'post',             url: "/home/index"         });      })   public actionresult index()     {         return file(@"c:\textfile1.txt", "text/plain");     } 

what without ajax?

$(document).ready(function (event) {     window.open('/home/index', 'window name') }) 

if require ajax, because need post data

$(document).ready(function (event) {     $.ajax({         type: 'post',         url: "/home/index",         success: function( data ) {            var win = window.open('about:blank', 'window name');            $(win.document.body).append(data);         }     }); }) 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -