| <td> |
| <div id="MainDiv"> |
| <asp:ContentPlaceHolder ID="MainPlaceHolder" runat="server"> |
| </asp:ContentPlaceHolder> |
| </div> |
| </td> |
| ------ CSS setting |
| #MainDiv |
| { |
| height: 458px; |
| } |
| <td> |
| <div id="MainDiv"> |
| <asp:Panel ID = "null3kd98" runat="server" Height="100%" ScrollBars="Vertical"> |
| <asp:ContentPlaceHolder ID="MainPlaceHolder" runat="server"> |
| </asp:ContentPlaceHolder> |
| </asp:Panel> |
| </div> |
| </td> |
| <div id="div_PrioritizePriorities"> |
| <asp:UpdatePanel runat="server" ID="up1"> |
| <ContentTemplate> |
| <telerik:RadDockLayout ID="RadDockLayout1" runat="server" |
| OnSaveDockLayout="RadDockLayout1_SaveDockLayout" |
| OnLoadDockLayout="RadDockLayout1_LoadDockLayout"> |
| <div id="div_rdZoneMain"> |
| <p class="p_ZoneHeader"> |
| Current Widgets |
| </p> |
| <telerik:RadDockZone ID="rdZoneMain" runat="server" minHeight="180px" |
| Width="100%" BorderStyle="None"> |
| </telerik:RadDockZone> |
| </div> |
| <div id="div_rdZoneNew"> |
| <p class="p_ZoneHeader"> |
| New Widgets |
| </p> |
| <telerik:RadDockZone ID="rdZoneNew" runat="server" minHeight="180px" |
| Width="100%" BorderStyle="None"> |
| </telerik:RadDockZone> |
| </div> |
| <div id="div_rdZoneHidden2" class="div_rdZoneHidden2" runat="server"> |
| <p class="p_ZoneHeader"> |
| Hidden Widgets |
| </p> |
| <telerik:RadDockZone ID="rdZoneHidden" runat="server" width="100%" MinHeight="30px" |
| BorderStyle="None" /> |
| </div> |
| </telerik:RadDockLayout> |
| </ContentTemplate> |
| <Triggers> |
| <asp:AsyncPostBackTrigger ControlID="ibToggleCollapseAll" EventName="Click" /> |
| <asp:AsyncPostBackTrigger ControlID="cbShowImpact" EventName="checkedchanged" /> |
| <asp:AsyncPostBackTrigger ControlID="cbShowIssues" EventName="checkedchanged" /> |
| </Triggers> |
| </asp:UpdatePanel> |
| </div> |
<%
@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" MasterPageFile="~/MasterPage.master" %>
<%
@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<
asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server" ID="Cnt1">
<
telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnablePageMethods="true"></telerik:RadScriptManager>
<asp:TextBox ID="txtTest" runat="server" Text="abc">
</asp:TextBox>
<telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" LoadingPanelID="LoadingPanel1">
<telerik:RadTextBox ID="txtRad" runat="server" Text="xyz"></telerik:RadTextBox>
</telerik:RadAjaxPanel>
<
script type="text/javascript">
alert(document.getElementById( "<%=txtRad.ClientID%>").value);
</script>
</asp:Content>
"The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>). "
Below is my Master Page code
<%
@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<%
@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head runat="server">
<title>Untitled Page</title>
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
</
head>
<
body>
<form id="form1" runat="server">
<div>
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</
body>
</
html>
How to find the control in RadAjaxPanel??

