Engineering

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...

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,...

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...

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 EPPlusAfter installing we are going to need to use this namespace:using OfficeOpenXml;I got an exception while...

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 = falseProtected Sub ASPxScheduler1_AppointmentFormShowing(sender As Object, e As AppointmentFormEventArgs) Handles ASPxScheduler1.AppointmentFormShowing...

How to use Active Directory Membership Provider in ASP.NET

The ASP.NET membership feature provides secure credential storage for application users.We will use The following:Web page named Login.aspx and another web page named CreateUser.aspxLogin Control.Create User Wizard Control.Steps:1- Configure Forms Authentication in Web.config file.To configure forms authentication, set the <authentication> element's mode attribute to "Forms" and then configure your application's...

How to create AutoComplete Textbox in Windows Forms Application using C#.NET

I'll show you how to create AutoComplete Textbox in a Windows Forms ApplicationThis time we're going to get the data from MS Access Databaseso let's get starting!1- Create Windows Forms Application.2- Add Textbox Control.3- Copy the below code into your form.AutoCompleteStringCollection stringCollection = new AutoCompleteStringCollection();private void AutoCompleteTextBox() { OleDbConnection aConnection...