Some web page have a thousand line of html code and it will increase the size of the page to download to users. It is often possible to make a content of web page fewer bytes(their size) without changing the appearance or function of the page. This approach will improve download time and makes the page load faster.
The question how to make this happen without extra effort to remove the space manually and without effect the development time.
This is a snippet code that you need to put in your Master page so that the code...
Tuesday, 31 December 2013
Friday, 27 December 2013
Understanding The Web Page Processing(End To End)

A common way to think about the Web is that there is a browser on one end of a network connection
and a web server with a database on the other end.
Simplified web architecture model
The simplified model is easy to explain and understand, and it works fine up to a point. However,
quite a few other components are actually involved, and many of them can have an impact on
performance and scalability.The next picture shows some...
Tuesday, 24 December 2013
Simple Image Resizer Tools - C# Example

This example will use the Image Resizer Class from previous post. I have change a little bit on the class so that i can use it for my example image resizer tools.
ImageResizer Tool Requirement
ImageResizer tool will require user to choose the image to resize.
Only JPG image supported.
After that user can simply put the width and height to change the selected image width and height.
User can choose is either to use aspect ratio.
After...
Example to disable save as certain file type in SSRS Report Viewer

SQL Server Reporting Service(SSRS) is a full range of ready-to-use tools and services to help you create, deploy, and manage reports for your organization, as well as programming features that enable you to extend and customize your reporting functionality.
The Report Viewer provide functionality to save the report as a pdf, word and also as a excel format. Sometime organization require this feature, sometime not. This is how to disable...
Tuesday, 17 December 2013
Multiple Button in MVC 4
Many developers now have experience on ASP.NET Web development but when microsoft introduce the new solution for web development(ASP.NET Model View Controller - MVC framework) back at April 2009, not all developers like it. Because ASP.NET is just drag and drop, and easy to use different with ASP.NET MVC.
Recently i have develop one web application using MVC framework and this is my first experience using it i never done it before...
Just want to share some information for newbie like me to have a multiple button in one form....
Monday, 16 December 2013
How to open file using their default external viewer - C#
When write the application, some of the activity is to create file, convert file, etc . After create the file, the program should prompt user to open the created file using their respective default external viewer . Letsay you create .pdf file, so the default application to open the file is Adobe Reader .
The example will ask user is either user want to open file or not, if user agreed to open the file created, then the application will open file using their respective default external viewer depend on the file extension .
The...
How to read XML file in PHP
In this example show how to read xml file in PHP. Let say the XML file is like this :
<?xml version="1.0" encoding="utf-8"?>
<database>
<config userdb="custinfosys" dbpass="P@ssw0rd" host="localhost:3306" database="customerinfosys"/>
<defaultPassword></defaultPassword>
</database>
So i want to read config element and all of the attribute . Here is a sample code to read xml file :
PHP -> read XML File :
//declare DOMDocument
...
Sunday, 15 December 2013
How to execute sql query statement in PHP
We have learn how to create connection and select database in PHP, now i will show how to run query in php.
we will use "mysqli_query" or "mysql_query " method to run the query in php.
Assume we already have connection and already select the database in PHP, here is a example to run the query statement.
NOTE : Refer both post above to create connection and select database
The Database Table
CREATE TABLE IF NOT EXISTS `users` (
`userid` varchar(40) NOT NULL,
`password` varchar(80) NOT NULL,
`ROLES`...
Select Database in PHP Example
This post is a extended from previous post. Read previous here
This example show how to select database schema / name in database MySQL :
The DbUtil Class
<?php
final class DbUtility {
public static $dbHost ;
public static $dbUser ;
public static $dbPass ;
public static $dbDatabase ;
public function __construct()...
How to create mysql connection in php
The example will show how to create connection to MySQL database using "mysql_connect" or "mysqli_connect" . The mysql_connect has been deprecated. Read here for more information.
The DbUtil Class
<?php
final class DbUtil {
public static $dbHost ;
public static $dbUser ;
public static $dbPass ;
public function __construct()...
Sunday, 8 December 2013
How to convert List to DataTable - C#,ASP.NET

Short Description
This example will show how to convert List<T> where T could be any object and convert the List<T> to DataTable. The example will use two class which is System.ComponentModel; and System.Data;
Note : The Convertion class extention method must be in static because System.ComponentModel.TypeDescriptor is a static method
In this example i will use asp.net .
The ASPX page
<h1>
...
Saturday, 7 December 2013
Tips of send or reply email for customer
Email is a one medium to communicate to others people. Mostly now days people use email to communicate with customer. I have learn something which i want to share with others tips to send or reply email to your customer. Hopefully this note will be useful for someone.
As you know, the problem with emails is that they do not have "tone". The interpretation of our emails is concluded by the intended recipient. Sometimes, the interpretation differs from what we meant. As a small step to improve our customer...
Friday, 6 December 2013
C#: Retrieve Machine Information

This is a example how to get Machine Information in C#. The example will use Class ManagementObjectSearcher --> System.Management
Note: The code will only work on Window 32 bit, If you are using 64 bit Operation system, you need to comment few Method GetTotalPhysicalMemory,GetTotalVirtualMemory,and GetAvailableVirtualMemory.
The MachineInfo Class
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using...
Wednesday, 4 December 2013
How to Upload CSV File into database MSSQL
Brief Description
The post will show code example how to upload CSV file data into Database and insert bulk record into SQL server database.
Before we start the example, create the table in the database :
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[CSVTABLE](
[ID] [int] NOT NULL,
[NAME] [varchar](40) NOT NULL,
[ADDRESS] [varchar](80)...
C#: use EventLog to store error message example

EventLog lets you access or customize Windows event logs, which record information about important software or hardware events. Using EventLog,
you can read from existing logs, write entries to logs, create or
delete event sources, delete logs, and respond to log entries. You can
also create new logs when creating an event source.
The example will show how to use event log in your application
The Code
private void button1_Click(object...
Tuesday, 3 December 2013
How to show hide form(Desktop application) C#
Usually when programmer to hide the form from User they will use this command :
this.Hide();
But the problem is..how to unhide that form..So the this is a solution to unhidden the form..
Scenario
You have 2 Form, Form1 and Form2. the situation is form2 was hide and you want to show it back
foreach (Form form in Application.OpenForms)
{
if (form is Form2)
{
form.Show();
break;
...
Monday, 2 December 2013
How to create XML file using C#
XML is a platform independent language, so the information formatted in XML can be used in any other platforms (Operating Systems). Once we create an XML file in one platform it can be used in other platforms also.
In order to creating a new XML file in C#, we are using XmlTextWriter Class . The class takes FileName and Encoding as argument. Also we are here passing formatting details . The following C# source code creating an XML file product.xml and add four rows in the file
The Code
using System;
using System.Data;
using...
Friday, 29 November 2013
Detect Browser In Code Behind ASP.NET

Certain javascript will work on certain browser only. So inorder to avoid your client from using the application which is bot supported by your application, you can filter the browser type from code behind of your web application.
Let see the example
The ASPX page
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head...
|
Mohd Zulkamal Founder of developersnote.com, love programming and help others people. Work as Software Developer. Graduated from UiTM and continue study in Software Engineering at UTMSpace. Follow him on Twitter , or Facebook or Google+ . |
Powered by Blogger.