Monday, October 29, 2012

Toggle Display (On / Off)

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

  function TDisplay(elementID) {

  var CurrentElement = document.getElementById(elementID); = ( != 'none') ? 'none' : '';

  return false;



.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!


Pass data from one page to another new popup window

<html xmlns="">

<head runat="server">


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

    function PassData() {

        var Qstr = document.getElementById("<%=txtData.ClientID %>").value;'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;





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


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


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

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




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')