Cheers!
Well! i'm trying to show a Jquery UI Dialog from codebehind! these are my jquery functions!
<script language="javascript" type="text/javascript">
$(document).ready(function ()
{
//CUADRO DE DIALOGO EXITOSO
$('#Success').dialog({
autoOpen: false,
draggable: true,
title: "Ingreso Exitoso",
open: function (type, data) {
$(this).parent().appendTo("form");
}
});
});
//ABRE CUADRO DE DIALOGO JQUERY UI
function showDialog(id)
{
$('#' + id).dialog("open");
}
//CIERRA CUADRO DE DIALOGO JQUERY UI
function closeDialog(id)
{
$('#' + id).dialog("close");
}
</script>
And this is my c# code!
protected void btn_nuevoIngreso_Click(object sender, ImageClickEventArgs e)
{
OpenDialog("Success");
}
private void OpenDialog(string dialogId)
{
string script = "showDialog('" + dialogId + "');";
ScriptManager.RegisterStartupScript(this, typeof(Page), "openpopup", script, true);
UPnl_Success.Update();
}
I have my dialog in a div! and inside the div i have an updatepanel with one asp: button on it! The code posted before is not working! if you can help me i'll appreciate it a lot!
PD: Sorry for my english!!
pD2: I'm using a masterpage (with the script references) and this functions are in the childpage.aspx! Also, the tolscriptmanager is in the masterpage ;)
Thanks in advance!