Ubuntu: deploy .NET Core app

Today, I want to walk-through the steps I used to deploy ASP.NET Core website application to Ubuntu Server. ASP.NET Core supports several Linux distributions, I am using Ubuntu Server.

From a quick internet search I found 3 decent blog posts:

  1. decatechlabs.com article
  2. garywoodfine.com article
  3. blog.bobbyallen.me post

There already are many articles which talk about how to set up your development environment for .NET Core but this post starts, where they end. It’s about getting production ready.

These are to-the-point & well written. But, either these posts are more than a year old, or they are for setting up your development environment, not for production deployment. You need to install .NET Core run-time, not the .NET Core SDK (which also includes run-time). You can download it from:  Continue reading “Ubuntu: deploy .NET Core app”

Wanna bind an enum to Combobox / Dropdown ?

Many people prefer to bind an enum to a dropdown in their WinForms application. In the cases where we can not bring the values from backend/database, it makes sense to use enum as opposed to hard-coding values over and over again. Enumerations support a practice where a group of related constants may be created which later be viewed as string or integer values.

Before we see how could this be achieved in Windows Forms Application ( WinForms App ), ASP.NET WebForms, ASP.NET MVC ( even easier in MVC 5 ! ) as well as ASP.NET Web API, let’s talk about : ‘Why ?’

Why using Enum is preferred if combobox is not being flourished from DB ? Well, In addition to re-usability, there are some clear advantages :

Continue reading “Wanna bind an enum to Combobox / Dropdown ?”

Unobtrusive validation from scratch in ASP.Net 4.5 WebForms

Jupaol’s blog post

Free Web based IIS like manager




Below are some code snippets that I have prepared initially, if you do not find one that you are looking for, just [ drop me an E-mail ] or just a comment below would suffice. Also please note that a demo illustrated in SQL server should also work with MySQL & vice-versa.
Example Description Download
Populate gridview programmatically using MySQL Loading the gridview programmatically using C# from database zip
Gridview with a drop-down filter in the header Filter your gridview with a drop down in the table header zip
Adding controls on the fly in GridView (Esp. with custom user control,) add hyper-link check-boxes dynamically zip
Paging & Sorting in Gridview Programmatically handle paging and sorting events of gridview zip
Insert/Update/Delete using Button field of the DataGridView(Accessing the cell values of the row containing the button clicked) if you want to retrieve the cell values of the row after the button from that row has clicked and to fire database queries zip
Export Gridview to … MS ACCESS / MS EXCEL / CSV zip
Combobox hard-coded values & Database records to gather Loading a combobox, with static items as well as items from database zip
Sending plain text E-mail message from web app to Gmail You can specify from, password, to, subject and message to send an email zip
Caching 1 Simple Page Level Caching zip
Caching 2 Caching SQL Server Caching for certain amount of time zip
Caching 3 SQLServer Automated Caching and Updating Cached version at Regular Intervals and upon Create/Update/Delete operations zip
Caching 4 Partial Page Caching, Multiple & Multi-Level Page caching and … Clearing the cache zip
Shortening GUID Sometimes we want to get the shortest GUID for building URLs or for dynamic file names, So I created a slight variant of GUID zip
Parsing Uri (Query Params) When one has the URL of the page from which QueryParams are wanted but can not use Request.QueryString (when the URL is not of current page, stored in a object in a memory etc) zip
Nested GridViews A basic example of how a grid can become a part of data row of some master table (master – grid ) zip
Nested GridViews + Conditional Formatting Apply conditional formatting to your nested grid zip
Filter DataGrid w/ LINQ An example demonstrating how LINQ can be used to filter out the data from the Data Grid zip
Gridview : JavaScript/jQuey to databing + filter An example demonstrating how to bind data to Gridview using Client Side Script + filtering ( filter as you type ) zip
Nested GridVeiw A gridview inside a gridview zip
Nested Gridview Nested Expandable & Collapsible Gridview (Same Row) zip
Nested Gridview Nested Expandable & Collapsible Gridview (Next Row) zip
Signal R Move Shape + Group Discussion / Chat + etc … zip
G.Drive Spreadsheets Access Google-SpreadSheet Via Gdata And C# zip
Parameter Parsing Parsing parameters from query string zip
Short GUID Get Short (& sweet) : unique strings, unique, not random chars as random may not be unique zip
String Float Double InterConversion zip
2D Array To-String And Vice-Versa zip
Async GridView (Take # 1) Loading the data for the gridview asynchronously from database

  • Poll Approach
  • Wait Approach
CSV to Gridview A sample web app demonstrating how to load gridview from multiple CSV dynamically (one at a time) zip
Crystal Report : Dynamic Binding Conditional Data-binding from multiple tables, after the report has been loaded zip

Repository Index

I am going to share all the code snippets that I have. At the moment, this page is being updated, every, single, day. You can download most of the archives from here, at once.

Most posts in this section would be describing Mid to advanced level of features of C#, mainly as
a console application [View]
Most posts in this section would be describing Mid to advanced level of features of ASP.NET / C# ,
mainly as simple web projects [View]
Mostly in this section would be describing features of LINQ, mainly as a C# console application [View]
Mostly in this section would be describing features of in-demand tools & libraries like TFS, twitter, facebook, using C# mainly [View]
Modern Web & Windows App
Most posts in this section would be describing javascript/HTML 5 – CSS 3 for Web Apps and/or Windows Store Apps [View]
telerik ASP.NET AJAX Controls
This section would be talking about ASP.NET AJAX Controls in, code snippets.
Windows Phone
Most posts in this section would be describing Windows Phone, Applications