Error: column "Gender" is of type enum but expression is of type text.
Are you getting this error when you are using enum datatype in PostgreSQL database? This blog post explains how to fix the error with C# and Dapper. The following environment is used for this post:
In this article, we will see different ways to export data to Excel from a web application. It is very common task for web developers. Here are different approaches to do it in ASP.NET – C#:
Using the Excel PIA (primary interop assemblies) to generate a spreadsheet server-side.
It needs Microsoft Office suite installed on your server which is not good. So it is NOT recommended.
Before we get started, let us see the general way to use Session in ASP.NET
if (Session["UserName"] == null)
LabelUserName.Text = "Anonymous";
LabelUserName.Text = (string)Session["UserName"];
You can feel some drawbacks e.g. to check null reference, type safety, to cast object..etc.
Now add following class and see how it solves the issues:
A Responsive Web Design is not only UI changes but also to optimize server side logic for performance. Suppose you are displaying bulk data in desktop environment. But if same data are sent to mobile device, it will make website too slow even the layout is made adaptive on client side. To implement server side logic, we need client side information like browser width and height. In this article, we will implement to get browser height and width on server side in ASP.NET.
In this article, we will implement drill down for ASP.NET 4.0 built in chart control. On the first chart the data is grouped by year. The year is divided into quarters. By clicking on an item on the chart you can get the values corresponding to the quarters of the selected year. Each quarter consists of 3 months. After choosing a quarter for the selected year you can get the values for each month of the this quarter.
Environment: VS2012,.NET Framework 4.0, ASP.NET Web Form, C#, Entity Framework
In my previous tutorial, we implemented to save Geolocation (latitude, longitude) in Geography data type column in Sql Server. Now, we will get the nearest N places from the current geo-location of user.
In this article, we will implement to save current geo-location(latitude, longitude) of user in Sql Server Geography data type column using Entity framework and ASP.NET Web Form.
In this article, we will make simple client side form validation in asp.net web forms using jQuery form validation plugin, check username availability and also add green check mark for valid data.
Facebook home page displays a collage of random profile photos which makes it something special. So I decided to implement the same thing in ASP.NET. In this tutorial, we will do following things:
1. To get random image names from database using Entity Framework Database First approach.
2. Calculate the total needed images for a given width and height. Assuming all profile images have same size.
3. Combine multiple images into collage using C# graphics
4. Add borders to differentiate images
5. Create linear horizontal opacity gradient for the collage and add it in a page similar to Facebook.
In this tutorial, We will implement collapsing responsive navigation bar using ASP.NET menu control and Twitter Bootstrap. Lets start with the default view of ASP.NET Menu control as follows: