Isolating a problem in a sample project

by ASP.NET AJAX Team | Comments 4
“Please send us a sample project”
If you have contacted Telerik’s support before, chances are that you have been asked to send us a sample project. In our daily routine, we try to avoid requesting such as much as possible, but there are cases in which we simply cannot move forward without a project that would allow us to reproduce a specific problem locally. We usually ask for isolated sample only after:
  • we have failed to reproduce the reported problem by following your instructions
  • we have failed to reproduce the reported problem by running the code provided
  • we have failed to reproduce the reported problem by intelligently predicting/guessing where the problem might be

We perfectly understand that in most cases we are talking about huge project with large (often confidential) database and complex logic that cannot easily be re-created in a separate project. Our experience however, shows that the time invested in isolating the problem before opening a ticket is well paid-off. Such tickets receive quick response and usually a solution in only one or two replies. The reason is simple – once the support engineer starts working on the case, her efforts are aimed at finding and providing a quick solution of a problem instead of trying to find a way to reproduce it first.

In addition, the statistics shows that in 95% of the cases the problem is not database-related and can be relatively easily isolated by following several simple rules. Below, we have tried to summarize these rules and to provide some general tips that would allow you to isolate a sample project.

 

Database: Most often than not, the problem is not database–related. It would be great to send us your database but if for some reason this is not possible, you can use a dummy DB that would allow the database-driven control to appear on the page. Please check this Code Library article for more information on how to create and use dummy datasource with RadGrid. The same logic can be applied to other data-bound controls.


Simplifying: Usually, this is the most time-consuming part of the task. Let’s say that you have a huge project that contains MasterPages / content forms / user controls etc.

1. Selecting the right form/page to work on:

If the problem is reproducible on one form only, you will have to work with that form. If the problem however, can be reproduced in all forms where the corresponding control(s) appears, then it is better to work with the form that has the least number of controls in it as it would be easier to isolate the problem in it.

2. Isolating the reproduction steps:

Try isolating the steps that allow you to reproduce the problem in a written list. Make sure that these steps reproduce the problem every time. There are cases where the problem appears from time to time only - in such cases, make sure that the steps that you have isolated will reproduce the problem if repeated number of times.

3. Removing the surplus:

Determine which are the controls that are not used in the reproduction steps above. Remove them (comment their code) and try the steps again. If the problem still exists – go to the next step. If the problem does not appear, start bringing back the controls one by one and see when the problem starts appearing again.

Once you removed all controls that
   a) Do not participate in the reproduction steps and
   b) Are not needed for reproducing the problem

Try removing some of the other controls and skipping the corresponding steps from the reproduction scenario. Often there are only 2 or 3 controls that are directly involved with a given problem. For example if you have a RadSplitter that contains panes containing RadTreeview, RadComboBox and RadTooltip, the problem might be related to RadSplitter and RadTreeview only.

4. Moving in a separate project

Once you have minimized the number of controls that reproduce the problem, copy that page/form to a new project that uses the same DLLs as your original project. Make sure that the form can be run from that project and that it still reproduces the problem. There are cases where the reasons for the problem might be in your project settings (web.config, app.config, etc), so if you cannot reproduce the problem after copying the file, try copying your configuration files as well.

 

Sending the project:

Zip the project and attach it in a support ticket along with the following information:
  1. Reproduction steps
  2. OS / Browser (if applicable) / Control(s) version / .Net version
  3. Description of the expected behavior
In addition, sometimes it helps to send some screenshots or a movie that show the problem on your side. If you need a capturing software, you could use Jing or other product that suits your needs.

About the author

Iana Tsolova

Iana Tsolova

is Program Manager of Telerik’s ASP.NET AJAX division. She joined the company back in the beginning of 2008 as a Support Officer and has since occupied various positions at Telerik, including Senior Support Officer, Team Lead at one of the ASP.NET AJAX teams and Technical Support Director. Iana’s main interests are web development, reading articles related to geography, wild nature and latest renewable energy technologies.

4 Comments

Santhosh
Hi,

