Opening a Webpage according to Textbox Value

Hi,

Today I am going to tell you, how to Open a Web Page according to TextBox Value in ASP.NET. You can implement same in Plain HTML Page. This will use a Simple JavaScript Function which we will create according to our need.
Lets Look at the Code. We are using ASP.NET Ajax AutoCompleteExtender for more enhancement in Code (This will only work in ASP.NET).
Code for ASPX Page (HTML Design Part - ASP.NET)

 



                


If you are using Plain HTML, Just use this code.
 


Now JavaScript Code which is Inserted Directly in Head Section. (JavaScript)





Now code for C# page if you are using AutoComplete Extender.
[System.Web.Services.WebMethodAttribute(), System.Web.Script.Services.ScriptMethodAttribute()]

    public static string[] GetCompletionList(string prefixText, int count, string contextKey)

    {

        string[] Brands = { "hp", "acer", "dell", "lenovo" };

        return (from m in Brands where m.StartsWith(prefixText, StringComparison.CurrentCultureIgnoreCase) select m).Take(count).ToArray();  

    }
Enjoy...

Reactions: 

Export to Excel from DataGridView in ASP.NET

Hi,
We are going to learn how to Export GridView data to Microsoft Excel at Runtime.

We are using: ASP.NET Framework 4.0, Visual Studio 2010, SQL Server 2008, C#, XHTML 4.01

 Code for ASPX Page (Front-End) Adding GridView and Columns:


                    

                        

                            

                                

                            

                        

                    

                    

                        

                            

                                

                            

                        

                    

                    

                        

                            

                                

                            

                        

                    

                    

                        

                            

                                

                            

                        

                    

                    

                        

                            

                                

                            

                        

                    

                    

                        

                            

                                

                            

                        

                    

                    

                        

                            

                                

                            

                        

                    

                

Adding Export Link


                                                       

        

Now Code for ASPX.CS Page (BackEnd):


Namespaces :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Drawing;
using System.IO;
using System.Text;
using System.Web.Security;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls.WebParts;

BindGridView Function
void GVProsFill()

    {

        string Query = "Select * from Parties,  Prosperity where Parties.PartyID=Prosperity.ProParty";

        SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConToMyDB"].ConnectionString);

        SqlDataAdapter adp = new SqlDataAdapter(Query, con);

        DataSet ds = new DataSet();

        adp.Fill(ds);

        gvPros.DataSource = ds.Tables[0];

        gvPros.DataBind();

    }


Export LinkButton Click Event:
//You have to add an another Event for Export to work properly:

public override void VerifyRenderingInServerForm(Control control) 

     { 

         // Can Leave This Blank. 

     }



protected void lnkExport_Click(object sender, EventArgs e)

    {

        Response.ClearContent();

        Response.Buffer = true;

        Response.AddHeader("content-disposition", string.Format("attachment; filename={0}", "Prosperity.xls"));

        Response.ContentType = "application/ms-excel";

        StringWriter sw = new StringWriter();

        HtmlTextWriter htw = new HtmlTextWriter(sw);

        gvPros.AllowPaging = false;

        GVProsFill();

        gvPros.HeaderRow.Style.Add("background-color", "#FFFFFF");

        for (int i = 0; i < gvPros.HeaderRow.Cells.Count; i++)

        {

            gvPros.HeaderRow.Cells.Style.Add("background-color", "#507CD1");

        }

        int j = 1;

        foreach (GridViewRow gvrow in gvPros.Rows)

        {

            gvrow.BackColor = Color.White;

            if (j <= gvPros.Rows.Count)

        {

        if (j % 2 != 0)

        {

        for (int k = 0; k < gvrow.Cells.Count; k++)

        {

            gvrow.Cells[k].Style.Add("background-color", "#EFF3FB");

        }

        }

        }

        j++;

        }

        gvPros.RenderControl(htw);

        Response.Write(sw.ToString());

        Response.End();

    }
I will be waiting to Listen from you....

Reactions: 

Microsoft Excel 2003 : File Menu and Its Commands


Hello Friends,
I am Back with Excel Tutorial Series. Lets Start with File Menu and Its Commands....

1) New (Ctrl+N) : 

As in earlier software we learned, New works same. When clicked New in File menu you will get New option in Task Pane and you have following options to choose:
Blank Workbook
From Existing Workbook….
As I told earlier, MS-Excel’s document is known as Workbook. Choose Blank Workbook to create one.
Shortcut Key for New Blank Workbook is CTRL+N (^N).

