# Show-ModalDialog

Shows Sitecore Sheer control as a modal dialog.

## Syntax

```powershell
Show-ModalDialog -Control <String> [-Parameters <Hashtable>] [-HandleParameters <Hashtable>] [-Title <String>] [-Icon <String>] [-Width <Int32>] [-Height <Int32>] [<CommonParameters>]

Show-ModalDialog -Url <String> [-HandleParameters <Hashtable>] [-Title <String>] [-Icon <String>] [-Width <Int32>] [-Height <Int32>] [<CommonParameters>]
```

## Detailed Description

Shows Sitecore Sheer control as a modal dialog. If control returns a value - the value will be passed back as the result of the command execution.

© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions

## Parameters

### -Control \<String>

Name of the Sitecore Sheer control to show

| Aliases                     |       |
| --------------------------- | ----- |
| Required?                   | true  |
| Position?                   | named |
| Default Value               |       |
| Accept Pipeline Input?      | false |
| Accept Wildcard Characters? | false |

### -Url \<String>

A fully formed URL that constitutes a control execution request.

| Aliases                     |       |
| --------------------------- | ----- |
| Required?                   | true  |
| Position?                   | named |
| Default Value               |       |
| Accept Pipeline Input?      | false |
| Accept Wildcard Characters? | false |

### -Parameters \<Hashtable>

Hashtable of parameters to pass to the control in the url.

| Aliases                     |       |
| --------------------------- | ----- |
| Required?                   | false |
| Position?                   | named |
| Default Value               |       |
| Accept Pipeline Input?      | false |
| Accept Wildcard Characters? | false |

### -HandleParameters \<Hashtable>

| Aliases                     |       |
| --------------------------- | ----- |
| Required?                   | false |
| Position?                   | named |
| Default Value               |       |
| Accept Pipeline Input?      | false |
| Accept Wildcard Characters? | false |

### -Title \<String>

Title of the control dialog.

| Aliases                     |       |
| --------------------------- | ----- |
| Required?                   | false |
| Position?                   | named |
| Default Value               |       |
| Accept Pipeline Input?      | false |
| Accept Wildcard Characters? | false |

### -Width \<Int32>

Width of the control dialog.

| Aliases                     |       |
| --------------------------- | ----- |
| Required?                   | false |
| Position?                   | named |
| Default Value               |       |
| Accept Pipeline Input?      | false |
| Accept Wildcard Characters? | false |

### -Height \<Int32>

Height of the control dialog.

| Aliases                     |       |
| --------------------------- | ----- |
| Required?                   | false |
| Position?                   | named |
| Default Value               |       |
| Accept Pipeline Input?      | false |
| Accept Wildcard Characters? | false |

## Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

* Sitecore.Data.Items.Item

## Outputs

The output type is the type of the objects that the cmdlet emits.

* System.String

## Notes

Help Author: Adam Najmanowicz, Michael West

## Examples

### EXAMPLE

```powershell
PS master:\> Show-ModalDialog -Control "ConfirmChoice" -Parameters @{btn_0="Yes (returns btn_0)"; btn_1="No (returns btn_1)"; btn_2="return btn_2"; te="Message Text"; cp="My Caption"} -Height 120 -Width 400
```

### EXAMPLE

```powershell
Show-ModalDialog -Control "PowerShellRunner" `
    -Parameter @{
        id="{110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9}";
        db="master";
        lang="en";
        ver="1"
        scriptId="{16670A5E-AA62-4EE2-A9C3-C8466BEB45C2}"
        scriptDb="master"
    }
```

## Related Topics

* [Read-Variable](/appendix/common/read-variable.md)
* [Show-Alert](/appendix/common/show-alert.md)
* [Show-Application](/appendix/common/show-application.md)
* [Show-Confirm](/appendix/common/show-confirm.md)
* [Show-FieldEditor](/appendix/common/show-fieldeditor.md)
* [Show-Input](/appendix/common/show-input.md)
* [Show-ListView](/appendix/common/show-listview.md)
* [Show-Result](/appendix/common/show-result.md)
* [Show-YesNoCancel](/appendix/common/show-yesnocancel.md)
* [#1336](https://github.com/SitecorePowerShell/Console/issues/1336)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.sitecorepowershell.com/appendix/common/show-modaldialog.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
