Tips for creating simplified code samples

  1. #1

    Tips for creating simplified code samples

    1. Make a copy of your original page and view this new test page in the web browser. Ensure the problem is still being reproduced.
    2. Start removing chunks of code from your sample slowly. After each piece of code is removed, re-test in a browser. Ensure the problem is still being reproduced.
    3. Keep removing code until the problem is no longer reproduced. Once you get to this stage, undo your last change. This code is obviously having some effect on the problem. Leave this code in your sample.
    4. Don't stop removing code. Move onto something else now. Remove that code, and re-test.
    5. Keep repeating this process until the absolute minimum code required to reproduce the problem is left on the page.
    6. Please ensure you test any custom .css that might be loaded on the page.
      Once you get down the minimum code sample required to reproduce the problem, please add that code to your forum post inside [CODE] tags. We will then review.
    7. Please do not email us the sample. Just add to your forum posts and wrap in [CODE] tags. If there is a defect, it will not rely on any of your proprietary code. Please reduce the sample down to a generic code sample that does not contain any of your organizations proprietary code, or data.


    Your code sample should include only the minimum amount of code required to reproduce the issue. Code unrelated to the issue is to be removed. Anyone should be able to copy + paste your sample into a local Visual Studio test project and run without having to make modifications.

    If Exceptions or syntax errors are thrown when testing your code sample, we'll let you know so you can revise your original sample. Then we'll review again with the updated sample.

    When you follow-up with a code sample, please post that sample within [CODE] tags. The [CODE] tags will add formatting and syntax highlighting to your sample.

    The following two threads provide many excellent tips for getting a fast and accurate response in the forums:

    1. Forum Guidelines
    2. More Information Required
    Last edited by geoffrey.mcgill; Jun 02, 2016 at 10:39 PM.

Similar Threads

  1. Creating a task from code behind
    By feanor91 in forum 2.x Help
    Replies: 0
    Last Post: Aug 28, 2014, 1:52 PM
  2. Replies: 2
    Last Post: Apr 05, 2014, 2:29 AM
  3. [CLOSED] Renderer on Tips of Series of Chart in code behind
    By reinout.mechant@imprss.be in forum 2.x Premium Help
    Replies: 5
    Last Post: Jun 21, 2013, 4:29 PM
  4. Replies: 0
    Last Post: Mar 27, 2012, 11:01 AM
  5. Javascript errors on render (simplified code)
    By nanosassa in forum 1.x Help
    Replies: 2
    Last Post: Apr 25, 2009, 8:54 PM

Posting Permissions