[**ASP.NET**][1], which stands for Active Server Pages is a Microsoft's popular application language that people often don't talk about. While it may be not as “modern” as some other leading languages like Ruby, but the truth is that .NET is still being used for developing a larger portion of apps. Owing to this fact, it's logical for most of the software development companies to focus on... By Celin Smith On 16 Dec 2014 Viewed: 383
ASP.Net GridView binding is really easy but nested binding is a little bit tricky. We need to create two row for every single row one for normal row data and other for nested grid. There are two way to create multiple rows, one is by using the JavaScript by manipulating the html and other is directly from code behind, which we will use in our example, really it is not easy but very easy. We will... By Ali Adravi On 03 Dec 2014 Viewed: 11,220
Application structure by using ASP.Net MVC, Web API, AngularJs is not complicated but we need to know what NuGet Packages are required and what can make the application easy and speed up the development. In this article we will use MVC 4, Visual Studio 2012, Web API and AngularJS to create a single page application. We will try to use different folders for keeping our controllers, services,... By Ali Adravi On 17 Nov 2014 Viewed: 9,987
ViewBag, ViewData, TempData and Session are the options to send value from controller to view or to other action method/pages. ViewData and ViewBag are very straight forward, they used to send the data from controller to view and done but in case of TempData and Session we can pass values from controller to view and even we can get our value from other pages after redirecting. As we know TempData... By Ali Adravi On 15 Nov 2014 Viewed: 5,866
How to send email in a new thread in asp.net by using Gmail account or any other account or you can say a page where we can test out all the settings like SMTP Server, Email From, Email To, Email Password, Port Number, Email DeliveryMethod or Secure Socket etc. In this article we will see how to send email in background thread with CCed and BCCed functionality. Here is the page... By Hamden On 13 Sep 2013 Viewed: 38,107
We will do insert, update and delete functionality in a GridView with modal popup, we will proceed step by step to learn how easily we can complete this functionality in any project. We will try to create a basic user page where you can see all the users in a grid with paging and buttons to add new user, update an existing user and delete any existing user with confirmation box. We will always... By Hamden On 01 Sep 2013 Viewed: 24,560
The purpose of an abstract class is to provide a common definition of base class that multiple derived classes can share, and can be used only as a base class and never want to create the object of this class. Any class can be converted into abstract class by adding abstract modifier to it. Common features of an abstract class: 1. An abstract class cannot be instantiated. 2. An abstract class... By Ali Adravi On 21 Aug 2013 Viewed: 18,742
CRUD (Create, Retrieve, Update and Delete) in MVC. When we start to learn new language, first we try to run an application with “Hello World” and then CRUD functionality. So in this article we will see how to select records from database (with WebGrid, pagination and sort functionality), update a record, add new record and finally delete a record in ASP.Net MVC. Let’s create a simple table... By Ali Adravi On 17 Aug 2013 Viewed: 105,947
In this article we will see how to convert an object to json string or how to convert a json string to an object in C#, we will try to write a generic class with two methods, one for converting an object to json and other for converting json string to an object. I searched internet to get if there is anything like this with .net but could not found any which we can use directly, so let's... By Ali Adravi On 16 Jun 2013 Viewed: 41,182
How to show multirow header in gridview in asp.net? i was searching for this question but could not found any easy way so I decided to try my own and found it is not so difficult. Simply we can use header template and item template and design it according to our requirements. we will see this in action in this article. First let's see what we are going to do, here is the final output which we... By Ali Adravi On 30 May 2013 Viewed: 43,611
We will discuss here, what are cookies, why we need cookies, what are the limitation of cookies, when we need to use cookies with example code in asp.net and many more. ***what are cookies:*** HTTP Cookie, Web Cookie, Browser Cookie, Session Cookie, etc. are some names of the cookies. Cookies are small text file sent by web server and saved by browser on client machine. We need cookies to... By Myghty On 26 May 2013 Viewed: 2,312
How to upload file or image in asp.net mvc is not difficult but is totally different compare to asp.net FileUpload control. If we are asp.net developer and we are new to mvc then we immediately noticed we don’t have server side controls so the FileUpload control as well and our problem start here. Now we start searching how to upload a file if there is no FileUpload control, no problem whatever... By Ali Adravi On 25 May 2013 Viewed: 8,073
Sometime we need to convert string to an enum type, say I need to store my enum value into viewstate then we cannot store enum or any object to viewstate so converted that to string and store it, and on postback need to read the viewstate and convert to enum, so how to convert a string into enum? We will see this in this article. Let’s say our enum is like this: Public enum ReportType ... By Hamden On 21 May 2013 Viewed: 1,542
Ajax introduced two new controls AsyncFileUpload and SeaDragon, in this article we will see about Asynchronous file upload control, with its different properties and usage. 1. [AsyncFileUpload][1]: by using this control we can upload a file asynchronously (without postback). The file uploading results can be checked both in the server and client sides. 1. [SeaDrago][2]: The Seadragon... By Ali Adravi On 20 May 2013 Viewed: 6,637
When need to use a JavaScript function with multiple parameters and those parameter values need to be bind at the time of binding the gridview data then it really becomes complicated, say we have a function GetLatLong which calculates Latitude and Longitude by using city, state, Country and zip code, say our function is something like this function GetLatLong(var city, var state, var... By Ali Adravi On 20 May 2013 Viewed: 2,687
In many cases we need to use read only text box so user cannot edit the value but readonly textbox will lost its value after postback. Let’s say you have a read only text box to set date by using ajax calendar so after post back date will be lost, other case might be you are setting some value in design view of aspx page which will lost after post back. Suppose you have following HTML in your... By Ali Adravi On 24 Apr 2013 Viewed: 4,219
There are ways to call a web service method JavaScript, for more detail you can see [how to retrieve data from database using JavaScript in asp.net][1], but is there any way to call a normal method from JavaScript? And the answer is No; show how we can call a code behind method from JavaScript, let’s see this with code Add following HTML on page: <asp:ScriptManager ID="ScriptManager1"... By Jonathan King On 08 Apr 2013 Viewed: 12,445
In this article we will discuss different way of show and hide (open and close) modal popup by using Ajax ModalPopupExtender, how to open/close a modal popup from code behind in asp.net or by using JavaScript, how to use multiple buttons to hide the modal popup in asp.net etc. Suppose we have a grid view to show the record in tabular format and give functionality to edit a record from grid... By Jonathan King On 08 Apr 2013 Viewed: 28,543
An array can be initialized in several ways, it can store a single value or series of values, every element must be set of same type, C# supports single-dimensional arrays, multidimensional arrays (also call rectangular array) and array-of-arrays (referred jagged arrays), let’s discuss features of array in C# like how to declare array in C#, How to initialize values to an array, how to define the... By Ali Adravi On 24 Mar 2013 Viewed: 4,336
In some situations we need to create website menu from database, say our application have ability to create pages so that must also need to have a menu item to go to that page. So how to create menu with all those nice CSS and other settings, I think XSLT is best to use in these situations. Let’s see what we would need to create our menu 1. Procedure to get data from database in xml... By Hamden On 16 Mar 2013 Viewed: 1,858