Hello!
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:
~\myasppage.aspx?Mode="A"&Type="B";
~\myasppage.aspx?Mode="C"&Type="D";
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:
~\myasppage.aspx
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.
I haven't been able to figure out how to call a javascript function (to show the radwindow) from the code behind, and even if I could, I'm not sure that the javascript would even be loaded yet!
Is there a better way of doing this? Will this even work?
thanks