I Am using inside RadWindow RadAsyncUpload,but when i scroll down radwindow RadAsyncUpload control is also moving with that,please please help,its Very urgent.

Here is My Code:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Testupload.aspx.cs" Inherits="Testupload"
    MaintainScrollPositionOnPostback="true" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>AFE Addattachment</title>
    <%--<style type="text/css">
        .ruUploadProgress, li .ruCancel, li .ruRemove
        {
            visibility:visible;
        }
        li.ruUploading
        {
            height:1px;
        }
    </style>--%>
</head>
<body>
    <form id="form1" runat="server">
    <%--<asp:ScriptManager ID="ScriptManager1"  runat="server">
    </asp:ScriptManager>--%>
    <telerik:RadScriptManager ID="RadScriptManager2" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Outlook" />
    <%--<telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All"
        EnableRoundedCorners="false" />--%>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

        <script type="text/javascript">
        function ClientFileSelected(source, eventargs) {
            var button = $find("<%= SubmitButton.ClientID %>");
            var button1= $find("<%= ExitButton.ClientID %>");
             button.set_enabled(true)
             button1.set_enabled(true)
             //$telerik.$(args.get_row()).addClass("ruUploading");
             }
             
//             var xPos, yPos;
//      var prm = Sys.WebForms.PageRequestManager.getInstance();

//      function BeginRequestHandler(sender, args) {
//        if ($get('<%=RadUpload1.ClientID%>') != null) {
//          // Get X and Y positions of scrollbar before the partial postback
//          xPos = $get('<%=RadUpload1.ClientID%>').scrollLeft;
//          yPos = $get('<%=RadUpload1.ClientID%>').scrollTop;
//        }
//     }

//     function EndRequestHandler(sender, args) {
//         if ($get('<%=RadUpload1.ClientID%>') != null) {
//           // Set X and Y positions back to the scrollbar
//           // after partial postback
//           $get('<%=RadUpload1.ClientID%>').scrollLeft = xPos;
//           $get('<%=RadUpload1.ClientID%>').scrollTop = yPos;
//         }
//     }

//     prm.add_beginRequest(BeginRequestHandler);
//     prm.add_endRequest(EndRequestHandler);


