This is a migrated thread and some comments may be shown as answers.

Show RadWindow after server code runs

2 Answers 114 Views
Window
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 13 Feb 2011, 09:36 PM
I have a web form which saves a record to the database via server-side code, but then upon postback, I want to show the RadWindow i created.  I dont want the radwindow to show initially when the page loads.  Its only when the user clicks the Save button on the form, which runs server-side code, but then I need to invoke the RadWindow to show.  How do I do this? 

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 14 Feb 2011, 05:12 AM
Hello,


Here is the sample code which allows you to open RadWindow using server code.

Code:
protected void Button1_Click(object sender, EventArgs e) 
    RadWindow window1 = new RadWindow(); 
    window1.NavigateUrl = "http://www.google.com"
    window1.VisibleOnPageLoad = true
    window1.Width = 500; 
    window1.Height = 300; 
    this.form1.Controls.Add(window1); 
}


Also, the following forum shows one more option to open window from code:
Want to pop up window from server side

Thanks,
Princy.
0
Dan
Top achievements
Rank 1
answered on 17 Feb 2011, 06:54 PM
Initially the your code did not work.  But upon investigation, I had my form in an update panel which wasn't getting submitted back to the server. Once I added a the form to get submitted, the rad window came up.
Tags
Window
Asked by
Dan
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Dan
Top achievements
Rank 1
Share this question
or