Add application settings in APP.CONFIG and retrieve

Problem: How to add any application setting value in app.config file and use them. Solution: adding key in app.config file: <configuration> <appSettings> <add key=”Setting1″ value=”Value1″ /> <add key=”Setting2″ value=”Value2″ /> </appSettings> </configuration> reading key value from app.config file: return ConfigurationManager.AppSettings[“Setting1″]; must include : using System.Configuration;

Display image from internet location (URL) in a Picturebox in desktop application

Problem: Develop a back-end application to administer website contents. In order to display Images in back-end application everytime when I add any new product on website I have to copy product image on my web folder and also on my desktop application local folder. Sometime it makes trouble when have larger number of products to… Read More »

How to ENABLE Classic ASP in IIS 7

To Install IIS7’s ASP feature STEP #1: Start -> Run -> Type appwiz.cpl ->ENTER STEP #2: Turn Windows features on or off -> Internet Information Services -> World Wide Web Services -> Application Development Features -> ASP (check it and then click OK) All DONE!

Disable an ASP.NET button when clicked

Problem: How To preventing a double click on credit card processing button. Solution: Set the Button server control property named “OnClientClick” with javascript code that runs on client side before submitting postback to server. button1.OnClientClick=”this.value=’Processing Credit Card Payment…';this.disabled=true;”;

Bound Column DataFormatString Property

Format character Description Example C or c Displays numeric values in currency format. You can specify the number of decimal places. Format: {0:C}123.456 -> $123.46 Format: {0:C3} 123.456 -> $123.456 D or d Displays integer values in decimal format. You can specify the number of digits. (Although the type is referred to as “decimal”, the… Read More »