|
Requirements |
|
| RadControls version |
Q2 2009 (826) |
| .NET version |
3.5 |
| Visual Studio version |
2008 |
| programming language |
C# |
| browser support |
all browsers supported by RadControls |
So this project is a lot simpler than the Dynamic Data Web Application... all thanks to Telerik ;-)
To use it within your own project, copy the webpage and LINQ to SQL diagram to your web project. Then delete all tables from the LINQ to SQL diagram and add all tables from the SQL Server database you wish to view and modify. That is all !!!
(I have removed the Telerik assembly from the attached ZIP)
| <telerik:RadComboBox ID="radCombo5" |
| runat="server" |
| Width="250px" |
| Height="150px" |
| DropDownWidth="298px" |
| EnableLoadOnDemand="true" |
| EnableVirtualScrolling="true" |
| MarkFirstMatch="false" |
| HighlightTemplatedItems="true" |
| EmptyMessage="Digitare il comune da ricercare" |
| OnClientItemsRequesting="radCombo5_OnClientItemsRequesting" > |
| <WebServiceSettings Method="GetCity5" Path="_Selection.aspx" /> |
| </telerik:RadComboBox> |
| [WebMethod] |
| public static RadComboBoxData GetCity5(RadComboBoxContext context) |
| { |
| RadComboBoxData comboData = new RadComboBoxData(); |
| List<RadComboBoxItemData> result = new List<RadComboBoxItemData>(); |
| if (context.Text != "") |
| { |
| try |
| { |
| ComuneCollection comuneCollection = new ComuneCollection(); |
| string[] values; |
| values = context.Text.Trim().Split(' '); |
| Where w; |
| foreach (string item in values) |
| { |
| if (item != null && item.Trim() != string.Empty) |
| { |
| w = new Where(); |
| w.Comparison = Comparison.Like; |
| w.ColumnName = Comune.Columns.Descrizione; |
| w.ParameterValue = "%" + item + "%"; |
| if ((bool)context["checked"]) |
| w.Condition = Where.WhereCondition.OR; |
| else |
| w.Condition = Where.WhereCondition.AND; |
| comuneCollection.Where(w); |
| } |
| } |
| comuneCollection.Load(); |
| if (comuneCollection.Count <= 1000) |
| { |
| foreach (Comune comune in comuneCollection) |
| { |
| RadComboBoxItemData itemData = new RadComboBoxItemData(); |
| itemData.Text = comune.Descrizione; |
| itemData.Value = comune.Codprovincia + comune.Codcomune; |
| if (comune.Codcatastale.Trim() == string.Empty) |
| comune.Codcatastale = "ZZZ"; |
| itemData.Attributes.Add("Codcatastale", comune.Codcatastale); |
| result.Add(itemData); |
| } |
| comboData.Message = String.Format("Trovati <b>{0}</b> elementi per <b>'{1}'</b>", |
| comuneCollection.Count.ToString(), |
| context.Text); |
| } |
| else |
| { |
| comboData.Message = String.Format("Trovati più di <b>1000</b> elementi. Affinare la ricerca"); |
| } |
| } |
| catch (Exception ex) |
| { |
| comboData.Message = String.Format("<b>{0}</b>", ex.Message); |
| } |
| } |
| comboData.Items = result.ToArray(); |
| return comboData; |
| } |
| <telerik:RadComboBox ID="radCombo5" |
| runat="server" |
| Width="250px" |
| Height="150px" |
| DropDownWidth="298px" |
| EnableLoadOnDemand="true" |
| EnableVirtualScrolling="true" |
| MarkFirstMatch="false" |
| HighlightTemplatedItems="true" |
| EmptyMessage="Digitare il comune da ricercare" |
| OnClientItemsRequesting="radCombo5_OnClientItemsRequesting" > |
| <WebServiceSettings Method="GetCity5" Path="_Selection.aspx" /> |
| <HeaderTemplate> |
| <table style="width: 275px" cellspacing="0" cellpadding="0"> |
| <tr> |
| <td style="width: 177px;"> |
| Comune</td> |
| <td style="width: 60px;"> |
| CodIstat</td> |
| <td style="width: 40px;"> |
| CodCatasto</td> |
| </tr> |
| </table> |
| </HeaderTemplate> |
| <ItemTemplate> |
| <table style="width: 275px" cellspacing="0" cellpadding="0"> |
| <tr> |
| <td style="width: 177px;"> |
| <%# DataBinder.Eval(Container, "Text")%> |
| </td> |
| <td style="width: 60px;"> |
| <%# DataBinder.Eval(Container, "Value")%> |
| </td> |
| <td style="width: 40px;"> |
| <%# DataBinder.Eval(Container, "Attributes['Codcatastale']")%> |
| </td> |
| </tr> |
| </table> |
| </ItemTemplate> |
| </telerik:RadComboBox> |