2) Open (Ctrl+O) :

This option is used to Open previously saved Workbook for Viewing, Editing, Printing or Analyzing.
Shortcut for this option is CTRL+O.  Here is Open Dialogue Box.

3) Close :

This command is used to close current workbook. You can close your file without exiting from program. 
When clicked Close it prompts you to save workbook if it is not saved yet. 
Shortcut for this option is CTRL+W.

4) Save (Ctrl+S) :

This option saves current active workbook. 
If it is being saved first time it displays Save As Dialogue Box and gives you option to choose location, give name of workbook and Set File Format else it updates current workbook. 
Shortcut for this command is CTRL+S. Here is a Save As Dialogue Box.

5) Save As :

This command displays Save As dialogue box each and every time you click/choose this option. Even your workbook is Already saved, you will get Save As dialogue box to save your file with other name, at other location or with another format/extension. This command is also a very popular and useful command for Excel. 
Shortcut Key for this option is F12.

6) Save As Web Page :


This command saves current workbook as Web Page so that it can be published on the web. You have options to choose which sheet you want to publish, Add interactivity, etc. Whenever clicked this option, save as dialogue box appears with some modification. Such as Change Title and other option.


7) Save Workspace ;


A Document Workspace site is a Microsoft Windows Share Point Services site that is centered around one or more documents. You and your friend can work on same Workbook at same time at Workspace and update the individual work at final stage.
So this is very good feature of MS-Excel that makes work easy and friendly in Networking.

8) File Search : 


This option is used to search Files or File Contents. This is same as File or Folder Search option in Start Menu. But you can search only such documents which are supported by MS-Excel. You have feature to choose location and File Type on Task Pane when this option is chosen.



9) Permissions :


You can create workbook with restrictions only if you have installed Professional version of Microsoft Office 2003.
This feature works on MS-Word, MS-Excel, MS-PowerPoint or MS-Excess only if Information Right Management feature is added to your software.
This feature manages to whom you allow to make change or share your file.

10) Web Page Preview:


This option shows the workbook in browser how it would look like after publishing. If you have created your document for Web Page purpose you can experience the high quality fun of creating web pages. The temporarily converted webpage is stored in temporary folder in .mht and final output file is in .html format.

Remaining Options will be completed soon. Thanks for Patient. 

Reactions: 

Shortcuts in Microsoft Excel 2003

Some Basic and Important Shortcuts.

     Short Key                                          Function
Tab or  Key (Right Arrow)           Move One Cell Right.
Shift + Tab or  (Left Arrow)         Move One Cell Left.
Enter or  Key  (Down Arrow)      Move One Cell down.
Shift + Enter or  (Up Arrow)       Move one Cell up.
Page Up                                          One Screen Up.
Page Down                                     One Screen Down.
Alt + Page Up                                One Screen Left
Alt + Page Down                           One Screen Right
Ctrl + Page Up                               Move Worksheet Left
Ctrl + Page Down                          Move Worksheet Right
Ctrl + End                                      Last Active Cell
Ctrl + Home                                  First Active Cell
Ctrl +    (Right Arrow)              Last Column of Workbook
Ctrl +     (Left Arrow)               First Column of Workbook
Ctrl +     (Down Arrow)            Last Row of Workbook
Ctrl +      (Up Arrow)               First Row of Workbook

How to Close Microsoft Excel  2003.

You can close Microsoft Excel in following ways:
  • Click on Lower Close button located below the Title Bar’s Close button. Doing this will prompt you top save document if it is not saved yet. Then Click on Close Button of Title Bar.
  • Right Click on File Name in Task Bar and choose  Close option. Microsoft Excel will prompt you to save document if it is unsaved.
  • Click on ALT+F4 key directly from Keyboard. Microsoft Excel will prompt you to save document if it is unsaved.

Reactions: 

Screen of Microsoft Excel 2003

This is the Screen of Microsoft Excel 2003 when opened a New Blank Excel Workbook.

Let's be familiar with the MS-Excel Window.

Components of MS-Excel Screen as above numbered

  • Title Bar -----1 
  • Menu Bar -----2 
  • Standard Tool Bar -----3 
  • Formatting Tool Bar -----4 
  • Formula Bar -----5 
  • Global Point -----6 
  • Row Headings -----7 
  • Column Heading -----8 
  • Cell -----9 
  • Cell Range -----10 
  • Work Area/ Creating Area -----11 
  • Sheet Tabs -----12 
  • Scroll Bars (Vertical and Horizontal)----13A+13B 
  • Task Pane -----14 
  • Status Bar -----15 
