This is a migrated thread and some comments may be shown as answers.

Rad Ajax Q1 2009 version Javascript error..

6 Answers 39 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
chandu mahi
Top achievements
Rank 1
chandu mahi asked on 08 Dec 2010, 11:15 PM
Hi ,
I am using q1 2009 rad controls & Ajax manger also.
I am trying to add RadAjaxmange in my pages to avoid postback operation on my page. But when i add RadAjaxManger for Rad dropdown list. After adding RadAjaxmanger when i select item from dropdown its showing javascript error. please see my Javascript error below.

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2; MS-RTC LM 8; .NET4.0C; .NET4.0E)
Timestamp: Wed, 8 Dec 2010 22:05:30 UTC

Message: Sys.InvalidOperationException: Two components with the same id 'ctl00_Cph1_CalendarExtender1' can't be added to the application.
Line: 3654
Char: 59
Code: 0
URI:
http://localhost:2065/NDIWeb/ScriptResource.axd?d=jO6lj8d7MPtcjhVtE5RwyJDsREURMbGvovQRWfOSAflo-_iG0Te3w-aVNsEkrrZRjAdsxnEEatXuPpVt_SY0GgFT0hbY8eF7SfQvNW8DPG_QZKnBMDFKG07_snOYIQdEaZtF58fuzoFD3n-aXSkAuR4s8zL_EG1I1sDKTWcFIDU6GIKg0&t=634172965859113573

see my code below, For RadAjaxMAnge i set Ajax controlID -> Update panel ID. if i made a mistake please respond to my post.

<%@ MasterType VirtualPath="~/NDIMaster.master" %>
//added script manger in MAster page.
<%@ Register Assembly="RadComboBox.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<%@ Register Assembly="RadAjax.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
  
