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

Load on demand issues

4 Answers 120 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Joaquín
Top achievements
Rank 2
Joaquín asked on 15 Jan 2012, 05:07 PM
Im trying to set up a tooltip which is updated to show which fields of the form the user must complete before being allowed to continue. I have several issues about it (because I'm a newbie asp programmer), but the worst is that after showing the tooltip a few times (hovering the mouse over the hotspot), I get the following error:

Error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near 'Telerik.Web.UI    20'.


I have tried everyting I have been able to think on to solve it, with no success. I have not a single clue about that is wrong. Could you please tell me what is wrong? This is the code (in the master page there is only static content like images):

CreateProject.aspx
<%@ Page Title="" Language="VB" MasterPageFile="~/Resources/MasterPages/Clients.master" AutoEventWireup="false" CodeFile="CreateProject.aspx.vb" Inherits="Web_Clients_CreateProject" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
 
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style3
        {
            width: 250px;
        }
 
        .style4
        {
            border: 1px solid #abc1de;
            padding: 1px 4px;
            width: 100%;
        }
         
        .style7
        {
            width: 180px;
        }
 
        .style8
        {
            width: 96px;
        }
 
        .style9
        {
            width: 195px;
        }
 
        .style10
        {
            width: 140px;
        }
        .style11
        {
            width: 127px;
        }
    </style>
 
</asp:Content>
 
<asp:Content ID="Content2" ContentPlaceHolderID="cphHeaderText" Runat="Server">
    Create Project
</asp:Content>
 
<asp:Content ID="Content3" ContentPlaceHolderID="cphMain" Runat="Server">
 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="chkPONA">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="txtRadPO" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="lstRadSouceLangLista">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lstRadSouceLangSelected" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="lstRadSouceLangSelected">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lstRadSouceLangLista" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="cmbRadTTools">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="cmbRadTTools" />
                    <telerik:AjaxUpdatedControl ControlID="div_OtherTTool" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="chkTranslateOther">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="txtRadTranslateOther" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="chkDeliveryOther">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="txtRadDeliveryOther" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
 
 
     
     
 
    <div id="divProjectName" class="TableTextoMedio" style="float:left ">
         
        <table class="style1">
            <tr>
                <td class="style9">
                    Project Name:<div id="prueba"></div></td>
                <td>
                    <telerik:RadTextBox ID="txtRadProjectName" Runat="server" EmptyMessage="Project Name" LabelWidth="" Width="560px">
                        <EmptyMessageStyle Font-Italic="False" />
                    </telerik:RadTextBox>
                </td>
            </tr>
            <tr>
                <td class="style9">
                        Targeted Market and Audience:</td>
                <td>
                    <telerik:RadTextBox ID="txtRadAudience" Runat="server" EmptyMessage="Targeted Audience" LabelWidth="" Width="560px">
                        <EmptyMessageStyle Font-Italic="False" />
                    </telerik:RadTextBox>
                </td>
            </tr>
            </table>
    </div>
 
    <div id="div_menu" style="float:right">
        <div >
            <telerik:RadMenu ID="RadMenu1" runat="server" EnableRoundedCorners="True" EnableShadows="True" >
                <Items>
                    <telerik:RadMenuItem runat="server" Text="Profile" >
                        <Items>
                            <telerik:RadMenuItem runat="server" Text="Save current selections as default" Font-Size="12px">
                            </telerik:RadMenuItem>
                            <telerik:RadMenuItem runat="server" Text="Load default selections" Font-Size="12px">
                            </telerik:RadMenuItem>
                            <telerik:RadMenuItem runat="server" IsSeparator="True" Text="Child RadMenuItem 3" Font-Size="12px">
                            </telerik:RadMenuItem>
                            <telerik:RadMenuItem runat="server" Text="Load default selections automatically" PostBack="false" Font-Size="12px">
                                <ItemTemplate>
                                    <asp:CheckBox ID="CheckBox3" runat="server" Text=" Always load default selections" Font-Size="11px" />
                                </ItemTemplate>
                            </telerik:RadMenuItem>
                        </Items>
                    </telerik:RadMenuItem>
                </Items>
            </telerik:RadMenu>
        </div>
        <div >
            <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="64px" Width="80px">
                <asp:Image ID="imgStatusCrearProyecto" ImageUrl="~/Resources/Icons/cross-icon.jpg" runat="server" Height="64px" Width="80px" />
                <asp:Timer ID="Timer1" runat="server" Interval="1000">
                </asp:Timer>
            </telerik:RadAjaxPanel>
        </div>
    </div>
 
    <div style="clear:left;">
    </div>
 
 
    <div id="divData1" class="TableTextoMedio" style="float:left; padding-top:20px;">
         
        <table class="style1">
            <tr>
                <td class="style10">
                    Account:</td>
                <td>
                    <telerik:RadTextBox ID="txtRadAccount" Runat="server" EmptyMessage="Account" LabelWidth="" Width="160px">
                        <EmptyMessageStyle Font-Italic="False" />
                    </telerik:RadTextBox>
                </td>
            </tr>
            <tr>
                <td class="style10">
         
                    Desired Delivery Date:</td>
                <td>
         
                    <telerik:RadDateTimePicker ID="RadDateTimePicker1" Runat="server" Culture="es-ES">
                        <TimeView CellSpacing="-1" Culture="es-ES"></TimeView>
                        <TimePopupButton ImageUrl="" HoverImageUrl=""></TimePopupButton>
                        <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x" ShowRowHeaders="False">
                            <SpecialDays>
                                <telerik:RadCalendarDay Repeatable="Today" Date="" ItemStyle-CssClass="rcToday" />
                            </SpecialDays>
                        </Calendar>
                        <DateInput DisplayDateFormat="dd/MM/yyyy" DateFormat="dd/MM/yyyy" LabelWidth="" EmptyMessage="Delivery Date">
                        </DateInput>
                        <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
                    </telerik:RadDateTimePicker>
                </td>
            </tr>
            <tr>
                <td class="style10">
         
                    Time Zone:</td>
                <td>
                    <telerik:RadComboBox ID="cmbRadTimeZone" Runat="server" DataSourceID="XmlDataSourceTimeZones" DataTextField="Text" DataValueField="value"
                        Width="200px" DropDownWidth="500px" HighlightTemplatedItems="True">
                        <ItemTemplate>
                            <div class="combo-item-template" style="font-size:11px">
                                <%# Eval("Text") %>
                            </div>
                        </ItemTemplate>
                    </telerik:RadComboBox>
                    <asp:XmlDataSource ID="XmlDataSourceTimeZones" runat="server" DataFile="~/App_Data/TimeZones.xml"></asp:XmlDataSource>
                </td>
            </tr>
        </table>
    </div>
 
    <div id="divData2" class="TableTextoMedio" style="float: left; padding-left:50px; padding-top:20px;">
                     
        <table class="style1">
           <tr>
               <td class="style11">
                    Purchase Order:</td>
               <td>
                    <telerik:RadTextBox ID="txtRadPO" Runat="server" EmptyMessage="Purchase Order" LabelWidth="" Width="160px">
                        <EmptyMessageStyle Font-Italic="False" />
                    </telerik:RadTextBox>
                </td>
           </tr>
           <tr>
               <td class="style11">
         
                    Client Project Code:</td>
               <td>
         
                    <telerik:RadTextBox ID="txtRadClientCode" Runat="server" EmptyMessage="Client Project Code" LabelWidth="" Width="160px">
                        <EmptyMessageStyle Font-Italic="False" />
                    </telerik:RadTextBox>
                </td>
           </tr>
        </table>
    </div>
 
 
    <div id="div1" class="TableTextoMedio" style="float: left; padding-left:10px; padding-top:20px;">
        <asp:CheckBox ID="chkPONA" runat="server" Text=" Tick if PO is not applicable" AutoPostBack="True" />
    </div>
 
   <div style="clear:both">
   </div>
 
   <br />
    
    <div id="divSourceLanguage" class="TableTextoMedio" style="float:left;">
        <table class="style1">
           <tr>
               <td class="style3">
                    <b>Source Language:</b></td>
               <td>
                     </td>
           </tr>
           <tr>
               <td>
                   <telerik:RadListBox ID="lstRadSouceLangLista" runat="server" Height="110px" Width="250px" AllowTransfer="True"
                       TransferToID="lstRadSouceLangSelected" AutoPostBackOnTransfer="True" EnableMarkMatches="True" AllowTransferOnDoubleClick="True"
                       DataKeyField="Variante" DataSortField="Nombre" DataTextField="Nombre" DataValueField="Variante" Sort="Ascending">
                        <ButtonSettings TransferButtons="Common" ShowDelete="False" ShowTransferAll="False"></ButtonSettings>
                    </telerik:RadListBox> </td>
               <td>
                   <telerik:RadListBox ID="lstRadSouceLangSelected" runat="server" Height="110px" Width="220px" EnableMarkMatches="True" Font-Bold="True"
                       AllowTransferOnDoubleClick="True" >
                    </telerik:RadListBox> </td>
           </tr>
            
        </table>
    </div>
     
    <div id="divTargetLanguages" class="TableTextoMedio" style="float:left; padding-left:50px;">
         
        <table class="style1">
            <tr>
                <td class="style3">
                    <b>Target Languages:</b></td>
               <td>
                     </td>
            </tr>
            <tr>
                <td>
                    <telerik:RadListBox ID="lstRadTargetLangLista" runat="server" Height="110px" Width="250px" AllowTransfer="True" AllowTransferOnDoubleClick="True"
                        SelectionMode="Multiple" TransferToID="lstRadTargetLangSelected" EnableMarkMatches="True" DataKeyField="Variante"
                        DataSortField="Nombre" DataTextField="Nombre" DataValueField="Variante">
                    </telerik:RadListBox>
                </td>
                <td>
                    <telerik:RadListBox ID="lstRadTargetLangSelected" runat="server" Height="110px" Width="220px" EnableMarkMatches="True" Font-Bold="True"
                        ForeColor="Red" AllowTransferOnDoubleClick="True">
                    </telerik:RadListBox>
                </td>
            </tr>
        </table>
    </div>
 
    <div style="clear:both">
    </div>
 
    <br />
    <br />
 
     <div id="divTasks" class="TableTextoMedio" style="float:left;">
 
       <table class="style1">
            <tr>
                <td class="style3">
                    <b>Tasks to be performed:</b></td>
               <td>
                     </td>
            </tr>
            <tr>
                <td>
                    <telerik:RadListBox ID="lstRadTasksList" runat="server" Height="110px" Width="250px" AllowTransfer="True" AllowTransferOnDoubleClick="True"
                        SelectionMode="Multiple" TransferToID="lstRadTasksSelected" EnableMarkMatches="True" DataKeyField="idTarea"
                        DataSortField="Orden" DataTextField="Descripcion" DataValueField="idTarea">
                    </telerik:RadListBox>
                </td>
                <td>
                    <telerik:RadListBox ID="lstRadTasksSelected" runat="server" Height="110px" Width="220px" EnableMarkMatches="True" Font-Bold="True"
                        ForeColor="Red" AllowTransferOnDoubleClick="True">
                    </telerik:RadListBox>
                </td>
            </tr>
        </table>
 
        <br />
        <br />
 
        <div id="div_ttools" style="float:left;">
 
            <div style="padding-left:2px; padding-bottom:3px">
                <strong>Translation tool:</strong>
            </div>
 
            <table class="style4">
                <tr>
                    <td class="style8">
                        <telerik:RadComboBox ID="cmbRadTTools" runat="server" DataSourceID="EntityDataSourceTools" DataTextField="Nombre" DataValueField="idTTool"
                            EnableTextSelection="False" MarkFirstMatch="True" Sort="Ascending" Width="200px" AutoPostBack="True" CheckBoxes="True"
                            DropDownWidth="230px">
                        </telerik:RadComboBox>
                    </td>
                </tr>
                <tr>
                    <td class="style8">
                         </td>
                </tr>
                <tr>
                    <td class="style8" >
                        <div id="div_OtherTTool" runat="server" style="visibility:hidden">
                        <telerik:RadTextBox ID="txtRadOtherTTool" Runat="server" EmptyMessage="Please indicate" LabelWidth="" Width="190px">
                            <EmptyMessageStyle Font-Italic="True"/>
                        </telerik:RadTextBox>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
 
 
        <div id="div_hiddentext" style="float:left; padding-left:40px">
 
            <div style="padding-left:2px; padding-bottom:3px">
                <strong>Is there hidden text?</strong>
            </div>
 
            <table class="style4">
                <tr>
                    <td class="style8">
                        <asp:RadioButton ID="radioHiddenTextYes" runat="server" Checked="True" GroupName="grpHiddenText" Text=" Yes" />
                    </td>
                    <td>
                         </td>
                </tr>
                <tr>
                    <td class="style8">
                        <asp:RadioButton ID="radioHiddenTextNo" runat="server" GroupName="grpHiddenText" Text=" No" Checked="True" />
                    </td>
                    <td>
                         </td>
                </tr>
                <tr>
                    <td class="style8">
                        <asp:RadioButton ID="radioHiddenTextDontKnow" runat="server" GroupName="grpHiddenText" Text=" Don't know" />
                    </td>
                    <td>
                         </td>
                </tr>
            </table>
        </div>
    </div>
 
    <div id="divTranslate" class="TableTextoMedio" style="float:left; padding-left:50px;">
        <div style="padding-left:2px; padding-bottom:3px">
            <strong>Translate:</strong>
        </div>
 
        <table class="style4">
            <tr>
                <td>
 
                    <table>
                            <tr>
                            <td class="style7">
                                <asp:RadioButton ID="radioTranslateAll" runat="server" Checked="True" GroupName="grpTranslate" Text="All" AutoPostBack="True" />
                            </td>
                        </tr>
                        <tr>
                            <td class="style7">
                                <asp:RadioButton ID="radioTranslateSelect" runat="server" GroupName="grpTranslate" Text="Select" AutoPostBack="True" />
                            </td>
                        </tr>
                    </table>
                     
                    <table style="padding-left:15px">
                        <tr>
                            <td class="style7">
                                <asp:CheckBox ID="chkTranslateText" runat="server" Text=" Text" Enabled="False" />
                            </td>
                        </tr>
                        <tr>
                            <td class="style7">
                                <asp:CheckBox ID="chkTranslateTextBoxes" runat="server" Text=" Text boxes" Enabled="False" />
                            </td>
                        </tr>
                        <tr>
                            <td class="style7">
                                <asp:CheckBox ID="chkTranslateImages" runat="server" Text=" Images" Enabled="False" />
                            </td>
                        </tr>
                        <tr>
                            <td class="style7" style="vertical-align:top";>
                                <asp:CheckBox ID="chkTranslateOther" runat="server" Text=" Other:" AutoPostBack="True" Enabled="False" />
                            </td>
                        </tr>
                        <tr>
                            <td class="style7" style="vertical-align:top";>
                                <telerik:RadTextBox ID="txtRadTranslateOther" Runat="server" EmptyMessage="Elements to be translated" LabelWidth="" TextMode="MultiLine"
                                    Width="100%" Rows="8" Enabled="False">
                                    <emptymessagestyle font-italic="False" />
                                </telerik:RadTextBox>
                            </td>
                        </tr>
                    </table>
 
                </td>
            </tr>
        </table>
    </div>
 
    <div id="divFormats" class="TableTextoMedio" style="float:left; padding-left:60px;">
        <div style="padding-left:2px; padding-bottom:3px">
            <strong>Delivery format:</strong>
        </div>
 
        <table class="style4">
            <tr>
                <td class="style7">
                    <asp:CheckBox ID="chkDeliverySource" runat="server" Text=" Source format" Checked="True" />
                </td>
            </tr>
            <tr>
                <td class="style7" style="vertical-align:top";>
                    <asp:CheckBox ID="chkDeliveryOther" runat="server" Text=" Other:" AutoPostBack="True" />
                </td>
            </tr>
            <tr>
                <td class="style7" style="vertical-align:top";>
                    <telerik:RadTextBox ID="txtRadDeliveryOther" Runat="server" EmptyMessage="Describe the formats you desire" LabelWidth="" TextMode="MultiLine"
                        Width="100%" Rows="8" Enabled="False">
                        <emptymessagestyle font-italic="False" />
                    </telerik:RadTextBox>
                </td>
            </tr>
        </table>
    </div>
 
    
    <div style="clear:both">
    </div>
 
    <br />
 
    <div id="divInstructions" class="TableTextoMedio">
        <div style="padding-left:2px; padding-bottom:3px">
            <strong>Translation Instructions:</strong>
        </div>
        <table class="style1">
            <tr>
                <td>
                    <telerik:RadTextBox ID="RadTextBox1" Runat="server" EmptyMessage="Type translation instructions" LabelWidth="" TextMode="MultiLine"
                        Width="740px" Rows="10">
                        <emptymessagestyle font-italic="True" />
                    </telerik:RadTextBox>
                </td>
            </tr>
        </table>
    </div>
 
    <br />
    <br />
 
    <div class="TableTextoPeque">
        <asp:Button ID="Button1" runat="server" Text="Create project" />
    </div>
 
    <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" HideEvent="LeaveTargetAndToolTip" RenderInPageRoot="True"
        OnAjaxUpdate="OnAjaxUpdate" AutoCloseDelay="0" EnableShadow="True" Position="BottomLeft" RelativeTo="Mouse" Width="400px"
        ShowDelay="0" >
        <TargetControls>
            <telerik:ToolTipTargetControl TargetControlID="imgStatusCrearProyecto" IsClientID="false" />
        </TargetControls>
    </telerik:RadToolTipManager>
 
  
 
    <telerik:RadSkinManager ID="RadSkinManager1" Runat="server" Skin="Office2007">
    </telerik:RadSkinManager>
 
    <asp:EntityDataSource ID="EntityDataSourceTools" runat="server" ConnectionString="name=Extranet_JSProjects_Entities"
        DefaultContainerName="Extranet_JSProjects_Entities" EnableFlattening="False" EntitySetName="js_TranslationTools"
        Select="it.[idTTool], it.[Nombre]">
    </asp:EntityDataSource>
 
</asp:Content>

CreateProject.aspx.vb
Imports Telerik.Web.UI
Imports System.Data
Imports Extranet_JSProjects_Model
 
Partial Class Web_Clients_CreateProject
    Inherits System.Web.UI.Page
 
    Public Class ErroresAlCrearProyecto
        Private _Campo As String
        Public Property Campo As String
            Get
                Return _Campo
            End Get
            Set(value As String)
                _Campo = value
            End Set
        End Property
 
        Private _DescripcionError As String
        Public Property DescripcionError As String
            Get
                Return _DescripcionError
            End Get
            Set(value As String)
                _DescripcionError = value
            End Set
        End Property
    End Class
 
 
    Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
 
        If Not IsPostBack Then
            CargarIdiomas(lstRadSouceLangLista)
            CargarIdiomas(lstRadTargetLangLista)
 
            lstRadSouceLangLista.ButtonSettings.TransferButtons = ListBoxTransferButtons.TransferFrom
            lstRadSouceLangLista.Sort = RadListBoxSort.Ascending
            lstRadSouceLangLista.SortItems()
 
            lstRadTargetLangLista.Sort = RadListBoxSort.Ascending
            lstRadTargetLangLista.SortItems()
 
            CargarTareas(lstRadTasksList)
 
            div_OtherTTool.Attributes("style") = "visibility:hidden"
 
            RadDateTimePicker1.MinDate = Now
            'RadToolTipManager1.TargetControls.Add(imgStatusCrearProyecto.ClientID, True)
 
            txtRadProjectName.Focus()
        End If
 
    End Sub
 
 
    Protected Sub CargarIdiomas(lista As RadListBox)
 
        Using myProjectsEntities As New Extranet_JSProjects_Entities
            Dim query = From v In myProjectsEntities.js_IdiomasVariantes Join i In myProjectsEntities.js_Idiomas On v.IdiomaPadre Equals i.IdiomaId
                        Select New With {.Nombre = i.Nombre, .Variante = v.Nombre, .IdiomaId = i.IdiomaId, .IdiomaVarianteId = v.IdiomaVarianteId}
 
            For Each v In query
                Dim texto As String
                Dim valor As Integer
 
                texto = v.Nombre & " - " & v.Variante
                valor = v.IdiomaVarianteId
 
                Dim elemento As New RadListBoxItem
                elemento.Text = texto
                elemento.Value = valor
 
                lista.Items.Add(elemento)
            Next
        End Using
 
    End Sub
 
    Protected Sub CargarTareas(lista As RadListBox)
 
        Using myProjectsEntities As New Extranet_JSProjects_Entities
            Dim query = From t In myProjectsEntities.js_TareasTraduccion
                        Order By t.Orden
                        Select t
 
            For Each t In query
                Dim texto As String
                Dim valor As Integer
 
                texto = t.Descripcion
                valor = t.idTarea
 
                Dim elemento As New RadListBoxItem
                elemento.Text = texto
                elemento.Value = valor
 
                lista.Items.Add(elemento)
            Next
        End Using
 
    End Sub
 
    Protected Sub Timer1_Tick(sender As Object, e As System.EventArgs) Handles Timer1.Tick
        Dim NumeroDeErrores As Integer = 0
 
        'Nombre del proyecto
        If txtRadProjectName.Text.Length = 0 Then
            NumeroDeErrores = NumeroDeErrores + 1
        End If
 
        'Purchase Order
        If txtRadPO.Text.Length = 0 And chkPONA.Checked = False Then
            NumeroDeErrores = NumeroDeErrores + 1
        End If
 
        If NumeroDeErrores = 0 Then
            'RadToolTipManager1.TargetControls.Clear()
            imgStatusCrearProyecto.ImageUrl = "~/Resources/Icons/check-icon.jpg"
        Else
            'RadToolTipManager1.TargetControls.Add(imgStatusCrearProyecto.ClientID, True)
            imgStatusCrearProyecto.ImageUrl = "~/Resources/Icons/cross-icon.jpg"
        End If
 
    End Sub
 
    Private Sub AgregarError(Campo As String, Descripcion As String, ListaDeErrores As List(Of ErroresAlCrearProyecto))
        Dim ErrorEnCurso As New ErroresAlCrearProyecto
 
        ErrorEnCurso.Campo = Campo
        ErrorEnCurso.DescripcionError = Descripcion
 
        ListaDeErrores.Add(ErrorEnCurso)
    End Sub
 
 
    Protected Sub OnAjaxUpdate(sender As Object, e As ToolTipUpdateEventArgs)
 
        Dim ListaDeErrores As New List(Of ErroresAlCrearProyecto)
 
        Using myEntities As New Extranet_JSProjects_Entities
 
            'Eliminar todos los registros que haya en la tabla
            Dim query = From r In myEntities.js_ErroresCrearProyecto
                       Select r
 
            For Each r In query
                myEntities.js_ErroresCrearProyecto.DeleteObject(r)
            Next
 
 
            'Añadir el error a la tabla js_ErroresCrearProyecto
 
            'Nombre del proyecto
            If txtRadProjectName.Text.Length = 0 Then
                AgregarError("Project Name", "Enter a project name", ListaDeErrores)
            End If
 
            'Purchase Order
            If txtRadPO.Text.Length = 0 And chkPONA.Checked = False Then
                AgregarError("Purchase Order", "Enter a PO or tick the checkbox", ListaDeErrores)
            End If
 
            For Each r In ListaDeErrores
                Dim NuevoError As New js_ErroresCrearProyecto
                NuevoError.Campo = r.Campo
                NuevoError.Descripcion = r.DescripcionError
                myEntities.AddTojs_ErroresCrearProyecto(NuevoError)
            Next
 
            myEntities.SaveChanges()
 
        End Using
 
        Dim panel As New UpdatePanel
        panel = e.UpdatePanel
 
        Dim ctrl As Control = Page.LoadControl("CreateProjectErrors.ascx")
        panel.ContentTemplateContainer.Controls.Add(ctrl)
 
    End Sub
 
 
    Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click
        Response.Redirect("UploadFiles.aspx")
    End Sub
 
 
    Protected Sub RadListBox2_Deleted(sender As Object, e As Telerik.Web.UI.RadListBoxEventArgs) Handles lstRadSouceLangSelected.Deleted
        lstRadSouceLangLista.ButtonSettings.TransferButtons = ListBoxTransferButtons.TransferFrom
        lstRadSouceLangLista.AllowTransferOnDoubleClick = True
        lstRadSouceLangSelected.AllowTransferOnDoubleClick = False
    End Sub
 
 
    Protected Sub RadListBox2_Inserted(sender As Object, e As Telerik.Web.UI.RadListBoxEventArgs) Handles lstRadSouceLangSelected.Inserted
        lstRadSouceLangLista.ButtonSettings.TransferButtons = ListBoxTransferButtons.TransferTo
        lstRadSouceLangLista.AllowTransferOnDoubleClick = False
        lstRadSouceLangSelected.AllowTransferOnDoubleClick = True
    End Sub
 
    Protected Sub RadComboBoxTTools_DataBound(sender As Object, e As System.EventArgs) Handles cmbRadTTools.DataBound
        cmbRadTTools.SortItems()
 
        'Seleccionar por omisión la opción "No choice"
        For Each elemento As RadComboBoxItem In cmbRadTTools.Items
            If elemento.Text = AppConfiguration._String_NoChoice Then
                elemento.Selected = True
                elemento.Checked = True
            End If
        Next
    End Sub
 
    Protected Sub cmbRadTTools_ItemChecked(sender As Object, e As Telerik.Web.UI.RadComboBoxItemEventArgs) Handles cmbRadTTools.ItemChecked
 
        'Si se selecciona "No Choice" se deseleccionan todos los demás
        'Se se selecciona cualquier otro se deselecciona "No Choice"
 
        If e.Item.Text = AppConfiguration._String_NoChoice Then
            For Each elemento As RadComboBoxItem In cmbRadTTools.Items
                If elemento.Text <> AppConfiguration._String_NoChoice Then
                    elemento.Checked = False
                End If
            Next
        Else
            For Each elemento As RadComboBoxItem In cmbRadTTools.Items
                If elemento.Text = AppConfiguration._String_NoChoice Then
                    elemento.Checked = False
                End If
            Next
        End If
 
        If e.Item.Text = AppConfiguration._String_Other And e.Item.Checked = True Then
            div_OtherTTool.Attributes("style") = "visibility:visible"
        End If
 
        If e.Item.Text = AppConfiguration._String_Other And e.Item.Checked = False Then
            div_OtherTTool.Attributes("style") = "visibility:hidden"
        End If
 
        e.Item.Selected = True
 
        'Si no hay ningún elemento seleccionado, seleccionar "No Choice"
        If cmbRadTTools.CheckedItems.Count = 0 Then
            For Each elemento As RadComboBoxItem In cmbRadTTools.Items
                If elemento.Text = AppConfiguration._String_NoChoice Then
                    elemento.Checked = True
                    elemento.Selected = True
                End If
            Next
        End If
 
    End Sub
 
 
    Protected Sub chkPONA_CheckedChanged(sender As Object, e As System.EventArgs) Handles chkPONA.CheckedChanged
        If chkPONA.Checked = True Then
            txtRadPO.Enabled = False
        Else
            txtRadPO.Enabled = True
        End If
    End Sub
 
    Protected Sub cmbRadTimeZone_DataBound(sender As Object, e As System.EventArgs) Handles cmbRadTimeZone.DataBound
        'Seleccionar la zona horaria del usuario
        For Each elemento As RadComboBoxItem In cmbRadTimeZone.Items
            Dim valor = Convert.ToDouble(elemento.Value)
            If valor = Profile.TimeZone Then
                elemento.Selected = True
            End If
        Next
    End Sub
 
 
    Protected Sub radioTranslateSelect_CheckedChanged(sender As Object, e As System.EventArgs) Handles radioTranslateSelect.CheckedChanged
        chkTranslateImages.Enabled = CType(sender, RadioButton).Checked
        chkTranslateText.Enabled = CType(sender, RadioButton).Checked
        chkTranslateTextBoxes.Enabled = CType(sender, RadioButton).Checked
        chkTranslateOther.Enabled = CType(sender, RadioButton).Checked
    End Sub
 
 
    Protected Sub radioTranslateAll_CheckedChanged(sender As Object, e As System.EventArgs) Handles radioTranslateAll.CheckedChanged
        chkTranslateImages.Enabled = Not CType(sender, RadioButton).Checked
        chkTranslateText.Enabled = Not CType(sender, RadioButton).Checked
        chkTranslateTextBoxes.Enabled = Not CType(sender, RadioButton).Checked
        chkTranslateOther.Enabled = Not CType(sender, RadioButton).Checked
    End Sub
 
    Protected Sub chkTranslateOther_CheckedChanged(sender As Object, e As System.EventArgs) Handles chkTranslateOther.CheckedChanged
        txtRadTranslateOther.Enabled = CType(sender, CheckBox).Checked
    End Sub
 
    Protected Sub chkDeliveryOther_CheckedChanged(sender As Object, e As System.EventArgs) Handles chkDeliveryOther.CheckedChanged
        txtRadDeliveryOther.Enabled = CType(sender, CheckBox).Checked
    End Sub
 
 
End Class


CreateProjectErrors.ascx
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="CreateProjectErrors.ascx.vb" Inherits="Web_Clients_WebUserControl" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
 
<table width="360px" cellpadding="1">
    <tr>
        <td style="width:150px;">
                <strong>Field</strong>
            </td>
            <td style="width:200px;">
                <strong>Error</strong>
            </td>
        </tr>
    <tr>
        <td >
              
        </td>
        <td >
              
        </td>
    </tr>
    <asp:Repeater ID="repeaterErroresCrearProyecto" runat="server">
        <ItemTemplate>
            <tr>
                <td>
                    <%# Eval("Campo")%>
                </td>
                <td>
                    <%# Eval("Descripcion")%>
                </td>
            </tr>
        </ItemTemplate>
    </asp:Repeater>
</table>
 
<asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=Extranet_JSProjects_Entities"
    DefaultContainerName="Extranet_JSProjects_Entities" EnableFlattening="False" EntitySetName="js_ErroresCrearProyecto"
    Select="it.[Campo], it.[Descripcion]">
</asp:EntityDataSource>


CreateProject.ascx.vb
Partial Class Web_Clients_WebUserControl
    Inherits System.Web.UI.UserControl
 
    Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
 
        repeaterErroresCrearProyecto.DataSource = EntityDataSource1
        repeaterErroresCrearProyecto.DataBind()
 
    End Sub
 
End Class

4 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 17 Jan 2012, 06:41 AM
Hello,

Take a look into this documentation which discussed the same.

Thanks,
Princy.
0
Joaquín
Top achievements
Rank 2
answered on 17 Jan 2012, 01:58 PM
Hello Princy,

Thank you for your answer. I have read the blog you susggested, but unluckyly, the answer seems no the be there. I have removed everything related with Ajax in the page, but the OnAjaxUpdate routine of the RadToolTipManager. Now the exception is not appearing anymore. However, everytime a postback is triggered, if the Transfer-To listboxes contain some item, these are duplicated (which is just weird).

At this poing, after several days spending quite a bunch of hours trying to find a solution, I tend to think that there is something wrong in my OnAjaxUpdate routine, but cant figure what it is. I guess that I will just remove the RadToolTipManager from the project and will replace its function with an easy and totally trusted check on the page postback.

J.
0
Marin Bratanov
Telerik team
answered on 18 Jan 2012, 05:28 PM
Hi J,

I am sorry to hear you are having such trouble. I tried running your code, but in order to do so I had to strip out the datasources and custom namespaces. After that things were working fine with me, which makes me believe the issue stems somewhere in the code I had to comment out. I am attaching my test page as a reference hoping that this isolated case will help you pinpoint the origin of the error. Please keep in mind that such an alert is the way the AJAX framework shows server errors thrown during the ajax request, so I advise that you add several breakpoints in your code so that you can run the page in debug mode, step through them and see where and what the exact error is in order to resolve it.

I can also suggest that you replace the RadAjaxPanel with ID RadAjaxPanel1 with a regular update panel with UpdateMode set to Conditional. I am asking this so that we make sure there isn't an endless AJAX request loop. What happens in your case is that you have a timer that triggers an update every second, yet two subsequent AJAX requests result in only the last being executed, so if something in your code-behind is not executed, yet later code relies on it this is a very likely reason for a server error.

Since the check I see in the Timer1.Tick event is mainly if there is text in certain textboxes you can also try using the asp RequiredFieldValidator and place the ValidationSummary in a regular RadToolTip or leave it on the page. You could also add an asp UpdatePanel in it to load the needed user control or simply update it. This demo shows an idea how to place the validation summary in a popup.


Kind regards,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Joaquín
Top achievements
Rank 2
answered on 19 Jan 2012, 05:22 PM
Thank you for your detailed reply Marin (I can see it took a bit of work to you to make it up). I will try to implement things as you describe and will see how it goes.
J.
Tags
ToolTip
Asked by
Joaquín
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Joaquín
Top achievements
Rank 2
Marin Bratanov
Telerik team
Share this question
or