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

MDI Example question

1 Answer 35 Views
Window
This is a migrated thread and some comments may be shown as answers.
Campbell
Top achievements
Rank 1
Campbell asked on 19 Feb 2013, 07:26 AM
Hi,

I am new to telerik and slowly working my way through the product so please excuse my ignorance.

I have looked at the Window MDI example which I think might be  quite a nice way to present my Dashboards and BI Forms. Where I am a little confused is that in the menu item you place the URL in the value property as opposed to the navigate URL property. The challenge I have is that normally, if using a standard menu, I would put something like ~/Sales/DailySales.aspx in the navigate URL property but the same does not work for the Value property.

In all the examples I have seen the all call external URL's using a fully qualified URL. If I try and use ~/sales/DailySales.aspx it cannot find the page.

What am I doing wrong?

Campbell

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 19 Feb 2013, 12:25 PM
Hello Campbell,

If you examine the demo's scripts you will see that the value is used to obtain the string that is used as the URL for RadWIndow. Note that this must be a client-side resolvable URL, one you could type in the browser and have it work - either an absolute, or a relative path is needed. The tilde symbol (~) is used to represen the site root on the server and the browser cannot read it. You could replace it with a slash (/) on the client in most cases. Another reason why the Value is used is to prevent the default action of a menu with a NavigateUrl - taking the browser to this page. If you are building your menus in the code-behind you can concatenate the URL with ResolveUrl("~/"); to get the root.

Said shortly, you would need an URL in the following format:
<telerik:RadMenuItem Text="First" ImageUrl="images/first.png" Value="myFirstPage.aspx">
</telerik:RadMenuItem>

because the browser cannot resolve "~/myFirstPage.aspx" and thus, neither can RadWindow. This works in server controls that direcrly use this because they resolve it internally (see the ResolveUrl() method) which is not the case here.

Kind regards,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Window
Asked by
Campbell
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or