<asp:Content ID="Content1" ContentPlaceHolderID="Cph1" Runat="Server">
<asp:UpdatePanel runat="server" ID="update1" UpdateMode="Conditional" >
    <ContentTemplate >
      <div style="text-align: center;"  id="divsearch">
      <br />      
      <rad:RadAjaxManager ID="RadAjaxManager1" runat="server">
       <AjaxSettings>
        <rad:AjaxSetting AjaxControlID="update1">
         <UpdatedControls>
           <rad:AjaxUpdatedControl ControlID ="radddlcust" />           
         </UpdatedControls>              
        </rad:AjaxSetting>
       </AjaxSettings>
      </rad:RadAjaxManager>
        
        <table border="0" width="820px"  style="text-align:center;" tit le="This table organize the page content" summary="This table organize the page content">
          <tr align="center">
           <td style="width:780px; height: 86px;" colspan="4" align="center">
             
            <asp:Panel runat="server" ID="pnlcust" Enabled="true" CssClass="borderPanel" HorizontalAlign="Center" Width="820px">
             
             <table width="820px" align="center" style="vertical-align:top;margin-bottom:3px;">
               <tr class="HeaderRowIndented">   
                 <td colspan="16"  title="AppilcationHistory" > Application History</td>
               </tr>      
               <tr align="center">
                 <td align="center"> <asp:Label runat="server"  ID="Label3" Text="Application No" ToolTip="Customer" CssClass = "label"  /> </td>
                 <td align="center"> <asp:Label runat="server" ID="Label1" Text="From Date" ToolTip="FromDate" CssClass = "label"   /> </td>
                 <td align="center"> <asp:Label runat="server" ID="Label2" Text="To Date" ToolTip="ToDate"  CssClass = "label" /> </td>
                </tr>
                <tr>
                <td>
                  <rad:RadComboBox ID="radddlcust" runat="server"  Width="200px" Skin="Vista" Height="250px"
                    SkinsPath="~/RadControls/ComboBox/Skins" 
                    AllowCustomText="true"  
                    MarkFirstMatch="true"     
                    ToolTip="Select Application Name"                         
                    AutoPostBack="true"
                    OnClientSelectedIndexChanged = "ValidateCombobox"
                    OnItemsRequested="radddlcust_ItemsRequested" 
                    OnSelectedIndexChanged="radddlcust_OnSelectedIndexChanged"   >
                    <Items>
                     <rad:RadComboBoxItem Text="- Select -" Value=""  />
                    </Items>
                   </rad:RadComboBox>      
                 </td>        
                 <td>
                   <asp:TextBox runat="server" ID="txtfromdate" CssClass="textbox"  OnChange= "Validate()" 
                   OnTextChanged="txtfromdate_OnTextChanged" ToolTip="Select date" AutoPostBack="true"  />
                   <ajax:CalendarExtender runat="server"  ID="CalendarExtender1"
                    Animated = "true" 
                    TargetControlID="txtfromdate"                  
                    Format="MM/dd/yyyy" 
                    PopupButtonID="imagefromdate"  /> 
                   <asp:ImageButton runat="server" id="imagefromdate" ImageUrl="~/images/calendar_blue.GIF"   ToolTip="select from date"  />
                   <ajax:TextBoxWatermarkExtender ID="txtwextfromdate1" runat="server" 
                    TargetControlID="txtfromdate"  BehaviorID="FromwatermarkID"
                    WatermarkText="- Select the date -"   />                           
                   </td>
                   <td
                   <asp:TextBox runat="server" ID="txttodate" CssClass="textbox" ToolTip="Select date" 
                    OnTextChanged="txttodate_OnTextChanged" AutoPostBack="true"  OnChange= "Validate()"  />
                   <ajax:CalendarExtender runat="server"  ID="CalendarExtender2" 
                     TargetControlID="txttodate" 
                     Animated = "true" 
                     Format="MM/dd/yyyy"  
                     PopupButtonID="imgtodate" PopupPosition="BottomRight" /> 
                   <asp:ImageButton runat="server" id="imgtodate" ImageUrl="~/images/calendar_blue.GIF"  ToolTip="select to date" />
                   <ajax:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server" 
                    TargetControlID="txttodate" WatermarkText="- Select the date -" />  
                  </td>   
                  <td>
                  <asp:Button runat="server" ID="btnviewresults" Text="Submit" ToolTip="ViewResults" 
                   OnClientClick = "return Validate()" CssClass="button" OnClick="btnviewresults_Click"  /> 
                  </td>
                  <td  align="right" style="width: 18px"
                  <asp:Button runat="server" ID="btncancel" Text="Cancel" ToolTip="Cancel selected values" CssClass="button"
                   OnClientClick = "return confirm('Are you sure that you wish to cancel all data?');"  OnClick="btncancel_Click"  />
                  </td>
                  <td  align="left" style="width: 0px"></td>
               </tr>
            </table
                       
           </asp:Panel
           </td>
           </tr>           
                 </table><br />                                                         </asp:Panel>
    <script type="text/javascript">
    var today = new Date();
    var dd = today.getDate();
    var mm = today.getMonth()+1;//January is 0!
    var yyyy = today.getFullYear();
    if(dd<10){dd='0'+dd;}
    if(mm<10){mm='0'+mm;}
    var todaydate = mm+'/'+dd+'/'+yyyy ;
    document.getElementById("<% =txttodate.ClientID %>").value = todaydate; 
    function Validate()
    {
        var FromDate = document.getElementById("<% =txtfromdate.ClientID %>").value; 
        var ToDate = document.getElementById("<% =txttodate.ClientID %>").value; 
        var ButtonResults = document.getElementById("<% =btnviewresults.ClientID %>");
        var ApplicationNo = <%=radddlcust.ClientID%>;
        var ApplicationNoValue = document.getElementById(ApplicationNo.InputID).value;
         
        if(ToDate > todaydate)
        {
        alert(" ToDate can not be greater than Today Date '" + todaydate + "'" ); 
        document.getElementById("<% =txttodate.ClientID %>").value = todaydate;        
        return false;
        }
        if(FromDate != "" && ToDate != "")
        {
            if(FromDate > ToDate)
            {
             alert("Please select valid Date. FromDate can not be less than ToDate.");
             $find("FromwatermarkID").set_Text("- Select the date -");
             return false;
            }
        }
        if((FromDate == "- Select the date -") && (ApplicationNoValue == "- Select/Type Application Name -") )
        {
            alert("Please select Application No/From Date.");
            return false;
        }
        if((FromDate != "- Select the date -") && (ApplicationNoValue != "- Select/Type Application Name -"))
        {
             ApplicationNo.Items[0].Select();
             document.getElementById("<% =txtfromdate.ClientID %>").value = FromDate;
             return false;          
        }
        if ((ToDate != todaydate) && (ApplicationNoValue != "- Select/Type Application Name -"))
        {
            ApplicationNo.Items[0].Select();
            document.getElementById("<% =txttodate.ClientID %>").value = ToDate;
            return false;
        }
          
        return true;
    }
 function ValidateCombobox(item)
    {
        var FromDate = document.getElementById("<% =txtfromdate.ClientID %>").value; 
        var ToDate = document.getElementById("<% =txttodate.ClientID %>").value; 
        var ApplicationNo = <%=radddlcust.ClientID%>;
        var ApplicationNoValue = document.getElementById(ApplicationNo.InputID).value;
         var ButtonResults = document.getElementById("<% =btnviewresults.ClientID %>");
        var item = ApplicationNo.Items[0].Text;
        //alert(todaydate);
        ButtonResults.disabled = false;
       // alert(ToDate);
       if(ApplicationNoValue != item)
        {
            $find("FromwatermarkID").set_Text("- Select the date -");
            document.getElementById("<%=txttodate.ClientID%>").value =todaydate;
        }
    }
    function Navigate()
    {
         javascript:window.open("~/Modules/Search Summary.aspx");
    }  
    </script>          
   </div>
  </ContentTemplate>     
 </asp:UpdatePanel>    
        
   <asp:UpdateProgress ID="UpdateProgress1" runat="server" DisplayAfter="150" DynamicLayout="true" AssociatedUpdatePanelID="update1">
     <ProgressTemplate>
        <div style="background-color:white;filter:alpha(opacity=95);position:absolute;width:100%;height:100%;top:0;left:0;z-index:50000;">
            <div style="vertical-align:middle;text-align:center;cursor:wait;position:static;top:50%;left:50%;-moz-user-select: none;z-index:50001;">        
              <users:LoadingPanel ID="uLoadingPanel1" runat="server" Visible="true" /> 
            </div>
        </div>
     </ProgressTemplate>        
  </asp:UpdateProgress>
  
