---
title: "how i can call a model popup with data by using jquery in mvc"  
description: "how i can call a model popup with data by using jquery in mvc"  
author: "Samuel Fernandes"  
published: 2017-08-24  
updated: 2017-10-27  
canonical: https://www.mindstick.com/forum/34333/how-i-can-call-a-model-popup-with-data-by-using-jquery-in-mvc  
category: "asp.net mvc"  
tags: ["mvc4"]  
reading_time: 1 minute  

---

# how i can call a model popup with data by using jquery in mvc

I have been created a [mvc application](https://www.mindstick.com/forum/12932/how-to-consume-webservices-from-asp-dot-net-mvc-application) and i want when i [click](https://www.mindstick.com/articles/12423/social-login-magento-2-one-click-to-register-social) a particular [button](https://www.mindstick.com/articles/63/how-to-add-button-in-datagridview-in-csharp-dot-net) (*Browse*) then a [model](https://yourviews.mindstick.com/view/81334/america-is-reopening-after-corona-lockdown-but-on-swedish-model) [popup](https://www.mindstick.com/blog/11734/how-to-create-advanced-popup-or-banners-with-news-images-discounts-in-magento2) [window](https://www.mindstick.com/forum/161285/how-does-the-window-console-object-work-in-javascript) will be open and it contain all record of [student](https://www.mindstick.com/articles/157138/student-loan-default-wage-garnishment-and-student-loan) by using jQuery and Ajax .But i can not do this what is [problem](https://yourviews.mindstick.com/view/81399/tackling-the-problem-of-unemployment-during-corona-pandemic) in my [jQuery code](https://www.mindstick.com/forum/157821/write-a-jquery-code-that-selects-all-the-checkboxes-in-a-form-when-a-select-all-button-is-clicked) please help..\

```
$('#btnShow').click(function () {            $('.modal-body').ajax("@Url.Action("AllUserList", "Home")");            $('#divDialog').modal({ show: true });        });
```

## Replies

### Reply by Sarahh K.

Hi Samuel, I would prefer bootstrap modal for this task. \

### Reply by Niraj Kumar Mishra

Hi Samuel. Your code is very fine but a little mistake.\
Correct code is.\

```
$('#btnShow').click(function () {            $('#divDialog').modal({ show: true });            $('.modal-body').load("@Url.Action("AllUserList", "Home")");        });
```

Now, you can use this code it give correct answer\


---

Original Source: https://www.mindstick.com/forum/34333/how-i-can-call-a-model-popup-with-data-by-using-jquery-in-mvc

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
