jQWidgets Forums

jQuery UI Widgets Forums Grid Grid Export options in MVC instead of php

Tagged: ,

This topic contains 1 reply, has 2 voices, and was last updated by  zorgoz 10 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • Gowri
    Participant

    Hi,
    Is it possible to do an export functionality in MVC server side instead of PHP.
    We got enterprise licence hence we can configured PHP in our development environment but while deploying in client environment it will extra burden that client have to configure PHP in his server. So kindly help me with this.

    Thanks in Advance.

    Regards,
    Gowri


    zorgoz
    Participant

    Of course. Just redirect the export url to an action in your application. All the content is generated on client side, so you only have to send it back as attachment.

    public class ExportController : Controller
        {
            [HttpPost]
            [ValidateInput(false)]
            public FileResult Export(string FileName, string Format, string Content)
            {
                var fc = new FileContentResult(System.Text.Encoding.UTF8.GetBytes(Content), "application/vnd.ms-excel");
                fc.FileDownloadName = string.Format("{0}.{1}", FileName, Format);
                return fc;
            }
        }
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.