</asp:Content>

 

6 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 14 Dec 2010, 10:50 AM
Hi,

Please note that you could not add UpdateProgress control as Ajax trigger in the RadAjaxManager settings. The UpdateProgress control could only be used in case you have asp UpdatePanel on the page to set it as AssociatedUpdatePanel. Please try to remove this setting and verify of this makes any difference.


Best wishes,
Maria Ilieva
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
chandu mahi
Top achievements
Rank 1
answered on 14 Dec 2010, 03:52 PM
Hi Maria,
Thanks for your response.
As you suggested i removed update progress panel & tried eventhough i am getting same JavaAcript error.

i user Asp Ajax control tool kit  controls inmy page. Rad Ajax Manager has any issue with Asp Ajax tool kit.
As i know rad controls are build on top of the ASP controls..

I tried adding Rad Ajax mAnger in other page. In that i am not using Update Progress control & ASP Ajax tool kit controls. I use only update panel.When i add Rad Ajax manager for ASP dropdown list... its not calling server side calls..When i remove Rad Ajaxmanger evrything works fine.. I tried by removing update panel also. Even thought there is no change.
Why??

I am coding Rad Ajax Manger in simple way only ..why its not supporting to my page. seee the code which i used in other page..
<asp:Content ID="Content1" ContentPlaceHolderID="Cph1" Runat="Server">
<asp:UpdatePanel runat="server" ID="UDipfilepnl" UpdateMode="Conditional" >  
  <ContentTemplate>    
    <div>
      <br />
      <rad:RadAjaxManager ID="RadAjaxManager1" runat="server">
       <AjaxSettings>
        <rad:AjaxSetting AjaxControlID="ddlparametertype">
         <UpdatedControls>
           <rad:AjaxUpdatedControl ControlID ="ddlparametertype" />           
         </UpdatedControls>                    
        </rad:AjaxSetting>
       </AjaxSettings>
      </rad:RadAjaxManager>
      <asp:Table border="0" width="950" ID="tblTop"  runat="server" align="center" >
        <asp:TableRow>
         <asp:TableCell>
            <asp:Panel ID="pnlParameterTypeName" runat="Server" Enabled="True" HorizontalAlign="Center"
             CssClass="borderPanel" Visible="True" Height="100px"  Width="650px">
              <table  cellspacing="1" cellpadding="1" border="0" bgcolor=white align=center   width="650" 
               title="Application Parameters Summary Navigation Area" 
               summary="Application Parameters Summary Navigation Area" 
               style="vertical-align:top;margin-bottom:3px;">
                <tr class="HeaderRowIndented">
                <th  colspan="13">Parameters Maintenance</th>
                </tr
                    <table style="width:100%; " >
                     <tr style="width:100%;" align="left">
                        <td >
                        Select a Parameter to Update. To create a new Parameter, select "Add New Parameter." 
                        </td>
                        <td style="width:1%;" >
                        </td>
                        <td style="width:1%;" >
                        </td>
                      </tr>
                    </table> <br />
                    <table style="width:100%;" >
                        <tr align="center"  width="100%" >
                        <td  width="30%" align="right" >
                        <asp:Label runat="server" ID="lablparatype" CssClass="label" >
                        <font color="black">ParameterType:</font> </asp:Label>            
                        </td>
                        <td  width="30%" align="left" >
                          <asp:DropDownList runat="server" AutoPostBack="true" ID="ddlparametertype" OnSelectedIndexChanged="parametertype_OnSelectedIndexChanged" />
                        </td>
                        <td align="left" width="5%">
                         <asp:Label runat="server" ID="Label5" Text = "UserStatus:" ForeColor="Black" CssClass="label"s />                         
                        </td>
                        <td align="left" width="60%">
                          <asp:DropDownList ID="ddlUserStatus" runat="server" Width="75px" CssClass="dropdown" AutoPostBack="true" ToolTip="Status"
                           OnSelectedIndexChanged="ddUserStatus_SelectedIndexChanged"  />
                        </td>
                        <td  align="right" style="width: 20%"   >
                        <asp:LinkButton ID="lnkbAddNew" runat="server" Text="Add New Parameter" ToolTip="Add New Parameter" OnClick="lbkbAddNew_Click" Width="118px" />
                        </td>
                        </tr>
                    </table>
                    </asp:Panel>
             </asp:TableCell>
          </asp:TableRow>
           
          <asp:TableRow>
            <asp:TableCell>
              <asp:Panel runat="server" ID="pnlnew" Width="600px" HorizontalAlign="center" Visible="false" CssClass="borderPanel">
                    <table style="width:100%" >
                        <tr class="HeaderRowIndented">
                            <td title="Create New Parameter" colspan="3">Create New Application Parameter</td>
                        </tr>
                        <tr align="center">
                            <td align="left"><asp:Label runat="server"  Width="200px" ID="Label3" Text="Parameter Type Name:" CssClass="label" /> </td>
                            <td  align="left" >
                            <asp:DropDownList runat="server" AutoPostBack="true" ID="ddlParameterTypeName" OnSelectedIndexChanged="ddlParameterTypeName_SelectedIndexChanged"  />
                            </td>
                        </tr>
                        <tr align="center">                   
                            <td align="left"><asp:Label runat="server" Width="200px" CssClass="label" ID="lblname" Text="Parameter Name:" /> </td>
                            <td align="left"><asp:TextBox  Width="325px" ID="txtParaName" CssClass="textbox" runat="server"  /></td>
                        </tr
                        <tr align="center">
                            <td align="left"><asp:Label runat="server"  Width="200px" ID="Label1" Text="Parameter Value:" CssClass="label" /> </td>
                            <td align="left"><asp:TextBox  ID="txtparavalue" runat="server" Width="325px"  CssClass="textbox" /></td>
                        </tr>
                        <tr align="center">
                            <td align="left"><asp:Label runat="server"  Width="200px" ID="Label2" Text="Parameter Description:" CssClass="label" /> </td>
                            <td align="left"><asp:TextBox  ID="txtDesc" TextMode= "multiLine" runat="server" Font-Size="X-Small" Width="325px" CssClass="textbox" /></td>
                        </tr>
                        <tr>
                            <td align="left"><asp:Label runat="server"  Width="200px" ID="Label6" Text="Parameter Status:" CssClass="label" /> </td>
                            <td align="left">
                             <asp:RadioButtonList runat="server" ID="rbtnliststatusnew"  RepeatDirection="Horizontal" >
                             <asp:ListItem Text="Active" Value="True"></asp:ListItem>
                             <asp:ListItem Text="InActive" Value="False"></asp:ListItem>
                             </asp:RadioButtonList>
                            </td>
                        </tr>                      
                     </table>
                     <table>
                        <tr>
                            <td align="center">
                            <asp:Button runat="server" CssClass="button"   Text="Create Parameter" 
                            ToolTip="Create Parameter" ID="btnCreate" OnClick = "btnCreate_OnClick"
                            OnClientClick="return validatecreatepara()"  ></asp:Button>
                            </td>
                            <td style="text-align:center; width:120;"  >
                            <asp:Button runat="server" CssClass="button"   Text="Cancel" ID="Cancel" 
                            OnClick="Cancel_OnClick" ></asp:Button>
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </asp:TableCell>
          </asp:TableRow>
                   
                                
          <asp:TableRow>
              <asp:TableCell><br /> 
               <asp:Panel ID="pnlAppPara" runat="Server" Enabled="True" HorizontalAlign="left"
                 CssClass="borderPanel" Visible="True" Height="200px"  ScrollBars="None" Width="770px">
                <table  cellspacing="1" cellpadding="1" border="0"
                 style="width:770px;  background-color:white; text-align:center; vertical-align:top;margin-bottom:3px;"    
                 title="Application Parameters Summary Navigation Area" summary="Application Parameters Summary Navigation Area" >
                 <tr class="HeaderRowIndented">
                  <th  colspan="13" >Application Parameters</th>
                 </tr
                 <table width="770px">
                   <tr  style="width:770px;">
                    <td  style="width:770px;">
                       <div id="gdAppPara"   runat="server"  style="vertical-align:top; height:400px; overflow:auto; text-align:center;">
                        <asp:GridView runat="server" ID="gvAppParamater" AutoGenerateColumns="false"
                         cellspacing="1" cellpadding="1"    
                         HeaderStyle-CssClass="gridviewheaderrow" 
                         AlternatingRowStyle-BackColor="#FDF7EF"
                         CssClass="GridRowGrayBorder"                             
                         HeaderStyle-BackColor="lightgray" 
                         HeaderStyle-BorderColor="ActiveCaption" ToolTip="Application Parameters" >                    
                         <Columns>
                         <asp:HyperLinkField HeaderText="Parameter"  DataTextField="ParameterName" ControlStyle-CssClass="SpecialAnchor" 
                          DataNavigateUrlFields="AppParameterID" DataNavigateUrlFormatString="~/Modules/Application Parameters.aspx?AppParameterID={0}"
                          NavigateUrl="~/Modules/Application Parameters.aspx"     >       
                         </asp:HyperLinkField>
                         <asp:BoundField HeaderText="ParameterTypeName" DataField="AppParameterTypeName" Visible="false" NullDisplayText = "-"   />
                         <asp:BoundField HeaderText="ParameterValue" DataField="ParameterValue" Visible="true" NullDisplayText = "-" />
                         <asp:BoundField HeaderText="CreationDate" DataField="CreationDate" Visible="true" NullDisplayText = "-" />
                         <asp:BoundField HeaderText="CreationUserID" DataField="CreationUserID" Visible="true" NullDisplayText = "-" />
                         </Columns>                        
                        </asp:GridView>
                        </div>
                      </td>
                    </tr>
                 </table>
                </table>
                </asp:Panel>
            </asp:TableCell>
         </asp:TableRow>        
         
          <asp:TableRow>
          <asp:TableCell>
           <users:MessagePanel runat="server" ID="Umsgpnl" Visible="true" />
          </asp:TableCell>
         </asp:TableRow>
         </asp:Table>
        </div>
    </ContentTemplate>      
