Technical

10 deadly sins of programming

Here are a few deadly sins that you should avoid while programming, they are not in a particular order: Assuming your code works.Code before you think.Coding without using a version control system.No code comments.No exception handling.Not using meaningful names for variables, methods, classes, etc.Overengineering.Overuse of inheritance and overriding.Reinventing the wheel.Untraceable Changes. If you have other sins,...

Get geo location data using HTML5 & JavaScript

In case you are using Google Chrome you will have to enable getting location by the following steps: Open Google Chrome > on the top right click on the vertical 3 dots then select SettingsAt the bottom click Show advanced settingsIn the "Privacy" section, click Content settingsIn the dialog that appears, scroll down to the...

Subdomain Mapping in ASP.NET Boilerplate

In AbpTenants table in the database. You can add your custom properties to Tenant class.AbpTenant class defines some basic properties, the most important properties are: TenancyName: This is a unique name of a tenant in the application. It should not be changed normally. It can be used to allocate subdomains to tenants like 'mytenant.mydomain.com'. Tenant.TenancyNameRegex constant defines the...

Using EPPlus library to manage excel spreadsheets in .NET

EPPlus is a library to manage excel spreadsheets, using OOXML. To install EPPlus, you can search for EPPlus in "NuGet Package Manager" or simply run the following command in the "Package Manager Console": PM> Install-Package EPPlus After installing we are going to need to use this namespace: using OfficeOpenXml; I got an exception while reading from an excel...

Show alert or run JavaScript function after showing the appointment popup in DevExpress using VB.NET

You should handle the CustomJSProperties event and add in properties collection the script which you are going to run it.Please find below server side code: Dim script As String = Nothing Dim disablePopup As Boolean = false Protected Sub ASPxScheduler1_AppointmentFormShowing(sender As Object, e As AppointmentFormEventArgs) Handles ASPxScheduler1.AppointmentFormShowing e.Container = New...

Visual Studio 2005/2008 on Vista Internet Explorer cannot display the webpage

I faced a strange problem with Visual Studio 2005 and Visual Studio 2008 which is I have several ASP.NET Projects some of them using .NET 2.0 or Visual Studio 2005 and the others are using .NET 3.5 or Visual Studio 2008. The problem was when I try to run the Web Application I got this...

How to Access controls on Master Pages from Content Pages in ASP .NET

We will assume that we have a Label control called "Label1" on your Master Page, you might want to change the text of that Label.To do that write this code in your content page: Label lbl = new Label(); lbl = (Label)Master.FindControl("Label1"); lbl.Text = "Text"; Of course, this is all assuming the label is OUTSIDE the ContentPlaceHolder

Cross Page Postback in ASP.NET

This is a new feature in ASP .NET 2.0. The IButtonControl Interface contains a new property called PostBackUrl which points to the page to which the current page will postback, Button, ImageButton and LinkButton implements this interface and exposes the cross page postback functionality. When user clicks the button in the current page will postback...