Coming with Next Chapter soon.

Reactions: 

List of Operating Systems.


AdaOS DTOS LegOS PaulOS Syllable
ADMIRAL DVIX leJOS P BASIC Symbian OS
Adrenaline DYNIX Unix (Sequent) Linux PC-BSD SymbOS
aerolitheOS ECL-3211 Lisa OS PC-DOS Symobi
Aimos eComStation LTSS PC/M-System Symphony OS
AIOS eCos LynxOS PDOS Synapse
AIX EduOS Möbius PEACE System 6 (Mac OS)
AIX/370 EGOS Mach Pebble System 7 (Mac OS)
AIX/ESA ekkoBSD Mac OS 8 Pegasos System V Release
Allegro Elate Mac OS 9 PETROS TABOS
AllianceOS ELKS Mac OS X Phantom OS Tabos
Alto OS Elysium MANOS Phos TalOS
Amiga OS EOS MaRTE OS PIOS TAOS
Amoeba EP/IX Maruti PizziOS TENEX
Amstrad EPOC Masix Plan 9 THE
AMX RTOS ERaMS Maverick OS Plex86 Thix
AngelOS ERIKA MBOS PM_SZ_OS ThreadX
Antarctica EROS MCP (Master Control Program) PocketPC 2003 ThrillOS
AOS/VS ESER MDOS PowerMAX TI-99 4A
Aperios ESIX MenuetOS PowerOS TinyOS
Apollo Domain/OS ESKO Merlin PowerSX TIS APL
ApolloOS Eumel Micriµm PowerUX TNIX
Apostle EuNIX MICRODOS ProDOS TOPS-10
Archimedes OS Exopc MicroVMS Prologue TOPS-20
AROS ExOS MikeOS Proolix TriangleOS
ARTOS Express Minima ProOSEK Tripos
Asbestos Famos Minix PSOS TRON
Athena FDOS Minux pSOSystem TRS-DOS
AtheOS Fiasco Miranda PSU Tru64 UNIX
AtomsNet Flamethrower Miray µnOS PTS DOS TSX-32
Atomthreads FlashOS MITE 80/IOS PublicOS TUD:OS
AuroraOS FlexOS MK++ PURE TUNES
B-Free FLP-80 DOS ML QDOS TurboDOS
Bada Flux ModulOS QNX UberOS
BAL Flux-Fluke-Flask Monitor Quadros UCSD-p
Banyan VINES FMS MOPS RadiOS UDOS
Basic Executive System Forth MorphOS RBASIC Ultrix
BeIA FreeBSD MOS RCOSjava UMDS
BeOS FreeDOS MOSIX RDOS UMN
Beowulf FreeDOWS MPE/iX ReactOS UNI/OS
BKY FreeVMS MPE OS REAL-32 Unicos
BlueEyedOS Frenzy MRT1700 Realogy Real Time Architekt UNICOS/lc
BOS FullPliant MS-DOS REBOL-IOS Uni FLEX
BOS1810 FunatixOS MSOS RMOS Unisys U5000
BoxOS FxOS MT809 RMS 68k Unix System
BPMK GazOS Multics Roadrunner UnixWare
bpmk GCOS Mungi Rome Unununium
BRiX GECOS MUTOS ROME USIX
BS600 GeekOS muVinix RSTS/E UTS
BS2000 Gemini Nucleus MVS RSX-11 UXP/V
BSDi Genera NachOS RT-11 V2 OS
BugOS GEORGE NCR Unix RTEL Vapour
Calmira GEOS NEC DOS RTEMS VERSAdos
CCP (Computer Control Program) GM OS NECUX RT Mach NTT Visopsys
CDOS GNU Hurd Nemesis rtmk Visual Network OS
Cefarix GNUstep NeOS RTMX VM/ESA
C Executive Go NetBSD RTOS-32 VM/VSE
Chaos Goah Netware RTOS-UH VME
Chimera Gould OS NewDeal RTS-80 VMS
Chippewa OS Grasshopper NEWDOS RTX VRTX/8002
Choices GUIDE NewOS RTXDOS VRTX/OS
Chorus Haïku Nexus RxDOS VSE
Cinder OS HA-MSP Nimbus S.Ha.R.K VSOS
Cisco IOS Hactar Node OS Sanos VSTa
Clicker32 Harmony NOS SCO OpenServer VTOS
CMW+ (SCO) Helios NOS/BE SCOPE VxWorks
COBRA  HES NOS/VE ScorchOS WEGA
Coherent Hive Nova ScottsNewOS WildMagnolia
CONSENSYS HOPE Novell DOS Scout Windows 7
ConvexOS HP-87 OS NS/GDOS SCP Windows 8
Cos HP-UX NSK SCP (System Control Program) Windows 95
Cosy HT-11 NTDIOS SCP-IBE Windows 98
Counterpoise Hurd Nucleus Self-R Windows 98 SE
CP/K Hurricane Oaesis SeOS Windows 2000
CP/M HydrixOS Oasis Sequent Windows Automotive
CP/NET i5/OS Oberon SEVMS VAX Windows CE
CP/Z IBM PC-DOS Objex Shark Windows ME
CPF (Control Program Facility) IBSYS Odin SharpOS Windows NT
Cromix Icaros Desktop Omega 4 ShawnOS Windows Server 2003
Cronus Iridium OS OnCore SIBO Windows Server 2003 R2
CSOC IRIX On Time RTOS-32 Sinclair Windows Server 2008
CTOS iRMX Opal Sinix Windows Server 2008 R2
CTSS IRTS OpenBeOS SINTRAN III Windows Vista
CX/SX ISC (Interactive) OpenBSD SkyOS Windows XP
Cyber (CDC) ISIS OpenDarwin Slikware WinMac
Cygnus ISSL OpenRavenscar sMultiTA WIZRD
DAC ITRON OpenServer SOBS x-kernel
Darwin ITS OpenVision Solaris XAOS
Data General JAMB OpenVMS Solar_OS Xenix
DC/OSx JavaOS OppcOS Solbourne UNIX Xinu
DCP Jbed OS-2 SOS xMach
Degenerate OS JeniOS OS-9 SP6800 XOS
Delitalk Jeo-OS OS-C Spice XTS
Deming OS Jibbed OS/2 Spice/MT Yamit
DEMOS JOS OS/2 Warp SPIN Yaxic
DesktopBSD JTMOS OS/9 Spinix Yoctix
DESKWORK JUNOS OS/360 SPOX z-VM
DG/UX JxOS OS/390 Spring z/OS
DIGITAL UNIX KAOS OS/400 Squeak Z9001-OS
dingOS Katix OS/ES SSP (System Support Program) ZealOS
DK/DOS Kea OS/M STAR-OS Zeta
DLD Kerberos OS4 STARCOS Zeus Zilog
DNIX KeyKOS osCAN Starplex II OS zeVenOS
Domain OS KOS OSE Sting ZMOS
DOS KRONOS OSF/1 StreamOS ZotOS
DOS2 KROS Osx Subsump ZRTS 8000
DOS 50 KRUD OZONE SUMO  
Dosket Kylin PAKOS SunMOS  
dr'ex L4 Palm OS SunOS  
DR-DOS L13Plus PAPL SunriseOS  
Drops LainOS Paramecium SuperDOS  
Drywell OS LAN Manager ParixOS SVM  
DS-OS LDOS Paros SVR  