</asp:UpdatePanel>
0
Maria Ilieva
Telerik team
answered on 16 Dec 2010, 03:44 PM
Hello,

Please note that you should not use RadAjaxManager and asp UpdatePanel into one application for updating the same part of the page, furthermore to add the RadAjaxManager into the asp UpdatePanel control. Please revise these settings and let me know how it goes.



All the best,
Maria Ilieva
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
chandu mahi
Top achievements
Rank 1
answered on 17 Dec 2010, 09:19 PM

Hi maria,
I tried by removing Update panel from my page. But in my previouse post i copied my code with update panel.
I used only Rad Ajax manger with out update panel for dropdonlist. when i select dropdown items it will call  other method & bind to gridview.i  just checked by debuging, on item changed its calling server side grid view method it showing the count but its binding to gridview but its not showing on web page..why ?

I tried adding Ajax Updated control for Gridview & that panel also. its not showing binding results with gridview.
I copied code which i used for dropdown selection method..if i am doing anything wrong please suggest me..

protected void parametertype_OnSelectedIndexChanged(object sender, EventArgs e)
   {
          if (ddlparametertype.SelectedIndex > 0)
           {
               if (ddlUserStatus.SelectedIndex > 0)
               {
                   GridAppparameters();
               }
               else
               {
                   pnlAppPara.Visible = false;
                   throw new Exception("Please select 'User Status'.");
               }
           }
           else
           {
               pnlAppPara.Visible = false;
               throw new Exception("Please select 'Parameter Type'.");
           }
       }
           protected void GridAppparameters()
   {
       DataTable dtApppara;
       string sParametertype = ddlparametertype.SelectedItem.Text.Trim();
       string sStatus = ddlUserStatus.SelectedValue.ToString();
       string sappparametertype = sParametertype;
           dtApppara = Methods.GetAppParametersByParameterTypeName(sappparametertype, Convert.ToBoolean(sStatus));
          if (dtApppara.Rows.Count > 0)
           {
               pnlAppPara.Visible = true;
               gvAppParamater.DataSource = dtApppara.DefaultView;
               gvAppParamater.DataBind();
           }
           else
           {
               pnlAppPara.Visible = false;
               Umsgpnl.Visible = true;
               throw new Exception("Application Parameters not found.");
           }

 

0
chandu mahi
Top achievements
Rank 1
answered on 20 Dec 2010, 03:47 PM
Hi Maria,
i found solution for my previouse post. i made a mistake i forgot to add Updated control for gridview. I added now..its working.
Now i am getting another issue. For Exception message i use custom message panel. I am calling my message panel from user control. In page load i set it false. In catch block i set it to true.

After adding RadAjaxmanager i can't see my Exception panel. When i add my messagepanel [its a user control] as updated control & compile the page. When selected index changed i am getting below message. It can't find message panel.
In page load i am setting to visible false..tht's the reason it couldn't find. so i set it to true in page load and tried ..even though its showing same javascript error.
is there any issue with radajaxmanger for  Usercontrol ??  i am copying my code below.

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2; MS-RTC LM 8; .NET4.0C; .NET4.0E)
Timestamp: Mon, 20 Dec 2010 14:40:41 UTC

