Question: From this call

```
@using (Ajax.BeginForm("Manage", "Account", new AjaxOptions { HttpMethod = "POST", Confirm = "Você tem certeza que deseja salvar a alteração?", OnSuccess = "close" }))

```

the OnSuccess function is called and execute the following:

```
    function close(json) {
    $('"#' + json.param1 + '"').dialog("close");
    alert(json.Message);
}

```

and I get this error:

```
Error: Syntax error, unrecognized expression: "#UserSettings"

```

[Break On This Error] 

throw new Error( "Syntax error, unrecognized expression: " + msg );

`$('#UserSettings').dialog("close");` works fine so I don´t get why the error.

Answer: 
You do not need the extra double quotation marks in your jQuery selector. It should be:

```
$('#' + json.param1).dialog('close');

```
try

```
$('#' + json.param1).dialog("close");

```

The double-quotes I think is where you are having an issue.