radcombobox backspace after postback

12 posts, 0 answers
  1. Ken Cash
    Ken Cash avatar
    2 posts
    Member since:
    Mar 2010

    Posted 26 Apr 2012 Link to this post

    I have a weird problem that I hope you can help with.  I have a number of radComboboxes on a page all with LoadOnDemand enabled via webservice.  Everything works find except that when a postback occurs on my first combobox, I can no longer use backspace to remove characters from the Text of the combobox.  Instead it takes me back a page in the browser history.  If I turn the AutoPostback OFF, then I can edit the Text all day.  Any ideas?
    Here is my code:
    <%@ Page Title="Quick Entry" Language="VB" MasterPageFile="~/AIR.master" AutoEventWireup="false" CodeFile="quick_report.aspx.vb" Inherits="quick_report" %>
      
    <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
      
    <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
      
        <script type="text/javascript">
            function OnClientItemsRequestingHandler(sender, eventArgs) {
                var context = eventArgs.get_context();
                var hiddenField = document.getElementById("<%= hidEmpLocation.ClientID %>");
       
                context["FilterValue"] = hiddenField.value;
            }
      
            function show_vehicle_involved_help() {
                var oWnd = $find("<%=winItem3.ClientID %>");
                oWnd.set_height(500);
                oWnd.setUrl('vehicle_involved_help.htm');
                oWnd.show();
            }
      
            function open_password() {
                var oWnd = $find("<%=winItem3.ClientID %>");
                oWnd.set_height(200);
                oWnd.setUrl('change_password.aspx');
                oWnd.show();
            }
      
            function set_data_changed() {
                var myHidDC = document.getElementById("<%= hidDataChanged.ClientID %>")
                    myHidDC.value = "1";
            }
      
            function check_data_changed() {
                var myHidDC = document.getElementById("<%= hidDataChanged.ClientID %>")
                if (myHidDC.value == "1") {
                    return confirm('Discard changes?');
                } else {
                    return true;
                }
            }
      
            function set_dtofaccident_focus(sender, eventArgs) {
                var myD = $find("<%=txtDateOfAccident.DateInput.ClientID%>");
                if (myD != null) {
                    myD.focus();
                }
            }
      
            function set_dtreported_focus(sender, eventArgs) {
                var myD = $find("<%=txtDateReported.DateInput.ClientID%>");
                if (myD != null) {
                    myD.focus();
                }
            }
      
            function show_severity_help() {
                var oWnd = $find("<%=winItem3.ClientID %>");
                oWnd.set_height(500);
                oWnd.setUrl('severity_help.htm');
                oWnd.show();
                //radopen("severity_help.htm","HELP");
            }
      
            function show_item3_help() {
                var oWnd = $find("<%=winItem3.ClientID %>");
                oWnd.set_height(250);
                oWnd.setUrl('item3_help.htm');
                oWnd.show();
                //radopen("item3_help.htm", "winItem3");
            }
      
            function radpopup(msg) {
                var win = radalert(msg);
                win.add_close(function() {
                    window.location = 'quick_report.aspx?userid=<%=Session("userid") %>';
                });
            }
        </script>
        <style type="text/css">
            .readonly
            {
                color: Maroon;
            }
      
            .tbl_left 
            {
                width: 30%;
                text-align: right;
                vertical-align:top;    
            }
      
            .tbl_right 
            {
                width: 70%;
                text-align: left;
                vertical-align:top;    
            }
         
            .tbl_middle
            {
                width: 70%;
                text-align: left;
                vertical-align:top;    
            }
      
        .RadPicker
        {
            vertical-align:middle;
        }
      
        .RadPicker .rcTable
        {
            table-layout:auto;
        }
      
        .RadPicker .RadInput
        {
            vertical-align:baseline;
        }
      
       .RadInput
        {
            vertical-align:middle;
        }
      
        .RadInput_Default
        {
            font:12px "segoe ui",arial,sans-serif;
        }
      
        .RadPicker .rcCalPopup
        {
            display:block;
            overflow:hidden;
            width:22px;
            height:22px;
            background-color:transparent;
            background-repeat:no-repeat;
            text-indent:-2222px;
            text-align:center;
        }
              
        .RadPicker_Default .rcCalPopup
        {
            background-image:url('mvwres://Telerik.Web.UI, Version=2010.1.309.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4/Telerik.Web.UI.Skins.Default.Calendar.sprite.gif');
        }
      
        .RadPicker_Default .rcCalPopup
        {
            background-position:0 0;
        }
      
        .style1
        {
            width: 70%;
            text-align: left;
            vertical-align: top;
            font-weight: bold;
        }
      
        </style>
    </asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="MenuBar" Runat="Server">
        <asp:LinkButton ID="cmdChangePassword" runat="server" Visible="true" OnClientClick="open_password(); return false;">Change Password</asp:LinkButton>
        <telerik:RadWindow runat="server" ID="winItem3" Height="2px" Width="800px" OffsetElementID=""
            Modal="true" Behaviors="Close" EnableShadow="true" VisibleStatusbar="false">
        </telerik:RadWindow>
    </asp:Content>
    <asp:Content ID="Content3" ContentPlaceHolderID="Header" Runat="Server">
        </asp:Content>
    <asp:Content ID="Content4" ContentPlaceHolderID="Body" Runat="Server">
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        </telerik:RadAjaxManager>
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" height="100%" 
            width="100%">
        <asp:UpdatePanel ID="UP1" runat="server">
            <ContentTemplate>
                <asp:HiddenField ID="hidDataChanged" runat="server" Value="0" />
                <asp:HiddenField ID="hidCallerTitleId" runat="server" Value="0" />
                <asp:HiddenField ID="hidEmpLocation" runat="server" Value="0" />
                <table style="width:100%; text-align:center; vertical-align:top;">
                    <tr>
                        <td class="tbl_left" 
                            style="text-align:left; color: #FF0000; font-weight: bold;">
                            * = required fields</td>
                        <td width="35%" style="text-align:left;">
                            <b><asp:Literal runat="server" ID="qe_item1"></asp:Literal></b></td>
                    </tr>
                    <tr>
                        <td class="tbl_left" style="text-align:left;">
                             </td>
                        <td width="35%" style="text-align: left;">
                            <b>
                                <asp:Literal runat="server" ID="qe_item2"></asp:Literal></b>
                        </td>
                    </tr>
                    <tr>
                        <td class="tbl_left" style="text-align:left;">
                             </td>
                        <td width="35%" style="text-align: left;">
                            <asp:Label ID="lblItem3" runat="server" style="font-weight: 700" 
                                Text="3. Was there a fatality involved or other serious incident ( Follow SOP 3-017 ) ?" 
                                ToolTip=""></asp:Label>
                             <asp:ImageButton ID="imgItem3Help" runat="server" ImageAlign="Middle" 
                                ImageUrl="~/Images/help2.png" OnClientClick="show_item3_help()" 
                                ToolTip="Help" />
                        </td>
                    </tr>
                    <tr>
                        <td class="tbl_left" style="text-align:left;">
                             </td>
                        <td class="tbl_middle">
                            <asp:Button ID="cmdSubmitTop" runat="server" Text="Submit" />
                        </td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                             </td>
                        <td class="tbl_middle" style="font-weight: bold">
                            What is your GSN?</td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                            <span style="color: #FF0000">* </span>Caller's GSN:</td>
                        <td class="tbl_middle">
                            <telerik:RadComboBox ID="cboCallersGSN" Runat="server" 
                                EnableLoadOnDemand="True" EnableVirtualScrolling="True" 
                                ShowMoreResultsBox="True" ForeColor="Maroon" MarkFirstMatch="True" 
                                TabIndex="1" AutoPostBack="True">
                                <WebServiceSettings Method="Get_Caller_GSN" Path="DPSG_Data.asmx" />
                            </telerik:RadComboBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                             </td>
                        <td class="tbl_middle" style="font-weight: bold">
                            What is your name?</td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                            <span style="color: #FF0000">* </span>Caller's Name:</td>
                        <td class="tbl_middle">
                            <asp:TextBox ID="txtCallerName" runat="server" Width="200px" ReadOnly="True" 
                                CssClass="readonly" TabIndex="1"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                             </td>
                        <td class="tbl_middle" style="font-weight: bold">
                            What is your title?</td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                            <span style="color: #FF0000">* </span>Caller's Title:</td>
                        <td class="tbl_middle">
                            <asp:TextBox ID="txtCallerTitle" runat="server" CssClass="readonly" 
                                TabIndex="1" Width="300px" ReadOnly="True"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                             </td>
                        <td class="tbl_middle" style="font-weight: bold">
                            What is your best contact phone number?</td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                            <span style="color: #FF0000">* </span>Caller's Phone #:</td>
                        <td class="tbl_middle">
                            <telerik:RadMaskedTextBox ID="txtCallerPhone" runat="server" LabelCssClass="" 
                                Mask="(###) ###-####" TabIndex="1" TextWithLiterals="() -" Width="80px" 
                                ForeColor="Maroon">
                            </telerik:RadMaskedTextBox>
                             Ext:
                            <telerik:RadMaskedTextBox ID="txtCallerExt" runat="server" LabelCssClass="" 
                                Mask="###-####" TabIndex="1" TextWithLiterals="" Width="50px" 
                                ForeColor="Maroon">
                            </telerik:RadMaskedTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                             </td>
                        <td class="tbl_middle">
                            <b>What is your e-mail address?</b
                            <br />
                            <i>Please have the caller spell out and repeat back to ensure it is correct.</i></td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                            <span style="color: #FF0000">* </span>Caller's E-Mail:</td>
                        <td class="tbl_middle">
                            <asp:TextBox ID="txtCallerEMail" runat="server" TabIndex="1" width="300px" 
                                CssClass="readonly" ReadOnly="True"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                             </td>
                        <td class="style1">
                            Was the person involved a DPSG employee?</td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                            DPSG Employee?</td>
                        <td class="tbl_middle">
                            <asp:RadioButtonList ID="opgDPSGEmployee" runat="server" AutoPostBack="True" 
                                RepeatDirection="Horizontal" RepeatLayout="Flow" TabIndex="1" 
                                ForeColor="Maroon">
                                <asp:ListItem Selected="True" Value="1">Yes</asp:ListItem>
                                <asp:ListItem Value="0">No</asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                             </td>
                        <td class="tbl_middle">
                            <b>Who was the person involved?</b><br />
                            <span style="font-weight: normal; font-style: italic">Please say and spell the 
                            first and last name.</span></td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                            <span style="color: #FF0000">* </span>Name of Person Involved:</td>
                        <td class="tbl_middle">
                            <telerik:RadComboBox ID="cboPersonInvolved" Runat="server" 
                                TabIndex="1" ShowMoreResultsBox="true" EnableVirtualScrolling="true" 
                                EnableLoadOnDemand="True" ForeColor="Maroon" AutoPostBack="True">
                                <WebServiceSettings Method="Get_Employees" Path="DPSG_Data.asmx" />
                            </telerik:RadComboBox>
                            <asp:TextBox ID="txtPersonInvolved" runat="server" TabIndex="1" Visible="False" 
                                Width="300px" ForeColor="Maroon"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                             </td>
                        <td class="tbl_middle" style="font-weight: bold">
                            What is the person's best contact phone number?</td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                            Person's Phone #:</td>
                        <td class="tbl_middle">
                            <telerik:RadMaskedTextBox ID="txtEmpPhone" runat="server" LabelCssClass="" 
                                Mask="(###) ###-####" TabIndex="1" TextWithLiterals="() -" Width="80px" 
                                ForeColor="Maroon">
                            </telerik:RadMaskedTextBox>
                             Ext:
                            <telerik:RadMaskedTextBox ID="txtEmpExt" runat="server" LabelCssClass="" 
                                Mask="###-####" TabIndex="1" TextWithLiterals="" Width="50px" 
                                ForeColor="Maroon">
                            </telerik:RadMaskedTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                             </td>
                        <td class="tbl_middle" style="font-weight: bold">
                            At which DPSG location or site does this person report to?</td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                                <span style="color: #FF0000">* </span>Location/Site:</td>
                        <td class="tbl_middle">
                            <telerik:RadComboBox ID="cboLocation" Runat="server" 
                                TabIndex="1" ShowMoreResultsBox="true" EnableVirtualScrolling="true" 
                                EnableLoadOnDemand="True" ForeColor="Maroon" OnClientItemsRequesting="OnClientItemsRequestingHandler">
                                <WebServiceSettings Method="Get_Caller_Location" Path="DPSG_Data.asmx" />
                            </telerik:RadComboBox>
                            <asp:Label ID="lblNA" runat="server" ForeColor="Maroon" Text="N/A" 
                                Visible="False"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                             </td>
                        <td class="tbl_middle" style="font-weight: bold">
                            When did this incident occur, date & time?</td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                            <span style="color: #FF0000">* </span>Date of Incident:</td>
                        <td class="tbl_middle">
                            <telerik:RadDatePicker ID="txtDateOfAccident" runat="server" 
                                Culture="English (United States)" TabIndex="1" Width="100px" 
                                ForeColor="Maroon">
                                <Calendar ShowRowHeaders="False" UseColumnHeadersAsSelectors="False" 
                                    UseRowHeadersAsSelectors="False" ViewSelectorText="x">
                                </Calendar>
                                <DateInput DateFormat="MM/dd/yyyy" DisplayDateFormat="MM/dd/yyyy" 
                                    LabelCssClass="" TabIndex="1" Width="" forecolor="Maroon">
                                </DateInput>
                                <DatePopupButton CssClass="" HoverImageUrl="" ImageUrl="" TabIndex="9999" />
                                <ClientEvents OnPopupClosing="set_dtofaccident_focus" />
                            </telerik:RadDatePicker>
                        </td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                            <span style="color: #FF0000">* </span>Time of Incident:</td>
                        <td class="tbl_middle">
                            <telerik:RadTimePicker ID="txtTimeOfAccident" runat="server" 
                                Culture="English (United States)" TabIndex="1" Width="80px" 
                                ForeColor="Maroon">
                                <Calendar UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" 
                                    ViewSelectorText="x">
                                </Calendar>
                                <DatePopupButton CssClass="" HoverImageUrl="" ImageUrl="" TabIndex="1" 
                                    Visible="False" />
                                <TimeView CellSpacing="-1">
                                </TimeView>
                                <TimePopupButton CssClass="" HoverImageUrl="" ImageUrl="" />
                                <DateInput DateFormat="hh:mm tt" DisplayDateFormat="hh:mm tt" LabelCssClass="" 
                                    TabIndex="1" Width="" forecolor="Maroon">
                                </DateInput>
                            </telerik:RadTimePicker>
                        </td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                             </td>
                        <td class="tbl_middle" style="font-weight: bold">
                            Where did this incident occur?</td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                            <span style="color: #FF0000">* </span>Place of Incident:</td>
                        <td class="tbl_middle">
                            <asp:TextBox ID="txtPlaceOfAccident" runat="server" TabIndex="1" Width="300px" 
                                ForeColor="Maroon"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                             </td>
                        <td class="tbl_middle" style="font-weight: bold">
                            When was this incident reported to you, date & time?</td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                            <span style="color: #FF0000">* </span>Date Reported:</td>
                        <td class="tbl_middle">
                            <telerik:RadDatePicker ID="txtDateReported" runat="server" 
                                Culture="English (United States)" TabIndex="1" Width="100px" 
                                ForeColor="Maroon">
                                <Calendar ShowRowHeaders="False" UseColumnHeadersAsSelectors="False" 
                                    UseRowHeadersAsSelectors="False" ViewSelectorText="x">
                                </Calendar>
                                <DateInput DateFormat="MM/dd/yyyy" DisplayDateFormat="MM/dd/yyyy" 
                                    LabelCssClass="" TabIndex="1" Width="" forecolor="Maroon">
                                </DateInput>
                                <DatePopupButton CssClass="" HoverImageUrl="" ImageUrl="" TabIndex="9999" />
                                <ClientEvents OnPopupClosing="set_dtreported_focus" />
                            </telerik:RadDatePicker>
                        </td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                            <span style="color: #FF0000">* </span>Time Reported:</td>
                        <td class="tbl_middle">
                            <telerik:RadTimePicker ID="txtTimeReported" runat="server" 
                                Culture="English (United States)" TabIndex="1" Width="80px" 
                                ForeColor="Maroon">
                                <Calendar UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" 
                                    ViewSelectorText="x">
                                </Calendar>
                                <DatePopupButton CssClass="" HoverImageUrl="" ImageUrl="" TabIndex="1" 
                                    Visible="False" />
                                <TimeView CellSpacing="-1">
                                </TimeView>
                                <TimePopupButton CssClass="" HoverImageUrl="" ImageUrl="" />
                                <DateInput DateFormat="hh:mm tt" DisplayDateFormat="hh:mm tt" LabelCssClass="" 
                                    TabIndex="1" Width="" forecolor="Maroon">
                                </DateInput>
                            </telerik:RadTimePicker>
                        </td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                             </td>
                        <td class="tbl_middle" style="font-weight: bold">
                            Was the person injured?</td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                            <span style="color: #FF0000">* </span>Is Injury Involved?</td>
                        <td class="tbl_middle">
                            <asp:RadioButtonList ID="opgInjury" runat="server" AutoPostBack="True" 
                                RepeatDirection="Horizontal" RepeatLayout="Flow" TabIndex="1" 
                                ForeColor="Maroon">
                                <asp:ListItem Value="1">Yes</asp:ListItem>
                                <asp:ListItem Value="0">No</asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                            <span style="color: #FF0000">* </span>Severity:</td>
                        <td class="tbl_middle">
                            <asp:DropDownList ID="cboSeverity" runat="server" AutoPostBack="True" 
                                TabIndex="1" ForeColor="Maroon">
                            </asp:DropDownList>
                             <asp:ImageButton ID="imgHelp" runat="server" ImageAlign="Middle" 
                                ImageUrl="~/Images/help2.png" OnClientClick="show_severity_help()" />
                        </td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                             </td>
                        <td class="tbl_middle" style="font-weight: bold">
                            Was a company owned or leased vehicle involved?</td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                            <span style="color: #FF0000">* </span>Was Vehicle Involved?</td>
                        <td class="tbl_middle">
                            <asp:RadioButtonList ID="opgVehicle" runat="server" AutoPostBack="True" 
                                RepeatDirection="Horizontal" RepeatLayout="Flow" TabIndex="1" 
                                ForeColor="Maroon">
                                <asp:ListItem Value="1">Yes</asp:ListItem>
                                <asp:ListItem Value="0">No</asp:ListItem>
                            </asp:RadioButtonList>
                             <asp:ImageButton ID="imgHelpVehicleInvolved" runat="server" 
                                ImageAlign="Middle" ImageUrl="~/Images/help2.png" 
                                OnClientClick="show_vehicle_involved_help()" />
                        </td>
                    </tr>
                </table>
                <asp:Panel runat="server" ID="pnlT3" Visible="False">
                    <table ID="table1" 
                        style="width: 100%; text-align: center; vertical-align: top;">
                        <tr>
                            <td class="tbl_left">
                                 </td>
                            <td class="tbl_middle" style="font-weight: bold">
                                Was any vehicle towed from the scene of the accident?</td>
                            <td class="tbl_right" style="font-weight: bold">
                                 </td>
                        </tr>
                        <tr>
                            <td class="tbl_left">
                                <span style="color: #FF0000">* </span>Vehicle Towed?</td>
                            <td class="tbl_middle">
                                <asp:RadioButtonList ID="opgVehicleTowed" runat="server" AutoPostBack="True" 
                                    RepeatDirection="Horizontal" RepeatLayout="Flow" TabIndex="1">
                                    <asp:ListItem Value="1">Yes</asp:ListItem>
                                    <asp:ListItem Value="0">No</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                            <td class="tbl_right" style="font-weight: bold">
                                 </td>
                        </tr>
                        <tr>
                            <td class="tbl_left">
                                 </td>
                            <td class="tbl_middle" style="font-weight: bold">
                                Was any medical treatment required or provided away from the scene of the 
                                accident?</td>
                            <td class="tbl_right" style="font-weight: bold">
                                 </td>
                        </tr>
                        <tr>
                            <td class="tbl_left">
                                <span style="color: #FF0000">* </span>Medical Away from Scene?</td>
                            <td class="tbl_middle">
                                <asp:RadioButtonList ID="opgMedicalAway" runat="server" AutoPostBack="True" 
                                    RepeatDirection="Horizontal" RepeatLayout="Flow" TabIndex="1">
                                    <asp:ListItem Value="1">Yes</asp:ListItem>
                                    <asp:ListItem Value="0">No</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                            <td class="tbl_right" style="font-weight: bold">
                                 </td>
                        </tr>
                        <tr>
                            <td class="tbl_left">
                                <span style="color: #FF0000">* </span>Other?</td>
                            <td class="tbl_middle">
                                <asp:RadioButtonList ID="opgOther" runat="server" AutoPostBack="True" 
                                    RepeatDirection="Horizontal" RepeatLayout="Flow" TabIndex="1">
                                    <asp:ListItem Value="1">Yes</asp:ListItem>
                                    <asp:ListItem Value="0">No</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                            <td class="tbl_right" style="font-weight: bold">
                                 </td>
                        </tr>
                        <tr>
                            <td class="tbl_left">
                                 </td>
                            <td class="tbl_middle" style="font-weight: bold">
                                Was a 3rd party involved - either a 3rd party's vehicle, property damage or 
                                bodily injury?</td>
                            <td class="tbl_right">
                                 </td>
                        </tr>
                        <tr>
                            <td class="tbl_left">
                                 </td>
                            <td class="tbl_middle">
                                 </td>
                            <td class="tbl_right" style="font-weight: bold">
                                 </td>
                        </tr>
                    </table>
                </asp:Panel>
                <table style="width: 100%; text-align: center; vertical-align: top;">
                    <tr>
                        <td class="tbl_left">
                            <span style="color: #FF0000">* </span>Is Third Party Involved?</td>
                        <td class="tbl_right">
                            <asp:RadioButtonList ID="opgThirdParty" runat="server" AutoPostBack="True" 
                                RepeatDirection="Horizontal" RepeatLayout="Flow" TabIndex="1" 
                                ForeColor="Maroon">
                                <asp:ListItem Value="1">Yes</asp:ListItem>
                                <asp:ListItem Value="0">No</asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                             </td>
                        <td class="tbl_right" style="font-weight: bold">
                            Please describe what happened.</td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                            <span style="color: #FF0000">* </span>Initial Incident Description:</td>
                        <td class="tbl_right">
                            <table ID="table2" cellpadding="3" cellspacing="0" 
                                style="width: 100%; border: solid 1px black">
                                <tr>
                                    <td>
                                        <asp:TextBox ID="txtInv" runat="server" BorderStyle="Solid" BorderWidth="1px" 
                                            Font-Names="Arial" Font-Size="10pt" Rows="5" TabIndex="1" TextMode="MultiLine" 
                                            Width="100%" ForeColor="Maroon"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <telerik:RadSpell ID="RadSpell1" runat="server" ControlsToCheck="txtInv" 
                                            Height="28px" SupportedLanguages="en-US,English" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                             </td>
                        <td class="tbl_right" style="font-weight: bold">
                            Once the report is complete, click "Submit".<br />
                            <i>If report meets critical criteria, do not submit - follow callout rules.</i></td>
                    </tr>
                    <tr>
                        <td class="tbl_left" style="height: 25px">
                               
                        </td>
                        <td class="tbl_right" style="height: 25px">
                            </td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                             </td>
                        <td class="tbl_right">
                            <b><asp:Literal runat="server" ID="qe_bottom_notes_1"></asp:Literal></b>  <i>
                                <asp:Literal runat="server" ID="qe_bottom_notes_2"></asp:Literal></i></td>
                    </tr>
                    <tr>
                        <td class="tbl_left">
                             </td>
                        <td class="tbl_right">
                            <asp:Button ID="cmdSubmitBottom" runat="server" Text="Submit" />
                        </td>
                    </tr>
                </table>
                <br />
            </ContentTemplate>
        </asp:UpdatePanel>
        </telerik:RadAjaxPanel>
    </asp:Content>

    And here is the codebehind for the page in question:
    Imports DRP_Data
    Imports System.Web.Configuration
    Imports Functions
    Imports Telerik.Web.UI
      
    Partial Class quick_report
        Inherits System.Web.UI.Page
        Friend mySD As DRP_DataAdapter
        Friend Error_Email As String = ""
        Friend ReportID As String = ""
        Friend AH As New DRP_DataReader
      
        Protected Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload
            mySD.DataSet.Clear()
            mySD.CloseConn()
            mySD = Nothing
        End Sub
      
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            Dim myBody As HtmlGenericControl = Master.FindControl("pageBody")
            myBody.Attributes.Add("onkeydown", "javascript:if(window.event.keyCode == 13) window.event.keyCode = 9;")
      
            If Request.Params("userid") IsNot Nothing Then
                Session("userid") = Request.Params("userid")
            End If
      
            Dim lblReportStatus As Label = CType(Master.FindControl("lblReportStatus"), Label)
            lblReportStatus.Visible = False
      
            Dim lblSave As Label = CType(Master.FindControl("lblSave"), Label)
            lblSave.Visible = False
      
            Dim imgSave As ImageButton = CType(Master.FindControl("imgSave"), ImageButton)
            imgSave.Visible = False
      
            Dim imgHome As ImageButton = CType(Master.FindControl("imgHome"), ImageButton)
            imgHome.Visible = False
      
            Dim lblHome As Label = CType(Master.FindControl("lblHome"), Label)
            lblHome.Visible = False
      
            If Session("db_server") = Nothing Then
                Session("db_server") = WebConfigurationManager.AppSettings("db_server").ToString.Trim
                Session("db_name") = WebConfigurationManager.AppSettings("db_name").ToString.Trim
                Session("db_user") = WebConfigurationManager.AppSettings("db_user").ToString.Trim
                Session("db_password") = WebConfigurationManager.AppSettings("db_password").ToString.Trim
            End If
      
            qe_item1.Text = WebConfigurationManager.AppSettings("qe_item1_text").ToString.Trim
            qe_item2.Text = WebConfigurationManager.AppSettings("qe_item2_text").ToString.Trim
            qe_bottom_notes_1.Text = WebConfigurationManager.AppSettings("qe_bottom_notes_1").ToString.Trim
            qe_bottom_notes_2.Text = WebConfigurationManager.AppSettings("qe_bottom_notes_2").ToString.Trim
      
            Error_Email = WebConfigurationManager.AppSettings("error_email").ToString.Trim
      
            CType(Master.FindControl("lblReportStatus"), Label).Text = "Report Status: Open"
            CType(Master.FindControl("lblUserName"), Label).Text = Session("username")
      
            mySD = New DRP_DataAdapter
            mySD.Database_Server = Session("db_server")
            mySD.Database_Name = Session("db_name")
            mySD.Database_UserID = Session("db_user")
            mySD.Database_Passwrod = Session("db_password")
      
            Session("mode") = "ADD"
      
            Try
                mySD.OpenConn()
      
                If Page.IsPostBack = False Then
                    opgVehicleTowed.SelectedValue = Nothing
                    opgMedicalAway.SelectedValue = Nothing
                    'opgFatality.SelectedValue = Nothing
                    opgOther.SelectedValue = Nothing
                    opgThirdParty.SelectedValue = Nothing
                    opgInjury.SelectedValue = Nothing
      
                    cboCallersGSN.Focus()
      
                    Load_Severity()
                End If
            Catch ex As Exception
      
            End Try
        End Sub
      
        Private Sub Load_Severity()
            If mySD.DataSet.Tables.Contains("c_severity") Then
                mySD.DataSet.Tables("c_severity").Clear()
            End If
      
            mySD.Select_Command = "select 'select one...' as severity, 0 as severityid, 0 as sortby union all select severity, severityid, sortby from accidentseverity order by 3, 1"
            mySD.Fill("c_severity")
      
            cboSeverity.DataSource = mySD.DataSet
            cboSeverity.DataMember = "c_severity"
            cboSeverity.DataTextField = "severity"
            cboSeverity.DataValueField = "severityid"
            cboSeverity.DataBind()
      
            cboSeverity.Items.Remove(cboSeverity.Items.FindByText("Major Medical"))
        End Sub
      
        Private Sub Go_Home()
            Response.Redirect("~/main.aspx", False)
        End Sub
      
        Private Sub Save_Record()
            AH.Server_Address = Session("db_server")
            AH.Server_Database = Session("db_name")
            AH.Server_UserId = Session("db_user")
            AH.Server_Password = Session("db_password")
      
            Try
                AH.OpenConn()
                'Save air_header record so we have a valid air_header_id value
                Dim newReportID As String = ""
                Dim insert_str As String = ""
                insert_str += "0,"
                insert_str += cboLocation.SelectedValue.ToString.Trim + ","
                insert_str += "1,"
                insert_str += cboSeverity.SelectedValue.ToString.Trim + ","
                If txtDateOfAccident.SelectedDate IsNot Nothing Then
                    insert_str += "'" + Date.Parse(txtDateOfAccident.SelectedDate.Value.ToShortDateString + " " + Format(txtTimeOfAccident.SelectedDate, "hh:mm tt").ToString).ToString + "'" + ","
                Else
                    insert_str += "''" + ","
                End If
                If txtDateReported.SelectedDate IsNot Nothing Then
                    insert_str += "'" + Date.Parse(txtDateReported.SelectedDate.Value.ToShortDateString + " " + Format(txtTimeReported.SelectedDate, "hh:mm tt").ToString).ToString + "'" + ","
                Else
                    insert_str += "''" + ","
                End If
                If opgDPSGEmployee.SelectedValue = "1" Then
                    insert_str += Session("emp_no").ToString + ","
                    insert_str += "'" + cboPersonInvolved.Text.Replace("'", "''") + "'" + ","
                Else
                    insert_str += "0,"
                    insert_str += "'" + txtPersonInvolved.Text.Trim.Replace("'", "''") + "'" + ","
                End If
                insert_str += "'" + txtEmpPhone.Text.Trim + "'" + ","
                insert_str += "'" + txtEmpExt.Text.Trim + "'" + ","
                insert_str += "-1,"
                insert_str += "-1,"
                insert_str += "''" + ","
                insert_str += "'" + txtPlaceOfAccident.Text.Trim.Replace("'", "''") + "'" + ","
                insert_str += Session("callers_gsn").ToString + ","
                insert_str += "'" + txtCallerName.Text.Trim.Replace("'", "''") + "'" + ","
                insert_str += "''" + ","
                'insert_str += IIf(cboSeverity.SelectedItem.Text.Contains("Medical"), "5,", "-1,")
                insert_str += IIf(cboSeverity.SelectedItem.Text.Contains("Medical"), "5,", "6,")
                insert_str += "0,"
                insert_str += "0,"
                insert_str += "0,"
                insert_str += "''" + ","
                insert_str += "0,"
                insert_str += "0,"
                insert_str += "-1,"
                insert_str += "''" + ","
                insert_str += "''" + ","
                insert_str += "''" + ","
                insert_str += "''" + ","
                insert_str += "''" + ","
                insert_str += Session("YAC").ToString + "," 'Yrs At Co
                insert_str += Session("MAC").ToString + "," 'Mos At Co
      
                Dim cur_pos_id As Integer = -1
                cur_pos_id = get_cur_pos_id(Session("YACJ"), Session("MACJ"))
      
                insert_str += cur_pos_id.ToString + "," 'cur_pos_id
                insert_str += "''" + ","
                insert_str += "''" + ","
                insert_str += "''" + ","
                insert_str += "''" + ","
                insert_str += "0" + ","
                insert_str += "0" + ","
                insert_str += "0" + ","
                insert_str += "0" + ","
                insert_str += "0" + ","
                insert_str += "'A'" + ","   'happenedat
                insert_str += "0,"
                insert_str += "''" + ","
                insert_str += "''" + ","
                insert_str += hidCallerTitleId.Value.ToString + ","
                insert_str += "'" + txtCallerPhone.Text.Trim + "'" + ","
                insert_str += "'" + txtCallerExt.Text.Trim + "'" + ","
                insert_str += "'" + txtCallerEMail.Text.Trim.ToLower + "'" + ","
                If opgInjury.SelectedValue = "" Then
                    insert_str += "0,"
                Else
                    insert_str += opgInjury.SelectedValue.Trim + ","
                End If
                If opgVehicle.SelectedValue = "" Then
                    insert_str += "0,"
                Else
                    insert_str += opgVehicle.SelectedValue.Trim + ","
                End If
      
                'If opgVehicleTowed.SelectedValue = "" Then
                '    insert_str += "0,"
                'Else
                '    insert_str += opgVehicleTowed.SelectedValue.Trim + ","
                'End If
                insert_str += "0,"
      
                'If opgMedicalAway.SelectedValue = "" Then
                '    insert_str += "0,"
                'Else
                '    insert_str += opgMedicalAway.SelectedValue.Trim + ","
                'End If
                insert_str += "0,"
      
                'If opgFatality.SelectedValue = "" Then
                '    insert_str += "0,"
                'Else
                '    insert_str += opgFatality.SelectedValue.Trim + ","
                'End If
                insert_str += "0,"
      
                'If opgOther.SelectedValue = "" Then
                '    insert_str += "0,"
                'Else
                '    insert_str += opgOther.SelectedValue.Trim + ","
                'End If
                insert_str += "0,"
      
                If opgThirdParty.SelectedValue = "" Then
                    insert_str += "0,"
                Else
                    insert_str += opgThirdParty.SelectedValue.Trim + ","
                End If
                insert_str += Session("YACJ").ToString + ","
                insert_str += Session("MACJ").ToString + ","
                insert_str += Session("YAC").ToString + ","
                insert_str += Session("MAC").ToString + ","
                insert_str += Session("userid").ToString + ","
                insert_str += cboCallersGSN.SelectedValue.ToString
      
                If Session("mode").ToString.ToUpper = "ADD" Then
                    AH.Select_Command = "exec a_air_header " + insert_str
                    AH.ExecuteReader()
                    If AH.DataReader.HasRows Then
                        AH.DataReader.Read()
                        Session("air_header_id") = AH.DataReader("air_header_id")
                        CType(Master.FindControl("lblReportNo"), Label).Text = "Incident Report No. " + AH.DataReader("reportid").ToString
                        ReportID = AH.DataReader("reportid").ToString
                    End If
      
                    If txtCallerEMail.Text.Trim.Length > 0 Then
                        Send_EMail()
                    End If
                    AH.CloseReader()
      
                    'Save inv_text
                    insert_str = ""
                    insert_str += Session("air_header_id").ToString.Trim + ","
                    insert_str += "'" + txtInv.Text.Trim.Replace("'", "''") + "'" + ","
                    insert_str += "0" + ","
                    insert_str += "''" + ","
                    insert_str += "''"
      
                    If Session("mode").ToString.ToUpper = "ADD" Then
                        AH.Insert_Command = "exec a_air_investigation " + insert_str
                        AH.ExecuteNonQuery("INSERT")
                    End If
      
                    Dim msg As String = "<div style=""font-family: Arial; font-size: 12pt; text-alignment:center;"">The Report ID is\n</div><div style=""font-family: Arial; font-size: 18pt;"">" + ReportID + "</div>"
                    'ScriptManager.RegisterStartupScript(Me, Me.GetType(), "report_no", "radalert('" + msg + "');window.location = 'quick_report.aspx';", True)
                    ScriptManager.RegisterStartupScript(Me, Me.GetType(), "report_no", "radpopup('" + msg + "')", True)
                End If
                'Response.Redirect("~/quick_report.aspx", True)
            Catch ex As Exception
                Dim errmsg As String = ""
                errmsg = ex.Message + vbCrLf + ex.Source + vbCrLf + ex.StackTrace
                EMail_Class.Class1.Send_eMail(Error_Email, WebConfigurationManager.AppSettings("email_username").ToString.Trim, "", "Application Error", errmsg)
            Finally
                AH.CloseConn()
                Session("callers_gsn") = ""
                Session("emp_no") = ""
                Session("YACJ") = 0
                Session("MACJ") = 0
                Session("YAC") = 0
                Session("MAC") = 0
                Session("userid") = 0
            End Try
        End Sub
      
        Private Function get_cur_pos_id(ByVal Yrs As Integer, ByVal mos As Integer) As Integer
            Dim RetVal As Integer = -1
            Select Case Yrs
                Case Is < 1
                    RetVal = 1
                Case 1 To 5
                    RetVal = 2
                Case Is > 5
                    RetVal = 3
            End Select
      
            Return RetVal
        End Function
      
        Private Sub Send_EMail()
            Dim Email_Msg As String = ""
            If System.IO.File.Exists(Server.MapPath("body_text.txt")) Then
                Email_Msg = System.IO.File.ReadAllText(Server.MapPath("body_text.txt"))
                Email_Msg = Email_Msg.Replace("<<ReportID>>", ReportID)
                Email_Msg = Email_Msg.Replace("<<CallerName>>", txtCallerName.Text.Trim)
                Email_Msg = Email_Msg.Replace("<<CallerTitle>>", hidCallerTitleId.Value.ToString.Trim)
                Email_Msg = Email_Msg.Replace("<<CallerPhone>>", txtCallerPhone.Text.Trim)
                Email_Msg = Email_Msg.Replace("<<CallerExt>>", txtCallerExt.Text.Trim)
                Email_Msg = Email_Msg.Replace("<<CallerEmail>>", txtCallerEMail.Text.Trim)
                Email_Msg = Email_Msg.Replace("<<EmpName>>", txtPersonInvolved.Text.Trim)
                Email_Msg = Email_Msg.Replace("<<EmpPhone>>", txtEmpPhone.Text.Trim)
                Email_Msg = Email_Msg.Replace("<<EmpExt>>", txtEmpExt.Text.Trim)
                Email_Msg = Email_Msg.Replace("<<Location>>", cboLocation.Text.Trim)
                Email_Msg = Email_Msg.Replace("<<DateOfIncident>>", Format(txtDateOfAccident.SelectedDate, "MM/dd/yyyy").ToString)
                Email_Msg = Email_Msg.Replace("<<TimeOfIncident>>", Format(txtTimeOfAccident.SelectedDate, "hh:mm tt").ToString)
                Email_Msg = Email_Msg.Replace("<<PlaceOfIncident>>", txtPlaceOfAccident.Text.ToString)
                Email_Msg = Email_Msg.Replace("<<DateReported>>", Format(txtDateReported.SelectedDate, "MM/dd/yyyy").ToString)
                Email_Msg = Email_Msg.Replace("<<TimeReported>>", Format(txtTimeReported.SelectedDate, "hh:mm tt").ToString)
                Email_Msg = Email_Msg.Replace("<<InjuryInvolved>>", IIf(opgInjury.SelectedValue = "1", "Injury: Yes", "Injury: No"))
                Email_Msg = Email_Msg.Replace("<<Severity>>", cboSeverity.SelectedItem.Text.Trim)
                Email_Msg = Email_Msg.Replace("<<VehicleInvolved>>", IIf(opgVehicle.SelectedValue = "1", "Vehicle Involved: Yes", "Vehicle Involved: No"))
                Email_Msg = Email_Msg.Replace("<<VehicleTowed>>", IIf(opgVehicleTowed.SelectedValue = "1", "Vehicle Towed: Yes", "Vehicle Towed: No"))
                Email_Msg = Email_Msg.Replace("<<MedicalAway>>", IIf(opgMedicalAway.SelectedValue = "1", "Medical Away: Yes", "Medical Away: No"))
                Email_Msg = Email_Msg.Replace("<<Other>>", IIf(opgOther.SelectedValue = "1", "Other: Yes", "Other: No"))
                Email_Msg = Email_Msg.Replace("<<ThirdPartyInvolved>>", IIf(opgThirdParty.SelectedValue = "1", "Third Party Involved: Yes", "Third Party Involved: No"))
                Email_Msg = Email_Msg.Replace("<<IncidentDescription>>", txtInv.Text.Trim)
            Else
                Email_Msg = "Please log into SAFE in the next 24 hours and update the report.  If there are any questions, please contact your EH&S contact." + vbCrLf
            End If
      
            EMail_Class.Class1.Send_eMail(txtCallerEMail.Text.Trim.ToLower(), WebConfigurationManager.AppSettings("email_username").ToString.Trim, "", "Your SAFE ID # is " + ReportID.ToString, Email_Msg)
        End Sub
      
        Protected Sub opgInjury_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles opgInjury.SelectedIndexChanged
            If opgInjury.SelectedValue.Length > 0 Then
                If opgInjury.SelectedValue = "0" Then
                    For X As Integer = 0 To (cboSeverity.Items.Count - 1)
                        cboSeverity.Items(X).Enabled = False
                    Next
                    cboSeverity.Items.FindByText("Near Miss").Enabled = True
                    cboSeverity.SelectedValue = cboSeverity.Items.FindByText("Near Miss").Value
                Else
                    For X As Integer = 0 To (cboSeverity.Items.Count - 1)
                        cboSeverity.Items(X).Enabled = True
                    Next
                    'cboSeverity.Items.FindByText("Major Medical").Enabled = False
                    cboSeverity.Items.FindByText("Near Miss").Enabled = False
                    cboSeverity.SelectedValue = 0
                End If
            End If
            opgInjury.Focus()
        End Sub
      
        Protected Sub opgVehicle_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles opgVehicle.SelectedIndexChanged
            If opgVehicle.SelectedValue.Length > 0 Then
                'pnlT3.Visible = (opgVehicle.SelectedValue = "1")
                'opgThirdParty.Enabled = (opgVehicle.SelectedValue = "1")
                'opgThirdParty.SelectedValue = Nothing
                'If pnlT3.Visible Then
                '    opgVehicleTowed.Focus()
                'End If
            End If
        End Sub
      
        Protected Sub opgVehicleTowed_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles opgVehicleTowed.SelectedIndexChanged, opgMedicalAway.SelectedIndexChanged, opgOther.SelectedIndexChanged
            If opgVehicleTowed.SelectedValue = "0" And opgMedicalAway.SelectedValue = "0" Then
                opgOther.SelectedValue = "1"
            Else
                opgOther.SelectedValue = "0"
            End If
        End Sub
      
        Protected Sub cmdSubmitTop_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdSubmitTop.Click, cmdSubmitBottom.Click
            If Page_IsValid() Then
                Save_Record()
            End If
        End Sub
      
        Private Function Page_IsValid() As Boolean
            Dim RetVal As Boolean = True
            Dim Cont As Boolean = True
      
            If txtCallerName.Text.Length = 0 Then
                Cont = False
                ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "reqfields", "alert('A Caller is required.');", True)
                cboCallersGSN.Focus()
                Exit Function
            End If
      
            If txtCallerPhone.Text.Trim.Length = 0 Then
                Cont = False
                ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "reqfields", "alert('Caller\'s Phone # is required.');", True)
                txtCallerPhone.Focus()
                Exit Function
            Else
                If txtCallerPhone.Text.Trim.Length < 10 Then
                    Cont = False
                    ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "reqfields", "alert('Caller\'s Phone # must be complete.');", True)
                    txtCallerPhone.Focus()
                    Exit Function
                End If
            End If
      
            If txtCallerEMail.Text.Length > 0 Then
                If Not EmailAddressCheck(txtCallerEMail.Text) Then
                    Cont = False
                    ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "reqfields", "alert('Caller\'s E-Mail Address is invalid.');", True)
                    txtCallerEMail.Focus()
                    Exit Function
                End If
            Else
                Cont = False
                ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "reqfields", "alert('Caller\'s E-Mail is required.');", True)
                txtCallerEMail.Focus()
                Exit Function
            End If
      
            If opgDPSGEmployee.SelectedValue = "1" Then
                If cboPersonInvolved.SelectedValue = "0" Then
                    Cont = False
                    ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "reqfields", "alert('Person Involved is required.');", True)
                    cboPersonInvolved.Focus()
                    Exit Function
                End If
      
                If cboLocation.SelectedValue = "0" Then
                    Cont = False
                    ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "reqfields", "alert('Location is required.');", True)
                    cboLocation.Focus()
                    Exit Function
                End If
            Else
                If txtPersonInvolved.Text.Trim.Length = 0 Then
                    Cont = False
                    ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "reqfields", "alert('Person Involved is required.');", True)
                    txtPersonInvolved.Focus()
                    Exit Function
                End If
            End If
      
            If txtDateOfAccident.SelectedDate Is Nothing Then
                Cont = False
                ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "reqfields", "alert('Date & Time of Incident are required.');", True)
                txtDateOfAccident.Focus()
                Exit Function
            Else
                If txtDateOfAccident.SelectedDate > Today() Then
                    Cont = False
                    ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "reqfields", "alert('Date & Time of Incident cannot be a future date or time.');", True)
                    txtDateOfAccident.Focus()
                    Exit Function
                End If
            End If
            'If txtTimeOfAccident.Text.Trim.Length = 2 Then
            If Format(txtTimeOfAccident.SelectedDate, "hh:mm tt").ToString.Trim.Length = 0 Then
                Cont = False
                ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "reqfields", "alert('Date & Time of Incident are required.');", True)
                txtTimeOfAccident.Focus()
                Exit Function
            Else
                If New Date(Year(txtDateOfAccident.SelectedDate), Month(txtDateOfAccident.SelectedDate), Day(txtDateOfAccident.SelectedDate), Hour(txtTimeOfAccident.SelectedDate), Minute(txtTimeOfAccident.SelectedDate), 0) > Now() Then
                    Cont = False
                    ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "reqfields", "alert('Date & Time of Incident cannot be a future date or time.');", True)
                    txtTimeOfAccident.Focus()
                    Exit Function
                End If
            End If
      
            If txtPlaceOfAccident.Text.Trim.Length = 0 Then
                Cont = False
                ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "reqfields", "alert('Place of Incident is required.');", True)
                txtPlaceOfAccident.Focus()
                Exit Function
            End If
      
            If txtDateReported.SelectedDate Is Nothing Then
                Cont = False
                ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "reqfields", "alert('Date & Time of when Incident was Reported are required.');", True)
                txtDateReported.Focus()
                Exit Function
            Else
                If txtDateReported.SelectedDate > Today() Then
                    Cont = False
                    ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "reqfields", "alert('Date & Time of when Incident was Reported cannot be a future date or time.');", True)
                    txtDateReported.Focus()
                    Exit Function
                End If
            End If
            'If txtTimeReported0.Text.Trim.Length = 2 Then
            If Format(txtTimeReported.SelectedDate, "hh:mm tt").ToString.Trim.Length = 0 Then
                Cont = False
                ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "reqfields", "alert('Date & Time of when Incident was Reported are required.');", True)
                'txtTimeReported0.Focus()
                txtTimeReported.Focus()
                Exit Function
            Else
                If New Date(Year(txtDateReported.SelectedDate), Month(txtDateReported.SelectedDate), Day(txtDateReported.SelectedDate), Hour(txtTimeReported.SelectedDate), Minute(txtTimeReported.SelectedDate), 0) > Now() Then
                    Cont = False
                    ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "reqfields", "alert('Date & Time of when Incident was Reported cannot be a future date or time.');", True)
                    txtTimeReported.Focus()
                    Exit Function
                End If
            End If
      
            'Compare Date/Time of Accident vs. Date/Time Reported
            Dim ADT As DateTime = Date.Parse(Format(txtDateOfAccident.SelectedDate, "MM/dd/yyyy").ToString + " " + Format(txtTimeOfAccident.SelectedDate, "hh:mm tt").ToString)
            Dim RDT As DateTime = Date.Parse(Format(txtDateReported.SelectedDate, "MM/dd/yyyy").ToString + " " + Format(txtTimeReported.SelectedDate, "hh:mm tt").ToString)
            If ADT.Date() > Today() Then
                Cont = False
                ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "vals", "alert('Date of Incident cannot be after today.');", True)
                txtDateOfAccident.Focus()
                Exit Function
            Else
                If RDT.Date() > Today() Then
                    Cont = False
                    ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "vals", "alert('Date Reported cannot be after today.');", True)
                    txtDateReported.Focus()
                    Exit Function
                End If
                If RDT < ADT Then
                    Cont = False
                    ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "vals", "alert('Date & Time of Incident must be before Date & Time Reported.');", True)
                    txtDateOfAccident.Focus()
                    Exit Function
                End If
            End If
      
            If opgInjury.SelectedValue = Nothing Then
                Cont = False
                ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "reqfields", "alert('""Is Injury Involved"" is required.');", True)
                opgInjury.Focus()
                Exit Function
            End If
      
            If cboSeverity.SelectedItem.Text.Contains("select one") Then
                Cont = False
                ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "reqfields", "alert('Severity is required.');", True)
                cboSeverity.Focus()
                Exit Function
            End If
      
            If opgVehicle.SelectedValue = Nothing Then
                Cont = False
                ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "reqfields", "alert('""Was Vehicle Involved"" is required.');", True)
                opgVehicle.Focus()
                Exit Function
            End If
      
            If opgVehicle.SelectedValue = "1" Then
                'If opgVehicleTowed.SelectedValue = Nothing Then
                '    Cont = False
                '    ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "reqfields", "alert('""Vehicle Towed"" is required.');", True)
                '    opgVehicleTowed.Focus()
                '    Exit Function
                'End If
                'If opgMedicalAway.SelectedValue = Nothing Then
                '    Cont = False
                '    ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "reqfields", "alert('""Medical Away From Scene"" is required.');", True)
                '    opgMedicalAway.Focus()
                '    Exit Function
                'End If
                ''If opgFatality.SelectedValue = Nothing Then
                ''    Cont = False
                ''    ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "reqfields", "alert('""Fatality"" is required.');", True)
                ''    opgFatality.Focus()
                ''    Exit Function
                ''End If
                If opgThirdParty.SelectedValue = Nothing Then
                    Cont = False
                    ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "reqfields", "alert('""Is Third Party Involved"" is required.');", True)
                    opgThirdParty.Focus()
                    Exit Function
                End If
            End If
      
            If txtInv.Text.Trim.Length = 0 Then
                Cont = False
                ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "reqfields", "alert('Initial Incident Description is required.');", True)
                txtInv.Focus()
                Exit Function
            End If
      
            Return RetVal
        End Function
      
        Protected Sub cboCallersGSN_SelectedIndexChanged(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles cboCallersGSN.SelectedIndexChanged
            Session("callerid") = cboCallersGSN.SelectedValue
            Populate_Fields()
            cboCallersGSN.Focus()
        End Sub
      
        Private Sub Populate_Fields()
            Dim myED As New DRP_Data.DRP_DataReader
      
            myED.Server_Address = mySD.Database_Server
            myED.Server_Database = mySD.Database_Name
            myED.Server_UserId = mySD.Database_UserID
            myED.Server_Password = mySD.Database_Passwrod
      
            Try
                myED.OpenConn()
                myED.Select_Command = "exec s_callers_info '" + Session("callerid").ToString.Trim + "'"
                myED.ExecuteReader()
                If myED.DataReader.HasRows Then
                    myED.DataReader.Read()
                    Session("callers_gsn") = myED.DataReader("gsn").ToString.Trim
                    txtCallerEMail.Text = myED.DataReader("email").ToString.Trim
                    txtCallerTitle.Text = myED.DataReader("title").ToString
                    txtCallerName.Text = myED.DataReader("name").ToString
                    hidCallerTitleId.Value = myED.DataReader("titleid").ToString
                Else
                    Session("callers_gsn") = 0
                    txtCallerTitle.Text = ""
                    txtCallerName.Text = ""
                    txtCallerEMail.Text = ""
                    hidCallerTitleId.Value = 0
                End If
                myED.CloseReader()
      
                'Load_Employees()
            Catch ex As Exception
      
            Finally
                myED.CloseConn()
            End Try
        End Sub
      
        Protected Sub opgDPSGEmployee_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles opgDPSGEmployee.SelectedIndexChanged
            If opgDPSGEmployee.SelectedValue IsNot Nothing Then
                If opgDPSGEmployee.SelectedValue = "1" Then
                    cboPersonInvolved.Visible = True
                    cboPersonInvolved.SelectedValue = 0
                    cboPersonInvolved.Text = ""
                    hidEmpLocation.Value = ""
                    cboLocation.Visible = True
                    lblNA.Visible = False
      
                    txtPersonInvolved.Visible = False
                    txtPersonInvolved.Text = ""
      
                    cboPersonInvolved.Focus()
                Else
                    Session("YACJ") = 0
                    Session("MACJ") = 0
                    Session("YAC") = 0
                    Session("MAC") = 0
      
                    cboPersonInvolved.Visible = False
                    cboPersonInvolved.SelectedValue = 0
                    cboPersonInvolved.Text = ""
                    hidEmpLocation.Value = ""
                    cboLocation.Visible = False
                    lblNA.Visible = True
      
                    txtPersonInvolved.Visible = True
                    txtPersonInvolved.Text = ""
      
                    txtPersonInvolved.Focus()
                End If
            End If
        End Sub
      
        Protected Sub cboPersonInvolved_SelectedIndexChanged(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles cboPersonInvolved.SelectedIndexChanged
            If cboPersonInvolved.SelectedValue <> "0" Then
                Dim myED As New DRP_Data.DRP_DataReader
      
                myED.Server_Address = mySD.Database_Server
                myED.Server_Database = mySD.Database_Name
                myED.Server_UserId = mySD.Database_UserID
                myED.Server_Password = mySD.Database_Passwrod
      
                Try
                    myED.OpenConn()
                    myED.Select_Command = "exec s_emps_info '" + cboPersonInvolved.SelectedValue.ToString.Trim + "'"
                    myED.ExecuteReader()
                    If myED.DataReader.HasRows Then
                        myED.DataReader.Read()
                        Session("emp_no") = myED.DataReader("emp_no")
                        Session("YACJ") = myED.DataReader("yrs_at_current_job")
                        Session("MACJ") = myED.DataReader("mos_at_current_job")
                        Session("YAC") = myED.DataReader("yrs_at_company")
                        Session("MAC") = myED.DataReader("mos_at_company")
                        hidEmpLocation.Value = myED.DataReader("location").ToString
                        cboLocation.SelectedValue = 0
                        cboLocation.Text = ""
                    Else
                        Session("emp_no") = 0
                        Session("YACJ") = 0
                        Session("MACJ") = 0
                        Session("YAC") = 0
                        Session("MAC") = 0
                        cboPersonInvolved.SelectedValue = "0"
                        hidEmpLocation.Value = ""
                        cboLocation.SelectedValue = 0
                        cboLocation.Text = ""
                    End If
                    myED.CloseReader()
                Catch ex As Exception
      
                Finally
                    myED.CloseConn()
                End Try
                cboPersonInvolved.Focus()
            Else
                Session("YACJ") = 0
                Session("MACJ") = 0
                Session("YAC") = 0
                Session("MAC") = 0
            End If
        End Sub
    End Class

    Thanks,
    Ken
  2. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 01 May 2012 Link to this post

    Hi Ken,

    Here is what I have tested locally with the latest official version (2012.1.114): http://screencast.com/t/VX3DSAmj2E.
    Could you specify the version of RadControls for ASP.AJAX that you use in your application? Also does this behavior replicate in more than one browser?
    Please specify the exact steps that I need to follow in order to reproduce the problem locally.

    Regards,
    Ivana
    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.
  3. Ken Cash
    Ken Cash avatar
    2 posts
    Member since:
    Mar 2010

    Posted 01 May 2012 Link to this post

    I am using version 2010.2.713.  It appears to only happen in IE and only on the 1st combobox.  I have additional combos on the same page and the subsequent ones work correctly, even after a postback.

    I was doing the exact same thing that you did in your example.  I selected an item from the combo, TAB off to init the postback and then tried to backspace over the selection to re-select.  I've been hearing that the issue may be specific to IE, but I would like to know why it only affects the 1st combo and not the others, if that is true.

    Is there a way for me to get a copy of the latest version that fell within my subscription?

    Thanks,
    Ken
  4. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 02 May 2012 Link to this post

    Hello Ken,

    At the following link you can review a list of all downloads for Telerik Premium Collection for .NET  that are available for your subscription: http://www.telerik.com/account/your-products/download-list.aspx?skucid=10.

    Greetings,
    Ivana
    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.
  5. Robert
    Robert avatar
    199 posts
    Member since:
    Aug 2009

    Posted 28 Feb 2013 Link to this post

    Ivana this problem exists on your controls even in the online demos.  IF you go to your online demo here: http://demos.telerik.com/aspnet-ajax/combobox/examples/populatingwithdata/xmlstringbinding/defaultcs.aspx you will see the problem.

    If you choose an option from the combo box and hit backspace while the cursor is inside the text area of teh combo it causes a postback.

    I need this problem fixed.
  6. Robert
    Robert avatar
    199 posts
    Member since:
    Aug 2009

    Posted 01 Mar 2013 Link to this post

    Actually I found this solution on another post and it seems to fix the problem but seriously?  it's been almost 5 years since the initial post and they have not fixed this problem?

    1.) Hook the OnClientKeyPressing event to the combobox
    2.) Hook onkeydown event to body tag:  <body onkeydown="return checkShortcut()">


    <script type="text/javascript"
      
      var ev = null; 
         
      function OnClientKeypressing(sender, eventArgs) 
      
           if (eventArgs.get_domEvent().keyCode == 8) 
          
             ev = eventArgs.get_domEvent(); 
          
      
      
         
    function checkShortcut() 
             if(ev!=null && (ev.keyCode==8 || ev.keyCode==13)) 
               
    ev=null;
              return false; 
             
      
    </script>
  7. Nencho
    Admin
    Nencho avatar
    1871 posts

    Posted 05 Mar 2013 Link to this post

    Hello Robert,

    I have performed some test regarding the provided instructions to replicate the faced issue, but to no avail. Could you specify which browser are you using to reproduce the problematic behavior?

    Regards,
    Nencho
    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.
  8. moegal
    moegal avatar
    277 posts
    Member since:
    Jul 2007

    Posted 05 Mar 2013 Link to this post

    i can see it in IE9 and Safari 5 on windows. I also tried chrome Opera and Firefox.  Seemed fine there.

    http://demos.telerik.com/aspnet-ajax/combobox/examples/populatingwithdata/xmlstringbinding/defaultcs.aspx

    select the drop down, use your down arrow to move down the list to "Dallas" then hit the Backspace key.

    Marty
  9. Robert
    Robert avatar
    199 posts
    Member since:
    Aug 2009

    Posted 05 Mar 2013 Link to this post

    This behavior is in IE, Safari and Chrome. 

    You have to navigate the page first. 

    Click to go to the demo: http://demos.telerik.com/aspnet-ajax/combobox/examples/populatingwithdata/xmlstringbinding/defaultcs.aspx
    Click on "Declarative Datasources" on the left.
    Select an option from one of those dropdowns and click the backspace key.

    It navigates to the previous page (if there is one).

  10. Nencho
    Admin
    Nencho avatar
    1871 posts

    Posted 08 Mar 2013 Link to this post

    Hello,

    Your observations are absolutely correct. The problematic behavior is already logged as a bug and we are currently working on fixing it.

    All the best,
    Nencho
    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.
  11. Vasssek
    Vasssek avatar
    190 posts
    Member since:
    Aug 2010

    Posted 10 Mar 2013 Link to this post

  12. Nencho
    Admin
    Nencho avatar
    1871 posts

    Posted 13 Mar 2013 Link to this post

    Hello,

    Since I cannot provide you with the exact timeframe, once we decide how to handle and release the issue, I will update this forum thread.

    All the best,
    Nencho
    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.
Back to Top