---
title: "How to hide modal popup window in success method"  
description: "How to hide modal popup window in success method"  
author: "Anonymous User"  
published: 2017-12-07  
updated: 2017-12-07  
canonical: https://www.mindstick.com/forum/34387/how-to-hide-modal-popup-window-in-success-method  
category: "c#"  
tags: ["c#", "asp.net mvc", "mvc", "mvc4", "razor"]  
reading_time: 1 minute  

---

# How to hide modal popup window in success method

Hi,

I want to know, how to hide [modal popup](https://www.mindstick.com/articles/13038/crud-operation-searching-paging-in-mvc-with-modal-popup) on [success](https://www.mindstick.com/articles/12957/best-tips-to-make-your-ghostwriting-experience-a-success) [method](https://www.mindstick.com/forum/166/webservice-method) in my [javascript](https://www.mindstick.com/articles/874/how-to-create-watermark-text-for-textbox-by-using-javascript) [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii).

Here is my code, please give me some idea:

```
if (response.success) {
                   }
```

## Replies

### Reply by Hemant Patel

Hi LINNEA ELLERY,

Please follow below line of code to achieved your task.

```
if (response.success) {
            $('#modalDialogId').modal('hide');
        }
```


---

Original Source: https://www.mindstick.com/forum/34387/how-to-hide-modal-popup-window-in-success-method

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
