Monday, September 24, 2012

CREATE FOLDER LOCK WITH NOTEPAD


Guys this is tutorial on HOW TO CREATE FOLDER LOCK USING NOTEPAD... It means that no downloading any folder lock software is required.







FOLLOW THESE SIMPLE STEPS........

Step 1: Open the Notepad File.......



Step 2: Paste the following code to the NOTEPAD file.......

cls
@ECHO OFF
title Folder Locker
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Locker goto MDLOCKER
:CONFIRM
echo Are you sure u want to Lock the folder(Y/N)
set/p "cho=>"
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
goto CONFIRM
:LOCK
ren Locker "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
goto End
:UNLOCK
echo Enter password to Unlock folder
set/p "pass=>"
if NOT %pass%==type your password here goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Locker
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Locker
echo Locker created successfully
goto End
:End


Step 3: Now SAVE AS this file by the name "lock.bat"  and and SAVE AS TYPE- "ALL FILES" on anywhere in your PC









*NOTE: Don't forget to make SAVE AS TYPE- ALL FILES.......

Step 4: Double click that ".bat" file and a folder will be created....






Step 5: Now Move any confidential data which you want to keep secure and safe.........



Step 6: After moving close the folder and again double click to lock the folder... Enter "Y" to make sure that you want to lock the folder....and after locking the folder the folder actually hides.........







Step 7: After 'This the folder actually hides and to re-open the folder just double click that ".bat" file and press  again "Y"







YUHOOOO AGAIN A VERY IMPORTANT TUTORIAL TO HIDE YOUR IMPORTANT DOCUMENTS

Monday, January 17, 2011

ViewState

ViewState is the mechanism that allows state values to be preserved across page postbacks.

Because of the stateless nature of web pages, regular page member variables will not maintain their values across postbacks.  When we need a page variable to maintain its value across page post backs, we can use ViewState to store that value.  Values stored in ViewState will be serialized and sent to the client browser as the value of a hidden form input.  When you view the page source (in your browser) of a page the uses ViewState, you may see this hidden viewstate input which will look something like this:
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTM1ODM3Nj......." />
This single hidden field contains all the viewstate values for all the page controls. This is an important aspect of viewstate that you need to consider. 
Because viewstate is (by default) sent to the client browser and then returned to the server in the form of a hidden input control on your page, storing a significant amount of data in viewstate can increase your page size and can affect your page performance.
To disable ViewState for a control, you can set the EnableViewState property to false.  When ViewState is disabled for any control, it will also automatically be disabled for all child controls of that control.
Example:
<asp:Label ID="lblRequestCount" runat="server" EnableViewState="false"></asp:Label>
This does not mean that you should avoid viewstate. You should however, always be aware of what you are storing there and how it affects your overall page size.
Some people hate ViewState, others love it. Either way, you have control over your ViewState, so take control!

Example 

One simple way to store small values in viewstate is to use a property instead of a member variable.  This property can use viewstate to store its value rather than a member variable that would lose the value over a postback. For example, storing an Integer in viewstate can be accomplished like this:
VB
Public Property SomeInteger() As Integer
    Get
        Dim o As Object = ViewState("SomeInteger")
        If Not o Is Nothing Then Return DirectCast(o, Integer)           
        Return 0 'a default
    End Get
    Set(ByVal value As Integer)
        ViewState("SomeInteger") = value
    End Set
End Property
C#
public int SomeInteger {
    get {
        object o = ViewState["SomeInteger"];
        if (o != null) return (int)o;
        return 0;
        //a default
    }
    set { ViewState["SomeInteger"] = value; }
}