Message: Cannot update control with ID: ctl00_Cph1_Umsgpnl. The control does not exist.
Line: 1386
Char: 1
Code: 0
URI: http://localhost:2065/NDIWeb/WebResource.axd?d=I06L21NJ40pbUKX4KLyWZGWN9v3y7i7P7-56TfW85sauhMZaBm92sDbKSdH_Dbz_PoTG2y4UtKInJ34yIw2UAs7cvVN376rmE5panAS9gy69OTsb1gq3hFW5LTDvq_Uf86VRRkn2naQhiVjgNm0N1TBqzcdUaiNr0WZ7UGqKX6Glf6ns0&t=634243994424269701

 

<%@ Page Language="C#" MasterPageFile="~/NDIMaster.master" AutoEventWireup="true" 
CodeFile="Application Parameters.aspx.cs" Inherits="Modules_Application_Parameters" ValidateRequest="true"
 EnableEventValidation="true" Title="National Death Index -- Application Parameters" %>
  
<%@ MasterType  VirtualPath="~/NDIMaster.master" %>
  
<%@ Register Assembly="RadAjax.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
  
<%@ Register TagPrefix="users" TagName="MessagePanel" Src="~/UserControls/MessagePanel.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Cph1" Runat="Server">
    
    <div>
      <br />
      <rad:RadAjaxManager ID="RadAjaxManager1" runat="server">
       <AjaxSettings>
        <rad:AjaxSetting AjaxControlID="ddlparametertype">
         <UpdatedControls>
           <rad:AjaxUpdatedControl ControlID ="ddlparametertype" />    
            <rad:AjaxUpdatedControl ControlID "pnlAppPara" />
             <rad:AjaxUpdatedControl ControlID "Umsgpnl" />                  
         </UpdatedControls>                    
           
        </rad:AjaxSetting>
       </AjaxSettings>
         <AjaxSettings>
        <rad:AjaxSetting AjaxControlID="ddlUserStatus">
         <UpdatedControls>
           <rad:AjaxUpdatedControl ControlID ="ddlUserStatus" />   
              <rad:AjaxUpdatedControl ControlID ="pnlAppPara" /> 
               <rad:AjaxUpdatedControl ControlID "Umsgpnl" />            
                            
         </UpdatedControls>                    
        </rad:AjaxSetting>
       </AjaxSettings>
   </rad:RadAjaxManager>
  <asp:TableRow>
          <asp:TableCell>
           <users:MessagePanel runat="server" ID="Umsgpnl" Visible="true" />
          </asp:TableCell>
         </asp:TableRow>
         </asp:Table>
        </div>
