Hello everybody.
I am facing the following problem:
I put the following script code
<script type="text/javascript">
function ShowPopUpDialog(message)
{
$.dnn
{
okText: 'CLOSE',
text: '<div id="idpopup"> <span class="centraliza">' + message + '</span></div>',
title: 'Aviso'
});
};
</script>
And the Code Behind:
protected void Page_Load(object sender, EventArgs e)
{
PopMessageBox("Teste");
}
private string getCode(String message)
{
StringBuilder sb1 = new StringBuilder();
sb1.AppendLine("ShowPopUpDialog('" + message + "')");
return sb1.ToString();
}
public void PopMessageBox(String message)
{
ScriptManager requestSM = ScriptManager.GetCurrent(Page);
if (requestSM != null && requestSM.IsInAsyncPostBack)
{
ScriptManager.RegisterStartupScript(this, typeof(Page), Guid.NewGuid().ToString(), getCode(message), true);
}
else
{
Page.ClientScript.RegisterStartupScript(typeof(Page), Guid.NewGuid().ToString(), getCode(message), true);
}
}
If I'm logged in with 'Super User Account', it works well. But if I'm not logged in or logged in with others accounts, it don't work.
Using DNN6 worked perfectly.
Anyone have any idea what could be the problem?