Popular Topics
2008-11-23 Yesterday I bought this new book "How to get what you want from almost anybody" today I could read the introduction of the book and thought to put what I learnt from that as today's post. The author explains one of his experiences at air port. The guy who was before him in the queue to get the plane booked after a flight got cancelled. The guy was a straight guy or in other words who simply says what he feels to the face. The guy had a...
ILT - Easy Method To Manage or Map SQL Server User Access To SQL Server Databases
14-08-2012 How to easily map a SQL Server user to databases? Select the login you want to grant or deny access from the "Logins" sub-folder in the "Security" Folder in the SQL Server Right click on the user and select "Properties" Select "User Mapping" from the "Select a page" section You will see the list of databas in the "Users mapped to this login:" section Tick the check box in the "Map" field/column for databases you want to ...
Replace Function Doesn't Replace Double Quotation in VBA
13-11-2012 I had to remove all double quotation marks from a string using VBA. I tried to do this by using the Replace function as shown below. Also Note that two double quotation marks are used to represent the quotation mark. This is because the quotation mark is a special character in VBA and we need to escape it by using the escape character. In VBA the escape character is quotation character itself so we need to use two quotation ma...
What is a Permalink
2009-01-07 If you maintain or work around blogs then the word "Permalink" should be familiar to you. In early stages of the Internet all web addresses or URLs were static or permanent but as the web became more complex where large volumes of content is added daily, it became hard to handle in the usual way. The involvement of database driven systems was necessary to manage large volumes of web content. The URLs used with these systems were not hu...
C# ASP.NET - GridView : How to Use Checkbox in Gridview to Select Multiple Rows
2009-01-06 // // I wanted to select multiple rows of the grid view using check boxes to select each row. In this post I will discus how and what I did to achieve this goal... I used a template column which holds a check box to select or de-select a row in the grid view. Adding a Template Column: There are several simple ways to add a template column/field to your grid view: Select your grid view and then click on the small ...
How To Read Articles On Financial Times For Free Saving £5.19 or $6.25 a week
13-06-2012 It usually costs £5.19 or $6.25 a week to get unlimited access to FT (Financial Times). You can open a free account which will allow you to access a certain number of articles a month. Or You can follow below steps :) What you need to do is : Search of Brows through FT and find the article you want to read. Copy the article heading Paste it into Google Google will show you a link to the appropriate FT article on ...
How to Save a Copy of a Visual Studio 2005 Solution
2008-12-22 Sometimes things we consider as simple take much time to be accomplished than we expect just because we forget! Today I wanted to save a copy of a web based visual studio 2005 solution but it took life 10 minutes for me to accomplish that because I had completely forgotten the method to do it. Since keeping track of what I learn is one objective of this blog I decided to include this small detail today. How to save a copy a solution in...
How to Add/Update/Remove Application Configuration (App.Config) Keys
14/05/2013
How to add new keys to app.config file?
Simple, just use this code.
Configuration conf = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
conf.AppSettings.Settings.Add("Menol", "value");
conf.Save(ConfigurationSaveMode.Modified);
/* Copyright 2013 © I Learnt Today */
When you execute this code, a new key will be added to your configuration file and the given value will be set for it.
Important: This code will not change the configuration file you see in the Visual Studio but the code works. You can check it by copying your exe and app.config file to somewhere and running the exe file.
How to update/modify a key on app.config file?
Use the code below:
Configuration conf = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); conf.AppSettings.Settings["Menol"].Value = "New Value"; conf.Save(ConfigurationSaveMode.Modified); /* Copyright 2013 © I Learnt Today */
How to remove/delete a key on app.config file?
Use the code below:
Configuration conf = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
conf.AppSettings.Settings.Remove("Menol");
conf.Save(ConfigurationSaveMode.Modified);
/* Copyright 2013 © I Learnt Today */
Menol
ILT
How to force your website to download a file (rather than opening)
07/05/2013
I wanted to add a download link to one of my products. The file was an Windows Installer Package (*.msi).
However, FireFox started to open the file on the browser rather than downloading it so when my visitors tried to download the installer they would rather see some gibberish on the browser because FireFox was trying to “open” the MSI file.
There’s a simple fix.
Just add following line to your .htaccess file so that your website will force your browser to download this type of files than trying to open them.
# force download
AddType application/octet-stream .msi
You can use this method for any type of files. Just add another copy of this line and change the last three characters to your preferred file extension.
e.g. Following code will force browsers to download any *.jpg, *.bat, or *.config files as well
# force download
AddType application/octet-stream .msi
AddType application/octet-stream .jpg
AddType application/octet-stream .bat
AddType application/octet-stream .config
Menol
ILT
ILT – How to bring your window (form) to the top C#
2013/04/11
How to bring a window (form) to the top?
Or how to make your window active from the code?
Simply: call the Activate() function (method) of your form instance.
yourForm.Activate();
// e.g.
if(spamCount > 10000)
{
this.lblStatus = "Warning - Spam count is 10,000";
this.Activate();// This will bring the window to front.
}
Menol
ILT