pageload:
protected void Page_Load(object sender, EventArgs e)
    {
         
        Master.PreSelectTab("AppParameters");
        try
        {
            if (!Page.IsPostBack)
            {
                pnlParameterTypeName.Visible = true;
                pnlAppPara.Visible = true;
                pnlnew.Visible = false;
                pnlUpdate.Visible = false;
  
                LoadParameters();
                LoadStatusValues();
                ddlparametertype.SelectedIndex = 1;
                GridAppparameters();
                //Umsgpnl.Visible = false;
            }
        }
        catch (Exception ex)
        {
            Umsgpnl.Visible = true;
            Umsgpnl.Text = ex.Message;
        }
    }
0
Maria Ilieva
Telerik team
answered on 22 Dec 2010, 02:47 PM
Hi,

Please note that all controls added in the RadAjaxManager Settings should be always visible on the page or added in the always visible container. Could you please let me know how the UserControl is added on the page, is it programmatically or declarative in the aspx mark up?
Also I would suggest you to upgrade your application to the latest Telerik Web.UI build as the old classic RadControl are no longer supported and if a bug appears it will not be fixed for this version.


All the best,
Maria Ilieva
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Ajax
Asked by
chandu mahi
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
chandu mahi
Top achievements
Rank 1
Share this question
or