I have inherited an asp.net project that relies heavily on the Telerik library. In the current application, there are two menu items that when clicked generate a redirect to the same asp page, but with different arguments:
So I have been asked to replace them with a dialog box that allows the user to choose the Mode and type, then opening the page. In looking at the Telerik controls that are available to me, it seems that the RadWindow is perfect. My strategy is:
redirect to the generic page:
Define a RadWindow on the page and sets its VisibleOnPageLoad to true.
The RadWindows contains a Cancel button and a Next button. Selection of the cancel button closes the dialog and leaves an empty page. Selection of the Next button will redirect to the same page but contain the Mode and Type parameters using the
window.location = myasppage.aspx?Mode="whatever"&Type="whatever";
My problem is that because VisibleOnPageLoad=true the radwindow always opens so I can't load the real page!
Am I going about this correctly? Is there another control to deal with this?
I was thinking that I could set VisibleOnPageLoad to false, then check for my parameters in the OnPreInit method to decide if I should show the radwindow.
Is there a better way of doing this? Will this even work?