Reactions: 

Introduction to Computer.

Computer

Introduction:

A computer is a programmable machine that receives input, stores and manipulates data, and
provides
output in a useful format to the user.
The term computer stands for
C: Commonly
O: Operate
M: machine
P: Particularly
U: Useful
T: Trade/Training
E: Education
R: Research

Characteristics of Computer

[1] The ability to perform calculations at the very fast speed. >> Speed and Timeliness
[2] The ability to take information and to store that information for future retrieval. >> Versatile
[3] The ability to take in and store a small variety of instructions for execution. >>Reliability
[4] The ability to use simple logical rules to make decisions for their own internal controls or for the
Control some external activities done by computer. >> No IQ
[5] The ability to communicate with other computer systems. >> Sharing
[6] To carry out computations and analysis accurately and speedily. >>Accuracy

Functions of a Computer

Inputting: refers to the process of entering data into the computer by the user using an input device.
Storing: Refers to the holding of data and instructions in the computers main memory for future
Manipulations.
Processing: Refers to performing operations both arithmetic and logical manipulation of data
entered
Into computer so that useful information may be taken out of the entered data.
Outputting: Refers to the process of showing the information or result to the user either on screen
or on Papers through the printer.
Controlling: Refers to directing all the above process in co-ordination. This controlling is done by the
Control unit.

