ASP.NET (35) SQL (25) JAVASCRIPT (24) HTML (14) STYLE SHEET (6) ASP (4) SCRIPT (1)

Search me out HERE!!

To Fetch FORM Element value directly in JAVASCRIPT

Below example show how to fetch Form Element value directly in Javascript without use of Document.form

JAVASCRIPT:
<script language="javascript">
function checkTestForm()
{
    with (window.document.frmTest)
    {
        alert(txtPrice.value);       
    }
   
}

</script>

HTML CODE:
<form id="frmTest" name="frmTest" method="post">
<input type="text" id="txtPrice" name="txtPrice" />
<input type="button" id="btn" name="btn"  value="OK"   onclick="return checkTestForm();" />
</form>

To know your computer DRIVE Space using SQL Server

Just copy below code and execute in your SQL Server, you will get your Driver free Space:

DECLARE @OSDriveSpace TABLE
(
  DriveNm char(1),
  FreeDriveSpaceInMB int
)

INSERT INTO @OSDriveSpace
EXEC master.dbo.xp_fixeddrives

SELECT *  FROM @OSDriveSpace

How to provide Simple Custum Error Page in ASP.Net using web.config

Below code need to be included in web.config file
Note : There is already customErrors Tag in Web.config file, you need to replace that.

<system.web>
<customErrors mode="On" defaultRedirect="error.aspx"></customErrors> 
</system.web>

Here error.aspx is page where you can mention your Error Message, which will be shown every time when exception will occur in your project.

How to extract value of GROUP CHECK BOX in PHP

Below given is PHP script to get value of Selected CHECK BOX from group of CHECK BOX and HTML Code for Group of CHECK BOX

$checkbox_value ="";
$temp =$_POST['test_cb'];

while (list ($key,$val) = @each ($temp)) {
$checkbox_value .= "$val,";
}
?>

<input type="checkbox" name="test_cb[]" value="Test1" />Test1
<input type="checkbox" name="test_cb[]" value="Test2" />Test2