Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
Showing WebDialogWindow in Content Page from Master Page

Hi everyone

I've defined a WDW in master page with some content. I've intended to make this as a error or information message window. So I want to use it every content page. For example in one of my content page, I'm saving some fields with "Save" button. I've looked around for some code and I've found this JavaScript snippet that works fine.

function showWdw() {
var dialogWindow = $find('');

//Using `show()` method to display the window if the windowState is hidden;

//using `hide()` method to hide the windowState
return false;
// ]]>

But this just show wdw. I want to set the content of wdw dynamically in button's server side onclick event. (for example according to return value of stored procedure, successful or failed). How can I do this on server side ? I've tried some sort of things in server side also.

ScriptManager.RegisterStartupScript(this, typeof (Page), "ShowWDW",
" // ');;return false;} ); // ]]> ",

WebDialogWindow dwMesaj = (WebDialogWindow) this.Master.FindControl("dwMesaj");
Label lblBasarili = (Label) dwMesaj.ContentPane.FindControl("lblBasarili");
dwMesaj.WindowState = DialogWindowState.Normal;
dwMesaj.Visible = true;
lblBasarili.Visible = true;

I've tried them seperately. I've been able to access masters controls but I've couldn't show it. Thanks !