Hanusha Loujith

Hanusha Loujith

  • NA
  • 292
  • 9k

showing the newly opened window in smaller size like a popup

Jun 12 2021 5:21 PM

Hello,

I am having code to redirect to another page in MVC.net using ajax call. Below is the code which I am using for that purpose.

onClick: function (e) {
                        $.ajax
                            ({
                                type: "GET",
                                url: "/Home1/UploadFile", // the URL of the controller action method
                                  data: { key: selectedKey },
                                success: function (result) {
                                    window.location.href = '@Url.Action("UploadFile", "Home1")';

                             },
                                error: function (req, status, error) {
                                    alert('error');
                                }
                            });
                    }

By using the above code I am able to redirect to another page in full size. But I want to open the new page in a smaller size like a popup. Can someone please let me know what change need to be done?


Answers (1)