Monday, October 29, 2012

Toggle Display (On / Off)

JavaScript
<script language="javascript" type="text/javascript">

  function TDisplay(elementID) {

  var CurrentElement = document.getElementById(elementID);

  CurrentElement.style.display = (CurrentElement.style.display != 'none') ? 'none' : '';

  return false;

}

</script>

.ASPX Page
<asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="return TDisplay('panel1');">

Toggle Display(On / Off)</asp:LinkButton>

<asp:Panel ID="panel1" runat="server">

    Panel content here!

</asp:Panel>

Pass data from one page to another new popup window

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

    <title></title>

<script language="javascript" type="text/javascript">

    function PassData() {

        var Qstr = document.getElementById("<%=txtData.ClientID %>").value;

        window.open('Your-Target-Page.aspx?ID=' + Qstr, 'NewWindow', 'width=400,height=300,location=no,menubar=no,resizable=no,scrollbars=no,status=yes,toolbars=no');

        return  false;

}



</script>

</head>

<body>

    <form id="form1" runat="server">

    <div>

<asp:TextBox ID="txtData" runat="server" Text="23"

CssClass="TextBox"></asp:TextBox>

<asp:Button ID="btnRedirect" runat="server" Text="Window Open"

CssClass="Button" OnClientClick="return PassData(); " />

    </div>

    </form>

</body>

Monday, October 15, 2012

Hide Files or Folders Using Command Prompt

For that you need to follow the following instructions

  1. Press windowkey+R: Run command dialog box appears.
  2. Now type "cmd" and hit enter. A command prompt window displays.
  3. Now type "attrib +s +h E:\collegephotos" and hit enter.
  4. The folder "collegephotos" will be hidden (Note: It cannot be viewed by any search options)

    (To view this folder again, use the same command but replace '+' with '-' on both flags 's' and 'h')

Wednesday, September 19, 2012

Introduction to SVN

What you will need to download the Tortoise SVN client application.
Download and install and after a restart (bummer) we are ready to start working!
The Tortoise SVN adds its functionality in the Windows Explorer Context Menu.
Introduction to SVN

Verifying the connection to the SVN Server

Before we start working we will have to Verify the connection to the SVN Server. Right click on any folder in the Windows Explorer and select TortoiseSVN -> Repo-browser
you will be asked for a path to the repository enter : file:///C:/<The location of the repositories>/<The repository name you selected> in my case I will enter :
file:///C:/Repositories/Test/
what you should get is this:
Introduction to SVN
If you got this it means that you can connect to the SVN Server.
If you are trying to connect to a remote server you will have to enter the following when asked for the URL of the repository:
https://<The ip of the Server>/svn/<The Repository Name>
You should get the same results.

Getting the files from the repository

To get the files from the repository we created earlier (in the previous article) we will have to create a new folder, which I presume everyone knows how to do :).
After you have created the folder, right click on it and select the "SVN Checkout…" option from the context menu. You will see the following screen:
SVN Checkout
If you followed all the steps the address of the repository should be already written here. All you have to do is click "OK"
Files Checked Out
This means we have checked out the files successfully and we can start working!
The directory should look like this:
Checked out Directory
The Green V marks mean that nothing has changed inside the directory. Lets add a new file to the trunk (main branch) directory. We will then Right Click on the trunk and select "Commit"
SVN Commit
The SVN Server has detected that you have added a new file and you will have to check the Checkbox next to it in order for it to be inserted to the repository.
Lets try and edit the file and add some text in it. Both the file and the Directory will get a red exclamation mark saying they have been changed:
Folder Changed
File Changed
To send the Changes to the Server you can right click any of them and select "SVN Commit…" from the context menu. Doing it on the Folder will make the Commit recursive to all the files inside it.
That’s it!

Saturday, September 15, 2012

Shortcut to Lock Your Computer


You secure your computer by locking it whenever you're
away from your desk. If you are on a domain, by pressing Ctrl+Alt+Del and then
clicking Lock Computer, you can prevent unauthorized users from gaining access
to your computer. Only you and members of the Administrators group on your
computer can unlock it.

 


Follow the below steps to accomplish the
task.


1.
Right-click an
open area of your desktop--> point to New--> and then click
Shortcut.


Shortcut to Lock Your Computer

2. In
the Location box, type %windir%\System32\rundll32.exe user32.dll
LockWorkStation



Shortcut to Lock Your Computer

3. Click Next--> in the Name box type a name
for the shortcut such as--> Lock Computer--> and then click
Finish.

Shortcut to Lock Your Computer

Shortcut to Lock Your Computer