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

How to open .ascx control in Rad window

2 Answers 371 Views
Window
This is a migrated thread and some comments may be shown as answers.
Ash
Top achievements
Rank 1
Ash asked on 10 Sep 2008, 01:58 PM
hi Telerik

Can you please tell if we can open .ascx control in rad window. As though i am able to open aspx pages in rad window when i tried the same code to open .ascx control in rad window i get the error as: 

The request filtering module is configured to deny the file extension.

In the code behind i am doing the following way:

protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)

{

if (e.CommandName == "AddNewSignpost")

{

if ("Criteria".Equals(e.Item.OwnerTableView.Name))

{

GridDataItem current = e.Item as GridDataItem;

if (current is GridDataItem)

{

string ID = current["Criteria Id"].Text;

string arg1 = "CriteriaId=" + ID;

string arg2 = "&AwardId=" + ParentPage.iaward_id;;

string arg3 = "&CTitle=" + current["Title"].Text;

Telerik.Web.UI.

RadWindow newwindow = new Telerik.Web.UI.RadWindow();

newwindow.ID =

"SearchWnd";

newwindow.VisibleOnPageLoad =

true;

newwindow.Modal =

true;

newwindow.Width = 100;

newwindow.Height = 100;

newwindow.Title =

"Add Criterias to Signpost";

newwindow.NavigateUrl =

"~/custom/cmatters/learningportal/awards/controls/Signpostdetail.ascx?" + arg1 + arg2 + arg3;

RadWindowManager1.Windows.Add(newwindow);

}

}
}
And in the aspx page i have added the rad window manager:

<

Telerik:RadWindowManager VisibleOnPageLoad="true" DestroyOnClose="true" Modal ="true" ID="RadWindowManager1" runat="server" /> 

I am using ASP.net 2.0 and telerik version as RadControls for ASPNET AJAX Q1 2008 with IE7. Also the programming language i intend to use is c#

kindly help me and let me know the feasible solution as its critical.


Best Regards
Ash

2 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Tunev
Telerik team
answered on 10 Sep 2008, 02:44 PM
Hi Ash,

The idea behind RadWindow is to be a replacement for the standard browser's popups and the control itself is based on an IFRAME. Like the IFRAME and the popup, RadWindow is simply a container that shows a content page that is different from the parent one and it cannot display user controls directly - they must be put in an aspx page first.



Regards,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Ash
Top achievements
Rank 1
answered on 11 Sep 2008, 08:13 AM
Many thanks Georgi.I have understood now and using aspx to hold the user control and calling page inside the rad window.

Best Regards
Ash
Tags
Window
Asked by
Ash
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Ash
Top achievements
Rank 1
Share this question
or