Reactions: 

Quick and Basic Beginners Guide to MS-DOS.

As you all know, Microsoft DOS is worlds one of the Most Popular and Powerful Operating System. Which even keeps the same value in the Age of Windows 8. So, Lets learn MS-DOS in a quick steps.

# MS DOS > Microsoft Disc Operating System

# Definition:

MS-Dos is a command based operating system provided by Microsoft.

# How to Start MS-DOS?
 1. Start > Programs > Accessories > Command Prompt.
 2. Start > Run > command
    or
     Start > Run > cmd

# Command: Command are small programs that are already built with MS-DOS. Commands are of two types:
    a) Internal Command
    b) External Command
# How to create a new file?

      C:\>copy con filename  
            and press enter

# How to save file?
     ^Z then press Enter.

# How to make a new Folder?
    C:\>md foldername and press enter.

# How to open directory?
                  C:\>cd foldername  and press enter.
    C:\foldername>
# How to Change Folder?
    C:\foldername>cd..
    C:\>

# How to remove a directory (folder)?
    C:\>rd foldername and press enter

# How to delete a file?
    C:\>del filename and press enter.

# How to list contents of Folder?
    C:\>dir press enter.

# How to see the contents of File?
    C:\>type filename and press enter

# How to Erase all previous contents of Screen?\
    C:\>cls and press enter

# How to Close MS-DOS?
    C:\>exit and press enter.

# How to enter full screen mode?
    C:\> press Alt+Enter key.
I hope this is surely Helpful to you. If you do have any questions, suggestions or Complaints, please let me know about them. Just leave a comment with Valid Email, I will be surely responding.

Reactions: 

Full Forms Related to Computer - Part1


Some Full Forms and Abbreviations Related to Computer and Computer World.

  1. CPU - Central Processing Unit
  2.  RAM - Random Access Memory
  3. ROM - Read Only Memory
  4. IC - Integrated Circuit
  5. HDD - Hard Disk Drive
  6. CD - Compact Disk
  7. DVD - Digital Versatile Disk
  8.  USB - Universal Serial Bus
  9. LAN - Local Area Network
  10. MAN - Metropolitan Area Network
  11. WAN - Wide Area Network
  12. UPS - Uninterrupted Power Supply
  13. PC - Personal Computer
  14. CRT - Cathode Ray Tube
  15. OCR - Optical Character Reader
  16. OMR - Optical Mark Reader
  17. MICR - Magnetic Ink Character Reader
  18. BCR - Bar Code Reader
  19. HTTP - HyperText Transfer Protocol
  20. HTTPS - Secured HTTP
  21. FTP - File Transfer Protocol
  22. FTPS - Secured FTP
  23. ForTran - Formula Translation
  24. HTML - HyperText Markup Language
  25. DHTML - Dynamic HTML
  26. XHTML - Extensible HTML
  27. XML - Extensible Markup Language
  28. ASP - Active Server Pages
  29. VB - Visual BASIC 
  30. PHP - Hypertext Pre-Processor
  31. SQL - Structured Quiry Language
  32. MS - Microsoft
  33. MAC - Macintosh
  34. IBM - International Business Machine
  35. OS - Operating System
  36. IT - Information Technology
  37. 3G - 3rd Generation
  38. GPRS - General Packet Radio Service
  39. GAN - Global Area Network
  40. WWW - World-Wide Web
  41. URL - Uniform Resource Locator
  42. TCP - Transfer Control Protocol
  43. IP - Internet Protocol
  44. SMTP - Simple Mail Transfer Protocol
  45. POP - Post Office Protocol
  46. IMAP - Interactive Mail Access Protocol
  47. MIME - Multipurpose Internet Mail Extension
  48. GUI - Graphical User Interface
  49. TelNet - Telecommunication Network
  50. UseNet - User Network
  51. VSAT - Very Small Aperture Terminal
  52. Hz - Hertz
  53. bps - Bits Per Second
  54. Bps - Bytes Per Second
  55. SUN - Stanford University Network
  56. DBMS - DataBase Management system
  57. RDBMS - Relational DBMS
  58. FAT - File Allocation Table
  59. ISP - Internet Service Providor
  60. DOS - Disk Operating System
  61. ANSI - American National Standerd Institute
  62. ASCII - American Standerd Code for Information Interchange
  63. BASIC - Beginners All Purpose Symbolic Instruction Code
  64. COBOL - Commonly Business Oriented Language
  65. SRAM - Static RAM
  66. DRAM - Dynamic RAM
  67. PROM - Programmable Read Only Memory
  68. EPROM - Erasable PROM
  69. EEPROM - Electronically Erasable PROM
  70. ALU - Arithmetic Logical Unit
  71. MU - Memory Unit
  72. CU - Control Unit
  73. VDU - Visual Display Unit
  74. SMPS - Switch Mode Power Supply
  75. NASA - National Aero Space Administration
  76. ISRO - Indian Space Research Organization
  77. CSS - Cascaded Style Sheet
  78. Fax - Facsimile / Far Away Xerox
  79. MP3 - Motion Picture Experts Group Audio - Layer 3
  80. MPEG - Motion Picture Experts Group
  81. MOUSE - Mainly Operate Using Selection Equipment
