or
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
/>
<
telerik:RadMaskedTextBox
ID
=
"RadMaskedTextBox1"
runat
=
"server"
Mask
=
"(###)-######"
>
</
telerik:RadMaskedTextBox
>
<
asp:RequiredFieldValidator
Display
=
"Dynamic"
ID
=
"MaskedTextBoxRequiredFieldValidator"
runat
=
"server"
ErrorMessage
=
"Please, enter a phone number."
ControlToValidate
=
"RadMaskedTextBox1"
></
asp:RequiredFieldValidator
>
<
asp:RegularExpressionValidator
Display
=
"Dynamic"
ID
=
"MaskedTextBoxRegularExpressionValidator"
runat
=
"server"
ErrorMessage
=
"Format is (###)-######"
ControlToValidate
=
"RadMaskedTextBox1"
ValidationExpression
=
"\(\d{3}\)-\d{6}"
/>
<
asp:Button
ID
=
"Button1"
runat
=
"server"
Text
=
"Postback"
OnClick
=
"Button1_Click"
>
</
asp:Button
>
<
asp:Label
ID
=
"lblMessage"
runat
=
"server"
></
asp:Label
>
</
form
>
<
telerik:RadComboBox
ID
=
"YearComboBox"
Runat
=
"server"
Filter
=
"StartsWith"
Font-Size
=
"Medium"
Width
=
"100px"
Height
=
"150px"
DataTextField
=
"Text"
DataValueField
=
"Value"
DataSourceID
=
"XmlDataSource1"
>
</
telerik:RadComboBox
>
<
asp:XmlDataSource
ID
=
"XmlDataSource1"
runat
=
"server"
DataFile
=
"~/Common/year.xml"
></
asp:XmlDataSource
>
function RequestStart() { |
// the following Javascript code takes care of expanding the RadAjaxLoadingPanel |
// to the full height of the page, if it is more than the browser window viewport |
var loadingPanel = document.getElementById("<%= RadAjaxLoadingPanel1.ClientID %>"); |
var pageHeight = document.documentElement.scrollHeight; |
var viewportHeight = document.documentElement.clientHeight; |
if (pageHeight > viewportHeight) { |
loadingPanel.style.height = pageHeight + "px"; |
} |
// the following Javascript code takes care of centering the RadAjaxLoadingPanel |
// background image, taking into consideration the scroll offset of the page content |
var scrollTopOffset = document.documentElement.scrollTop; |
var loadingImageHeight = 55; |
loadingPanel.style.backgroundPosition = "center " + (parseInt(scrollTopOffset) + parseInt(viewportHeight / 2) - parseInt(loadingImageHeight / 2)) + "px"; |
// workaround for RadAjaxLoadingPanel for ASP.NET - there are two elements with the same ID |
// this is not needed with RadAjaxLoadingPanel for ASP.NET AJAX |
if (loadingPanel.nextSibling.className == loadingPanel.className) // IE, Opera |
{ |
loadingPanel.nextSibling.style.backgroundPosition = "center " + (parseInt(scrollTopOffset) + parseInt(viewportHeight / 2) - parseInt(loadingImageHeight / 2)) + "px"; |
} |
else if (document.getElementsByClassName) // Firefox |
{ |
var panels = document.getElementsByClassName("MyModalPanel"); |
for (var j = 0; j < panels.length; j++) { |
panels[j].style.backgroundPosition = "center " + (parseInt(scrollTopOffset) + parseInt(viewportHeight / 2) - parseInt(loadingImageHeight / 2)) + "px"; |
} |
} |
} |
.MyLoadingImage |
{ |
position:relative; |
top:50%; |
margin-top:-30px; |
left:50%; |
margin-left:-65px; |
} |