I am using Q1 2008 and have a form using multiple rad controls and rad windows. When I add the PromptTemplate with a rad control to my window manager, I get the following error:
Here is my code as copied from (
http://www.telerik.com/support/kb/article/b454K-hbc-b454T-cec-b454c-cec.aspx
and
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Window/Examples/BrowserDialogBoxes/DefaultCS.aspx):
If I remove both telerik controls, no error; but if I place either control then I get the page cannot be null error.
Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
Here is my code as copied from (
http://www.telerik.com/support/kb/article/b454K-hbc-b454T-cec-b454c-cec.aspx
and
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Window/Examples/BrowserDialogBoxes/DefaultCS.aspx):
If I remove both telerik controls, no error; but if I place either control then I get the page cannot be null error.
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" | |
Skin="Mac" Modal="true" VisibleStatusbar="false" VisibleOnPageLoad="false" | |
ReloadOnShow="true" ShowContentDuringLoad="false"> | |
<PromptTemplate> | |
<script type="text/javascript"> | |
function closePrompt() | |
{ | |
var select = document.getElementById('select'); | |
var selectselectselectedValue = select.options[select.selectedIndex].value; | |
GetRadWindow().ModalDialogCallBack(selectedValue); | |
} | |
</script> | |
<style type="text/css"> | |
.Button | |
{ | |
background: url({2}Img/modalBtnBg.gif) no-repeat; border: 0px; width: 78px; height: 20px; color: #333; font: normal 11px Verdana,Arial, Sans-serif; margin: 2px; | |
} | |
.FixedDiv | |
{ | |
font: normal 11px Verdana, Arial,Sans-serif; | |
margin: 3px; | |
color: black; | |
text-align: center; | |
} | |
</style> | |
<div class='FixedDiv'> | |
<center> | |
<br /> | |
<img align="absmiddle" style='vertical-align: middle; border: 0' src='{2}Img/AlertIcon.gif' /> | |
Please enter your password: | |
<br /> | |
<telerik:RadTextBox ID="userPassword" runat="server" MaxLength="50" | |
TextMode="Password" Skin="Mac" EnableEmbeddedSkins="false" | |
SelectionOnFocus="SelectAll"> | |
</telerik:RadTextBox> | |
<br /> | |
<br /> | |
Please select your domain: | |
<telerik:RadComboBox ID="userDomain" runat="server" | |
DropDownWidth="100px" RadComboBoxImagePosition="Right" | |
Skin="Mac" Width="100px" EnableEmbeddedScripts="true" | |
ToolTip="Select a domain." | |
> | |
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> | |
<ExpandAnimation Type="OutQuart"></ExpandAnimation> | |
<Items> | |
<telerik:RadComboBoxItem Text="DOMAIN1" Value="DOMAIN1" /> | |
<telerik:RadComboBoxItem Text="DOMAIN2" Value="DOMAIN2" Selected="true" /> | |
</Items> | |
</telerik:RadComboBox> | |
<br /> | |
<br /> | |
<button class="Button" onclick="closePrompt()">OK</button> | |
<button class="Button" onclick="GetRadWindow().Close()">Cancel</button> | |
</center> | |
</div> | |
</PromptTemplate> |