Adding More Soon....

Reactions: 

How to Make Desktop Background full screen?

Is your Problem is like below:
It only takes up a small bit in the middle, how do I get it full screen with pictures I download from internet images?


Don't Worry, I have solution for that and here is it for you.


Windows Users:

For Windows XP,

Right Click and Choose Properties from Desktop.

Click Desktop Tab. There is a Dropdown named Position, Choose stretch.

For Windows Vista/7/8

Right Click on Desktop and Choose Personalize 

Click on Desktop Background Link in the Bottom Row. 
You will get Picture Selection Window. In the Bottom Left corner, there Position Drop Down. Choose Stretch or Fill from List.

Reactions: 

How do I remove a tag from a picture in Facebook?

How annoying it was, if someone Tagged you in a Photo and Many people commented and each and every time you get mail or Notifications for that. Or someone Tagged you in a Cartoon or such photo and that Photo started to appear in your Profile.

You surely want to remove such Photo from your Profile or want to stop such Notifications.
Best and permanent way to do so is To remove Tag from that picture. Here is simple step by step for How to Remove Tag from Facebook.

Follow Below Simple Steps to Remove Tag from Facebook.


  • Click Photo to Open.
  • Click Options located in Right Bottom corner of Photo.
  • Choose Report/Remove Tag option.
  • Choose First Option and Continue.
  • Once again Choose First Option and Continue.
You are done.

Reactions: 

What is C# and what software are required to run a C# program?

C# 

C# (pronounced see sharp) is a Object Oriented, Component Oriented and Most Advance Programming Language from Microsoft. 
C# code is to be compiled before it Run. You can use C# to Create Windows Applications as well Web Applications. Software you see in General Life are Mostly powered by C#, because if Its Simplicity and Advance Features. There is nothing impossible to do with C#. 


Now as I told earlier, C# source code must be compiled before it to Run. Even If you are creating Windows Application (Desktop based) or Web application (Browser based), you must compile the code. 
You have following Software to to the Job of C# Compiler which are called IDE here and Compiling Task is called Implementation
Main is Microsoft Visual C#. This is built in tool in Microsoft Visual Studio Express (Free). 
Mono Project provides Open Source IDE for C# named MonoDevelop.
SharpDevelop is another Open Source Tool.



There are few more applications for Linux and Mac which does the same job as in Windows.





Reactions: 

How Can I Block Some Website?

When I was answering in Community Websites and some other Web Tutorials, Most frequent question I was asked was How Can I Block particular Website in my machine/my employees machine?

(How can i block some website permanently like (facebook.com) and more social site on my employees computers.)

I have found a solution and Telling you.

Best way to block such site is using Router Setting if possible.
 
Prental control and Content Advisors are also Options but Are some traditional and annoying to Employee.
Best method to do so is Change some setting in Hosts File. I am going to tell you about that. To do so, You have to change some setting in individual PCs for doing so.
 
Open Notepad with Administrator Rights.



 
Ctrl+O to Open File. Choose File Path Below.
 
Windir:(C: )\Windows\System32\drivers\etc
 
Change File Type to All Files from Right Bottom Corner.
 
Choose hosts file and open it.




You Will See below Lines at Last of Page


# 127.0.0.1       localhost
# ::1             localhost
Now Just add this code to Block facebook
Using IPv4
127.0.0.1 www.facebook.com
 127.0.0.1 facebook.com
Using IPv6
::1             www.facebook.com
       ::1             facebook.com




 
Now Just save this File. If you are using Antivirus, This may disinfect it, So Disable Real Time Protection for some time and After saving changes enable those Setting of Antivirus.

Reactions: