For Asp.net Web API, I am going to write a series of technical articles. Few of them will cover conceptual point, few will cover demos and in few of them, I will try to dig deep into it by covering important technical point like routing, hosting, security stuff.
So in this series of articles, Lets start with light node, what is ASP.NET Web API and why we should go for it.
Hello guys, in this article I would like to share some brief introduction of extension methods.
The agenda is how to create and use extension methods
Extension methods are called as if they were instance methods on extended type.
Example we have extended function like
string testString = string.Empty; testString.Split(','); testString.ToString();
and many more.
Before going to start about the code, I would like to tell you something about Telerik. Well, Telerik adds magic in our application. Its a third party tool that enhances the functionality of asp.net. If you have never used telerik and want to know more, I would suggest you to go through below links:-
In this article I am going to tell you, how to bind Telerik RAD grid using java script.
1. Disable View State Of A Page If Possible:
Page that does not require any post back events can have the view State off. By default the “ViewState” property is enabled, we can disable it in two ways:
(a) At control level: by set EnableViewState property to false
(b) At page level: using <%@ Page EnableViewState=”false” %>
Advantage: It decreases the memory allocation on server.
2. Use of String Builder For Concatenation:
All operations we do on strings are stored in memory as separate references. When we modify our string, at run time it returns a new string, leaving the previous string as garbage collected. To stop creation of new references we should use string builder whenever concatenation is required.