What are the common mistakes in ASP.NET to avoid ?


Please briefly explain why you feel this question should be reported .


Common mistakes which need to be avoided while dealing with ASP.NET

in progress 0
.NET veenashekh21 2 years 1 Answer 414 views 0

Answer ( 1 )

  1. Apeksha_R

    Please briefly explain why you feel this answer should be reported .


    ASP.NET is a widely used platform for developing web based applications. The framework has been in use for the past 15 years and the ongoing development of the model is quite robust.
    Most of the web application development are done using the.NET framework and the developers working with these platforms are plenty. However, there are many instances which tell that there are some silly mistakes which are repeated by even the best in the business. The mistakes discussed in the following section are the most common ones that are repeated.
    These common mistakes which need to be avoided while dealing with ASP.NET:
    ·Not using the ‘Using” statement:The disposal of objects using the IDisposable object command must be done using the ‘using’ statement. Not doing the same leads to erroneous disposal of the object and the developers really need to ensure that this mistake is avoided at all costs.

    ·Unnecessary breaking the stack:This is a common mistake made when a developer is re-throwing an exception. Doing this actually makes you lose the stack trace and you are not able to properly debug the app and log the details of the errors that occur. This is quite prevalent even today and needs to be vigilantly avoided in order to ensure smooth working.

    ·Not Overriding when equals method is used in C#:If the hashcode of items are same, then they can be considered equals. The comparison logic must be used and the gethashcode is to be override in order to make sure that the same value is returned for both the objects and the mistake is avoided at all costs.

    ·Forgetting the fact that the strings are immutable in ASP.NET:It was known that even though all the developers know that strings in the framework are immutable, they still fall prey. The string once created, cannot have a different value. The operations worked upon the string are saved as new strings containing the modification done on the older one.

    Thus, these issues are quite common and a developer during their programming time are likely to come across one of these.

    So, keep a note of these issues and ensure that you make sure that they are avoided while developing any new web application using the .NET framework. Follow the mistakes carefully and avoid them in order to exploit the best of the development options and to enjoy seamless programming using ASP.NET.

Leave an answer


Captcha Click on image to update the captcha .

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>