There are several options to develop web applications in Microsoft ecosystem such as ASP.Net Web Forms, ASP.Net MVC, Single Page Applications. ASP.Net Web Forms is supported from the initial days of ASP.Net and even today enterprises build many of their web applications using Web Forms. The advantage of web forms is that enables you to build web applications rapidly. But …
Calling Javascript from Code Behind in ASP.Net using C# – How it works
There are times when you want to call a javascript function from code behind based on business logic in your ASP.Net applications. This could be because that your business logic needs to talk to database to decide whether javascript function has to be called or not. When you do a simple Google search for this problem, you would find out …
Beginner’s Guide to Value and Reference Types in C#
Value Type: Built in types such as int(all numeric types),char,bool etc.. would come under value type. Custom struct and enum would also fall into this category. Value types exhibit following characteristics. Actual Value(s) gets copied when a variable is assigned to another variable and there is no relationship between two variables after the assignment statement Consider the following code block …
Applying styles to Gridview in ASP.Net using custom CSS (e.g, Twitter Bootstrap)
Gridview is one of the most powerful web controls which is used in most of the ASP.Net web applications to display information to the user in tabular form. In this article, we are going to discuss on How to apply styles to gridview How to apply style to a particular row based on the row values Before discussing on how …
Sorting a Gridview dynamically on multiple columns in different order in ASP.Net
Most of the ASP.Net developers would have used Gridview control in their applications. This article explains about sorting the gridview dynamically on multiple columns in different order in web applications. I am using Product table of AdventureWorks database for this sorting. Our objective is to achieve the sorting order ListPrice desc, ReOrderPoint asc, Name desc on a gridview which fetches …
LINQ – Basics
Linear INtegrated Query (LINQ) is a set of .Net libraries which gives querying capabilities on local and remote data sources. The data sources can be local such as collection, list, xml or remote such as databases. In this article, I am going to discuss only about LINQ with local data sources. Before looking into the concepts of LINQ in detail, …
Using Entity Framework Code First approach on existing databases
Most developers prefer Code First style when they use entity framework in their applications. This approach was being primarily used for new applications as it would be difficult to code all the classes for the respective tables when dealing with existing database with lots of tables. But with the advent of Entity framework power tools, you can use Code First …
Adding methods to existing classes in C#
There are many times when we might want to add functionality to existing code. The existing code could be the classes written by fellow developers in our team or it could be third party code that we might want to use. The obvious choice is to create a new class by inheriting the existing class and add functionality to this …