//var xPos, yPos;
//    var prm = Sys.WebForms.PageRequestManager.getInstance();
//    prm.add_beginRequest(BeginRequestHandler);
//    prm.add_endRequest(EndRequestHandler);
//    function BeginRequestHandler(sender, args) {
//        xPos = $get('RadUpload1').scrollLeft;
//        yPos = $get('RadUpload1').scrollTop;
//    }
//    function EndRequestHandler(sender, args) {
//        $get('RadUpload1').scrollLeft = xPos;
//        $get('RadUpload1').scrollTop = yPos;
//    }
        </script>

    </telerik:RadCodeBlock>
    <%-- <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:Panel ID="Panel1" runat="server" Height="300">--%>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
        <Windows>
            <telerik:RadWindow ID="RadWindow1" runat="server" Width="750" Height="300" RestrictionZoneID="RestrictionZoneID"
                Behaviors="None" VisibleOnPageLoad="true" EnableShadow="true" Title="AFE AddAttachment">
                <ContentTemplate>
                    <table>
                        <tr>
                            <td style="width: 60%" align="left">
                                <asp:Label ID="AfeNum" runat="server" Text="AFENumber:"></asp:Label>
                                <asp:TextBox ID="AFENUMBER" runat="server" Enabled="false" OnTextChanged="TextBox1_TextChanged"
                                    Font-Bold="true"></asp:TextBox>
                            </td>
                            <td align="right">
                                <asp:Label ID="Label2" runat="server" Text="WellName:"></asp:Label>
                                <asp:TextBox ID="WName" runat="server" Width="150px" Enabled="false" OnTextChanged="TextBox2_TextChanged"
                                    Font-Bold="true"></asp:TextBox>
                            </td>
                        </tr>
                    </table>
                    <table>
                        <tr>
                            <td style="width: 60%" align="left">
                                Source File To Upload:
                            </td>
                            <td align="right" style="width: 19.5%">
                                Document Type:
                            </td>
                        </tr>
                    </table>
                    <table>
                        <tr>
                            <td align="left">
                                <div>
                                    <telerik:RadProgressManager runat="server" ID="RadProgressManager1" />
                                    <telerik:RadAsyncUpload runat="server" ID="RadUpload1" MultipleFileSelection="Automatic"
                                        Localization-Select="Choose File" InputSize="55" OnClientFileSelected="ClientFileSelected" />
                                    <telerik:RadProgressArea runat="server" ID="RadProgressArea1" />
                                </div>
                            </td>
                            <td align="char" style="width: 73%">
                                <asp:DropDownList ID="DropDownList1" runat="server" Width="130px">
                                    <asp:ListItem>AFE</asp:ListItem>
                                    <asp:ListItem>Completion</asp:ListItem>
                                    <asp:ListItem>Drilling</asp:ListItem>
                                    <asp:ListItem Selected="True">General</asp:ListItem>
                                    <asp:ListItem>Geology</asp:ListItem>
                                    <asp:ListItem>Land</asp:ListItem>
                                    <asp:ListItem>Logs</asp:ListItem>
                                    <asp:ListItem>Marketing</asp:ListItem>
                                    <asp:ListItem>Permits</asp:ListItem>
                                    <asp:ListItem>Pipeline</asp:ListItem>
                                    <asp:ListItem>Regulatory</asp:ListItem>
                                    <asp:ListItem>Reserves</asp:ListItem>
                                    <asp:ListItem>Reservoir</asp:ListItem>
                                    <asp:ListItem>WellReports</asp:ListItem>
                                    <asp:ListItem>WBS</asp:ListItem>
                                    <asp:ListItem>Survey</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                            <td align="right">
                                <telerik:RadButton runat="server" ID="SubmitButton" Text="Upload files" Enabled="false"
                                    OnClick="SubmitButton_Click" />
                                <telerik:RadButton runat="server" ID="ExitButton" Text="Exit" Enabled="true" OnClick="ExitButton_Click"
                                    Width="80" />
                            </td>
                        </tr>
                    </table>
                    <table>
                        <tr>
                            <td>
                                <asp:Label ID="Label4" runat="server" Text="Upload Comments:"></asp:Label>
                            </td>
                            <td align="right">
                            </td>
                    </table>
                    <table>
                        <tr>
                            <td>
                                <asp:TextBox ID="TextBox4" runat="server" Height="35px" Width="580px" OnTextChanged="TextBox4_TextChanged"></asp:TextBox>
                            </td>
                        </tr>
                    </table>
                </ContentTemplate>
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>
    <%--</asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>--%>
    </form>
</body>
</html>

Thank You
Santhosh
Marin Bratanov
Hello Santhosh,

I advise that you open a support ticket if you have an urgent issue, because this will also allow you to attach a project we can run and test. It always helps if you explain your case clearly and state the browser version, Telerik.Web.UI version and other relevant information to the case. In the end, this is what this blog post treats.

If I understand you correctly you have a scrollbar in your RadWindow and the upload control has a "fixed" appearance in IE7. If so - this seems like a known bug in this browser that is described here in detail: http://www.telerik.com/help/aspnet-ajax/button-known-issues-ie6-ie7.html. The fix is also explained there - setting position: relative for the container that has scrollbars, most likely the content template of the RadWindow. This means that an example CSS rule that can help is the following:
.RadWindow .rwWindowContent div
{
    position: relative;
}
Santhosh
Hi Marin Bratanov,

Thank You for your Reply,
its worked for me.
Thanks once again.

Thank You
Santhosh K.L
Santhosh
Hi,

I have another requirement,
can you Please tel me how to open file without default select button in RadAsyncUpload.

Thank you
Santhosh K.L

Comments

  1.    
      
      
       
  2. (optional, emails won't be shown on public pages)
  3. (optional)
Read more articles by ASP.NET AJAX Team - or - read latest articles in Developer Tools
Product Families