Tuesday, December 11, 2007

How To Find What Are All The Tables Available In Particular Schema In SQL SEREVER

Query To List All The Tables In a Particular Schema

Query

SELECT * FROM INFORMATION_SCHEMA.TABLES


Description
This Query List All The Tables In a Particular Schema(Database).


For Example

If You Are in the Pubs Schema(Database) In SQL SERVER,This Query List All The Tables available within the particular Schema including systable and user table

Query To List All The Columns Available In A Particular Schema


Query

SELECT * FROM INFORMATION_SCHEMA.COLUMNS


Description

This Query List All The Columns Available In A Particular Schema(Database)


For Example
If You Are in the Pubs Schema(Database) In SQL SERVER, This Query List All The Columns available within the particular Schema

Query To List All The Users Tables In a Particular Schema


Query

SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' ORDER BY TABLE_NAME


Description

This Query List All The Users Tables In a Particular Schema(Database).

For Example
If You Are in the Pubs Schema(Database) In SQL SERVER, This Query List All The Users Tables available within the particular Schema

Query To List All The Columns Available In A Particular Schema


Query

SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'AUTHORS'


Description
This Query List All The Columns Available In A Particular Schema(Database) for the Particular Table Authors

To Find The Primary Key Of The Table.


Syntax:


SP_PKEYS YourTableName


Description

This System Procedure Returns the Primary Key Reference Of The Particular Table In That Schema(Database).

Example: SP_PKEYS
AUTHORS

Note:Giving the tablename within the single quotes is not mandatory

To Find The Foreign Key Of The Table.

Syntax:


SP_FKEYS YourTableName


Description

This System Procedure Returns the Foreign Key Reference Of The Particular Table In That Schema(Database).

Example: SP_FKEYS
AUTHORS
Note: Giving the tablename within the single quotes is not mandatory


Tuesday, November 27, 2007

Oracle Find or Counts Number Of Row(s) And Column(s) In A Table

select count(*) from TableName // To Count The Number of Row(s) in a Particular table

Ex: Select Count(*) from emp;

select count(*) from user_tab_columns where table_name='TABLENAME';

// To Count The Number of Column(s) in a Particular table,

Note :TABLENAME Should be UPPERCASE Letter

Ex: Select  count(*) from user_tab_columns where table_name = 'EMP'



Friday, November 2, 2007

Dynamically Writing into Web.config File

Inline
    XmlDocument xDoc = new XmlDocument(); // Gobal Declaration
string Path; // Gobal Declaration
int i; // Gobal Declaration
protected void Page_Load(object sender, EventArgs e)
{
i = Convert.ToInt32(ConfigurationManager.AppSettings["Test"].ToString());
}
protected void bt1_Click(object sender, EventArgs e)
{
Path = Server.MapPath("~/web.config");
xDoc.Load(Path);
XmlNodeList NodeList = xDoc.GetElementsByTagName("appSettings");
XmlNodeList tNodeList = NodeList[0].ChildNodes;
XmlAttributeCollection xAttColl = tNodeList[0].Attributes;
xAttColl[0].InnerXml = "Test";
xAttColl[1].InnerXml = Convert.ToString(i + 1);
xDoc.Save(Path);
Response.Write(ConfigurationManager.AppSettings["Test"].ToString());
}

Web.Config

<configuration>

<appSettings>

<add key="Test" value="0" /> <!-- Add This In Your WebConfig File -->

</appSettings>

</configuration>



Friday, October 19, 2007

Solution For Sys.WebForms.PageRequestManagerTimeoutException

< asp:ScriptManager ID="ScriptManager1" runat="server" AsyncPostBackTimeOut="300" >

</
asp:ScriptManager>

By Default AsyncPostBackTimeOut Property Value's 90 sec



Ajax UpdatePanal Custom Error Handling

Put This Code Within Inline Form Tag,
Note:Dont Put This JavaScript As a Seperate js File in your project,
use within a form tag

<form id="form1" runat="server">
<script language="javascript" type="text/javascript">


function pageLoad(sender, args)
{

Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequest);
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequest);

}

function beginRequest(sender, args)
{

.
.
.


}

function endRequest(sender, args)
{

var e = args.get_error();

if (e != null)
{
args.set_errorHandled(true);
alert('Custom Error');
}

}
</script>
</form>



Friday, October 5, 2007

set session timeout in webconfig

<configuration>

<system.web>

<sessionState mode="Off|InProc|StateServer|SQLServer"
<!--
Mode : Specifies where to store the session state.
Off : Indicates that session state is not enabled.
InProc : Indicates that session state is stored locally.
StateServer : Indicates that session state is stored on a remote server.
SQLServer : Indicates that session state is stored on the SQL Server.
-->
cookieless="true|false"
<!--
cookieless : Specifies whether sessions without cookies should be used to identify client sessions.
true : Indicates that sessions without cookies should be used.
false : Indicates that sessions without cookies should not be used. The default is false.
-->
timeout="number of minutes"
<!--
timeout : Specifies the number of minutes a session can be idle before it is abandoned. The default is 20.
-->

stateConnectionString="tcpip=server:port"

<!--
stateConnectionString :Specifies the server name and port where session state is stored remotely.
For example, "tcpip=127.0.0.1:42424". This attribute is required when mode is StateServer.
-->
sqlConnectionString="sql connection string"

<!--
sqlConnectionString : Specifies the connection string for a SQL Server.

For example, "data source=localhost;Integrated Security=SSPI;Initial Catalog=northwind".
This attribute is required when mode is SQLServer.
-->
stateNetworkTimeout="number of seconds"/>

<!--
stateNetworkTimeout : When using StateServer mode to store session state,specifies the number of seconds the TCP/IP network connection between the Web server and the state server can be idle before the session is abandoned. The default is 10.
-->
</system.web>

</configuration>


Monday, October 1, 2007

return values from popup to the parent page(Child To Parent)

This Program Ilustrate a Html Parent Page & Child Page return values from popup to the parent page, when you click a Parent Click Button In A Parent.html, The Child.html page will popped up, Enter any value in the Text Box in the Child.html, then click Child click button, the value entered in the textbox(child.html) will be passed to the textbox(parent.html).

Parent.html
~~~~~~~~~

<html>

<head>

<script language="javascript">

function test()

{

var FrmChild = window.showModalDialog('child.html',null,'status:off;center:yes;scroll:no;');

if(FrmChild != null)

{

document.getElementById('Ptxt').value = FrmChild;

}

else

{

return false;

}

}

</script>

<head>

<body>

<input type="text" id='Ptxt'/> <input type="button" onclick="test();" value="Call Child Window" />

</body>
</html>




Child.html
~~~~~~~

<html>

<head>

<script language="javascript">


function Child()

{

var Str = document.getElementById('ctxt').value; window.returnValue = Str;

window.close();

}
</script>


<head>

<body>

Enter Any Value To Pass To The Parent Window<br />

<input type="text" id='ctxt' />

<input type="button" onclick="Child();" value=" Child Click" /> </body>

</html>


Program Demo

Note : IE Supported


Friday, September 28, 2007

Move Div Vertical ScrollBar Simultaneously

To Make Div To Overflow i had created such Space Between <pre> </pre> tags

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" >
<title>Move Div Vertical ScrollBar Simultaneously</title>
<script language="javascript">
function divScrollR()
{
var Right = document.getElementById('Av');
var Left = document.getElementById('Bv');
Left.scrollTop = Right.scrollTop;
}

function divScrollL()
{
var Right = document.getElementById('Av');
var Left = document.getElementById('Bv');
Right.scrollTop = Left.scrollTop;
}
</script>

</head>
<body>
<form id="form1" runat="server">
<div>
<div id="Av" style="z-index: 102; width: 100px; height: 100px; overflow: auto;
overflow-x: hidden; overflow-y: scroll; left: 10px; position: absolute; top: 16px;" onscroll="divScrollR();">
<pre>













</pre>
</div>
<div id="Bv" style="z-index: 101; top: 16px; width: 100px; height: 100px; overflow: auto;
overflow-x: hidden; overflow-y: scroll; left: 113px; position: absolute;" onscroll="divScrollL();">
<pre>













</pre>
</div>
</div>
</form>
</body>
</html>






Program Demo



Block F5(Refresh) Key In IE and Firefox

<html>

<head>


<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<title>Block F5 Key In IE & Mozilla</title>

<script language="JavaScript">

var version = navigator.appVersion;


function showKeyCode(e)
{
var keycode =(window.event) ? event.keyCode : e.keyCode;

if ((version.indexOf('MSIE') != -1))
{
if(keycode == 116)
{
event.keyCode = 0;
event.returnValue = false;
return false;
}
}
else
{
if(keycode == 116)
{
return false;
}
}
}


</script>

</head>
<body onload="JavaScript:document.body.focus();" onkeydown="return showKeyCode(event)">

</body>

</html>

Program Demo

Note: Tested In IE 7 & Mozilla Firefox 2.0.0.6



Sunday, September 23, 2007

copy to clipboard

<html>
<head>
</head>
<body>
<textarea id='clipText'>Enter Text And Click Button To Copy Text To ClipBoard</textarea><br />
<input type=button id='bt' onclick="clipboardData.setData('Text',document.getElementById('clipText').value);" value="Copy" />
<input type=button onclick="clipboardData.clearData('Text');" value="Clear" />
<input type=button onclick="alert(clipboardData.getData('Text'));" value="Paste" />
</body>

Program Demo


AJAX Control Toolkit 10920 Released

AJAX Control Toolkit 10920 released on 09-20-2007,

More Details and Download,



Thursday, September 20, 2007

Restrict Alphabet Input In TextBox Using Regular Expression

<html>
<head>
<script language="javascript">
function blockChar()
{
var str = document.getElementById('txt').value;
str = str.replace(/[^\d]*/g,'');
document.getElementById('txt').value = str;
}
</script>
</head>
<body onload="javascript:document.getElementById('txt').focus();">
<input type="text" id='txt' onkeyup="blockChar();" />
</body>
</html>


Program Demo

Note:IE Supported



Tuesday, September 18, 2007

Restrict Alphabet Input In TextBox

<html>
<head>
<script language="javascript">
function blockChar(e)
{
var keyVal =(window.event) ? event.keyCode : e.keyCode;
if (window.event) keyVal = window.event.keyCode;
if((keyVal > 64 && keyVal < 93))
{
return false;
}
}
</script>
</head>
<body onload="javascript:document.getElementById('txt').focus();">
<input type="text" id='txt' onkeydown="return blockChar(this);" />
</body>
</html>

Program Demo



Monday, September 17, 2007

Restrict Numberic Input In TextBox

<html>
<head>
<script language="javascript">
function blockNum(e)
{
var keyVal =(window.event) ? event.keyCode : e.keyCode;
if (window.event) keyVal = window.event.keyCode;
if((keyVal > 47 && keyVal < 58) || (keyVal > 95 && keyVal < 107))
{
return false;
}
}
</script>
</head>
<body onload="javascript:document.getElementById('txt').focus();">
<input type="text" id='txt' onkeydown="return blockNum(this);" />
</body>
</html>

Program Demo



Saturday, September 15, 2007

Visual Studio 2005 Keyboard Shortcuts(KeyBinding) VII


Navigation



Edit.FindAllReferences SHIFT+F12 or CTRL+K, R


Edit.GoToBrace CTRL+CTRL + ]


Edit.GoToDefi nition F12


Edit.GoToNextLocation F8


Edit.IncrementalSearch CTRL+I


View.ClassViewGo-ToSearch, Combo CTRL+K,CTRL+V


View.Forward-BrowseContext CTRL+SHIFT+7


View.PopBrowse-Context CTRL+SHIFT+8


View.Navigate-Backward CTRL+MINUS+SIGN (-)


View.Navigate-Forward CTRL+SHIFT+MINUS SIGN (-)


Edit.FindInFiles CTRL +SHIFT + F


Edit.FindSymbol ALT+F12


View.ViewCode F7


View.ViewDesigner SHIFT+F7


Note: Switches to Design to Source (Available only in Source view.)


View.ViewMarkup SHIFT+F7


Note:Switches to Source to Design (Available only in Design view.)


Window.MoveTo-NavigationBar CTRL+F2


Edit.Find CTRL+F


Edit.GoTo CTRL+G


Edit.GoToFindCombo CTRL+/




Friday, September 14, 2007

Visual Studio 2005 Keyboard Shortcuts(KeyBinding) VI


Debugging



Debug.Autos CTRL+D, A


Debug.CallStack CTRL+D, C


Debug.Immediate CTRL+D, I


Debug.Locals CTRL+D, L


Debug.QuickWatch CTRL+D, Q


Debug.Start CTRL+F5


Debug.StartWithoutDebugging CTRL+F5


Debug.StepInto F11


Debug.StepOut SHIFT+F11


Debug.StepOver F10


Debug.Stop-Debugging SHIFT+F5


Debug.Toggle-Breakpoint F9


Debug.Watch CTRL+D, W


Debug.Enable-Breakpoint CTRL+F9


Make Datatip Transparent [CTRL]




Thursday, September 13, 2007

Visual Studio 2005 Keyboard Shortcuts(KeyBinding) Part V


Window



View.ClassView CTRL+W, C


View.CodeDefi nition-Window CTRL+W, D


View.Command-Window CTRL+W, A


View.ErrorList CTRL+W, E


View.ObjectBrowser CTRL+W, J


View.Output CTRL+W, O


View.PropertiesWindow CTRL+W, P


View.SolutionExplorer CTRL+W, S


View.TaskList CTRL+W, T


View.Toolbox CTRL+W, X


View.ServerExplorer CTRL+W, L


Window.Close-ToolWindow SHIFT +ESC


Data.ShowDataSources SHIFT+ALT+D


Window.Close-Document,
Window
CTRL+F4


Window.Next-Document,
Window Nav
CTRL+TAB




return values from popup to the parent page(Child To Parent)

This Program Ilustrate a Html Parent Page & Child Page return values from popup to the parent page, when you click a Parent Click Button In A Parent.html, The Child.html page will popped up, Enter any value in the Text Box in the Child.html, then click Child click button, the value entered in the textbox(child.html) will be passed to the textbox(parent.html).

Parent.html
~~~~~~~~~

<html>

<head>

<script language="javascript">

function test()

{

var FrmChild = window.showModalDialog('child.html',null,'status:off;center:yes;scroll:no;');

if(FrmChild != null)

{

document.getElementById('Ptxt').value = FrmChild;

}

else

{

return false;

}

}

</script>

<head>

<body>

<input type="text" id='Ptxt'/> <input type="button" onclick="test();" value="Call Child Window" />

</body>
</html>




Child.html
~~~~~~~

<html>

<head>

<script language="javascript">


function Child()

{

var Str = document.getElementById('ctxt').value; window.returnValue = Str;

window.close();

}
</script>


<head>

<body>

Enter Any Value To Pass To The Parent Window<br />

<input type="text" id='ctxt' />

<input type="button" onclick="Child();" value=" Child Click" /> </body>

</html>


Program Demo

Note : IE Supported


Wednesday, September 12, 2007

Visual Studio 2005 Keyboard Shortcuts(KeyBinding) Part IV


Refactoring



Refactor.-EncapsulateField CTRL+R, E


Refactor.Extract-Interface CTRL+R, I


Refactor.ExtractMethod CTRL+R, M


Refactor.Promote-LocalVariableto-Parameter CTRL+R, P


Refactor.Remove-Parameters CTRL+R, V


Refactor.Rename CTRL+R, R OR F2


Refactor.Reorder-Parameters CTRL+R, O





Tuesday, September 11, 2007

Visual Studio 2005 Keyboard Shortcuts(KeyBinding) Part III


IntelliSense



Edit.CompleteWord CTRL+SPACEORCTRL+ K, W


Edit.ListMembers CTRL+JORCTRL+K, L


Edit.QuickInfo CTRL+K, I


Edit.ParameterInfo CTRL+SHIFT+SPACEORCTRL+K, P



Build



Build.BuildSolution F6 OR CTRL+SHIFT+B


Build.BuildSelection SHIFT+F6




Monday, September 10, 2007

Visual Studio 2005 Keyboard Shortcuts(KeyBinding) Part II


Editing



Edit.CollapseTo-Definitions CTRL+M, O


Edit.ToggleAllOutlining CTRL+M, L


Edit.Toggle-OutliningExpansion CTRL+M, M


Edit.StopOutlining CTRL+M, P


Edit.CommentSelection CTRL+K, C


Edit.Uncomment-Selection CTRL+K, U


Edit.FormatDocument CTRL+K, D


Edit.FormatSelection CTRL+K, F


Edit.InsertSnippet CTRL+K, X


Edit.SurroundWith CTRL+K, S


Edit. Invoke Snippet From Shortcut TAB


Edit.CycleClipboardRing CTRL+SHIFT+V


Edit.Replace CTRL+H


Edit.ReplaceInFiles CTRL+SHIFT+H


View.ShowSmartTag CTRL+. or SHIFT +ALT+F10




Sunday, September 9, 2007

Visual Studio 2005 Keyboard Shortcuts(KeyBinding) Part I

File


File.NewProject                        CTRL+SHIFT+N




File.OpenProject                     CTRL+ SHIFT+O




File.OpenFile                            CTRL+O




Project.AddClass                     SHIFT+ALT+C




Project.AddExisting-Item SHIFT+ALT+A




Project.AddNewItem           CTRL+SHIFT+A



Friday, September 7, 2007

Sleep Function Using JavaScript

<html>
<head>
<script language='javascript'>
function sleep()
{

var Sleep = setTimeout("alert('Hi Have A Nice Time And Day ')",2000);    
             // 2000 Millisecond(2 sec)

}
</script>
<body onload='sleep()'>
Alert Box Will Be Displayed After 2 Seconds the Body is Loaded
</body>
</html>

Note: Tested In IE 7


Program Demo


Wednesday, September 5, 2007

Move More Than one Div Scroll Bar At a time

This Program describe how to move both the scroll bar of the div at a time using Javascript;
Div Element Temp and Temp1 in this program to make the Div divTop and divBot to get Overflow,
<html>
<head>
<script language="">
function divScroll()
{
var Top = document.getElementById('divTop');
var Bot = document.getElementById('divBot');
Top.scrollLeft = Bot.scrollLeft;
}
</script>
</head>
<body >
Top
<div id='divTop' style="Top:100px; left:0px; width:100px; overflow:auto; overflow-y:hidden; " >
<div id='Temp' style="width:400px;">Test</div></div><br />
Bottom
<div id='divBot' style="width:100px; overflow:auto; overflow-y:hidden;" onscroll="divScroll();">
<div id='Temp1' style="width:400px;">Test1</div></div></body>
</html>

Program Demo

Note IE Supported


Saturday, September 1, 2007

Download Visual Studio 2008 Beta 2

Welcome To Visual Studio Arena


Welcome To Visual Studio Arena



Visual Studio 2005 Downloads

Visual Studio 2005Service Pack 1 (SP1)

.Net Framework

Feature Specifications for Visual Studio 2008 and .NET Framework 3.5

Microsoft Pre-Release Software Microsoft .NET Framework 3.5 – Beta 1


Microsoft .NET Framework 3.5 Beta 2

 
Visual Studio 2008 Downloads

Visual Studio 2008 Beta 2 Express Editions

Visual Studio 2008 Beta 2 Standard Edition

Visual Studio 2008 Beta 2 Professional Edition

Visual Studio Team System 2008 Beta 2 Team Suite

Visual Studio Team System 2008 Beta 2 Team Foundation Server

Visual Studio Team System 2008 Beta 2 Test Load Agent

MSDN

MSDN Library for Visual Studio 2008 Beta 2

Expression Studio

Microsoft Expression Studio Free Trial
                                                                                                                                                          
courtesy
Courtesy Microsoft


Thursday, August 23, 2007

Remove Space At Beginning Of The String Using Regular Expression (Left Trim)

<html>
<head>
<script language="javascript">
function Right_Trim()
{
var str = document.getElementById('txt1').value;
str = str.replace(/^\s+/g,'');
document.getElementById('txt1').value = str;
document.getElementById('txt1').focus();
}
</script>
</head>
<body>
<input type='text' id='txt1' value='                 Click To Check' />
<input type='button' id='bt1' value='Remove Space At Beginning Of The String' onclick='Right_Trim();' />
</body>
</html>



Wednesday, August 22, 2007

Removing The White Space In The String At The End Using Regular Expression (Right Trim)

<html>
<head>
<script language="javascript">
function Left_Trim()
{
var str = document.getElementById('txt1').value;
alert(str.length);// Alert To Show The Length Of The String Before Removing White Space
str = str.replace(/\s+$/g,'');
alert(str.length); // Alert To Show The Length Of The String After Removing White Space
document.getElementById('txt1').value = str;
document.getElementById('txt1').focus();
}
</script>
</head>
<body>
<input type='text' id='txt1' value='Click To Check ' /> <input type='button' id='bt1' value='Remove Space At End Of The String' onclick='Left_Trim();' />
</body>
</html>




Friday, August 17, 2007

Trap F1 key in IE, ByPass Showing Help Window

Blocking F1 keys using javascript,

<html>
<head>
<script>
function ByPass()
{
var kCode = window.event.keyCode;
       if(kCode == 112)
      {
             alert('F1 Clicked'); // Alter Code As Your Wish
       }
}
</script>
</head>
<body onhelp="return false;" onkeydown="ByPass()">
</body>
</html>


Note: Tested In IE 7



Wednesday, August 15, 2007

60 years of Freedom - Happy Indian Independence Day

Here I Wishing everyone a very Happy Indian Independence Day. 15th August, 1947 was the day India got her Independence from the British. And here we are 60 years hence, making good progress on the long winding road to success.

Listen Vande Mataram Online


Indian Flag


Saturday, August 11, 2007

Decide Which Certification Is Right for You

If You are decided to Write Exam, Then Choose Which Certification Is Suit For Your Career


Img Not Yet Loaded Try This Link:http://www.microsoft.com/learning/mcp/sixsteps.mspx

Courtesy Microsoft


Setting Up | Changing the default browser used in VS 2005

Step 1: Open a WebForm .aspx file in .NET IDE.

Setp 2: Select the "Browse With..." option from the File menu.

Or

1) Right click on a .aspx page in your solution explorer

2) Select the "browse with" context menu option


Step 2.1
:Browser Dialog Will displayed in screen.

Step 2.2:Click Add Button From the Browser Dialog.

Step 3:In the Add Dialog, Two think have to mention,Program name and friendly name.

Step 3.1: In Program name, have to give the Full Path Of the Browser.
For Example:
Opera :"C:\Program Files\Opera\Opera.exe".
FireFox:"C:\Program Files\Firefox\firefox.exe".
Step 3.2:Friendly Name, You can give any name as your wish.

Step 4:Select your preferred browser from the list and click the "Set as Default" button.



Friday, August 10, 2007

JavaScript Program To Display Date and Current Time

<html>
<head>
<script type="text/javascript">
function TickTick()
{
var today=new Date()
var dd = today.getDate();
var mm = today.getMonth();
var yy = today.getFullYear();
var h=today.getHours()
var m=today.getMinutes()
var s=today.getSeconds()
m=secTicker(m)
s=secTicker(s)

document.getElementById('Clock').innerHTML="<strong>"+dd+"-"+mm+"-"+yy+" (dd/mm/yyyy)<br/>"+h+":"+m+":"+s+"</strong>";
t=setTimeout('TickTick()',1000)


}

function secTicker(i)// This Function is to add zero before minutes and second value which is less than 10
{
if (i < 10){i = "0" + i}return i; }
</script>
</head>

<body onload="TickTick()">
<div id="Clock"></div>

</body>
</html>

OutPut



Thursday, August 9, 2007

Date() Object In JavaScript

Dates and times creates a series of special problems to the computer programming particularly Web programmer who has to supply web Content to a global audience. For Example:Some countries present the date as dd/mm/yy while others use mm/dd/yy.

In JavaScript Date Object is a part of the overall specification of JavaScript and is available to any page that can include JavaScript,you create a new date object instance by creating a variable as follows: dtObj = new Date( );

The Date( ) object doesn't have properties that can be directly read and written. Instead it has methods that are used to work with the data value in the object.



Program:

<html>
<head>
<title>Date Object In JavaScript</title>
</head>
<body>
<script language="javascript">
dtObj = new Date();

document.write
("Return the day of the month "+"("+dtObj.getDate( )+")"+".<br/><br/>");

// O/P Will Be == > Return the day of the month 9

document.write
("Return the day of the week "+"("+dtObj.getDay( )+")"+ ".<br/><br/>");

// O/P Will Be == > Return the day of the week 4.

document.write
("Return the four digit year "+"("+dtObj.getFullYear( )+")"+ ".<br/><br/>");

// O/P Will Be == > Return the four digit year 2007.

document.write
("Return the hours "+"("+dtObj.getHours( )+")"+ ".<br/><br/>");

// O/P Will Be == > Return the hours 18.

document.write
("Return the milliseconds "+"("+dtObj.getMilliseconds( )+")"+ ".<br/><br/>");

// O/P Will Be == > Return the milliseconds 125.

document.write
("Return the minutes "+"("+dtObj.getMinutes( )+")"+ ".<br/><br/>");

// O/P Will Be == > Return the minutes 29.

document.write
("Return the month "+"("+dtObj.getMonth( )+")" + ".<br/><br/>");

// O/P Will Be == > Return the month 7.

document.write
("Return the seconds "+"("+dtObj.getSeconds( )+")" + ".<br/><br/>");

// O/P Will Be == > Return the seconds 17

document.write
("Return the internal representation of the time "+"("+dtObj.getTime( )
+")"+ ".<br/><br/>");

// O/P Will Be == > Return the internal representation of the time 1186664357125.

document.write
("Return the offset from GMT "+"("+dtObj.getTimezoneOffset( ) +")"+ ".<br/><br/>");

// O/P Will Be == > Return the offset from GMT -330.

document.write
("Return the Universal Time day of the month "+"("+dtObj.getUTCDate( )+")" + ".<br/><br/>");

// O/P Will Be == > Return the Universal Time day of the month 9.

document.write
("Return the Universal Time day of the week "+"("+dtObj.getUTCDay( )+")"+ ".<br/><br/>");

// O/P Will Be == > Return the Universal Time day of the week 4.

document.write
("Return the Universal Time four digit year "+"("+dtObj.getUTCFullYear( )+")" + ".<br/><br/>");

// O/P Will Be == > Return the Universal Time four digit year 2007.

document.write
("Return the Universal Time hours "+"("+dtObj.getUTCHours( )+")" + ".<br/><br/>");

// O/P Will Be == > Return the Universal Time hours 12.

document.write
("Return the Universal Time milliseconds "+"("+dtObj.getUTCMilliseconds( )+")" + ".<br/><br/>");

// O/P Will Be == > Return the Universal Time milliseconds 125.

document.write
("Return the Universal Time minutes "+"("+dtObj.getUTCMinutes( ) +")"+ ".<br/><br/>");

// O/P Will Be == > Return the Universal Time minutes 59.

document.write
("Return the Universal Time month "+"("+dtObj.getUTCMonth( )+")"+ ".<br/><br/>");

// O/P Will Be == > Return the Universal Time month 7.

document.write
("Return the Universal Time seconds "+"("+dtObj.getUTCSeconds( )+")"+".<br/><br/>");

// O/P Will Be == > Return the Universal Time seconds 17.

document.write
("The time and date at Your computer's location "+"("+dtObj.toLocaleString()+")" + ".<br/><br/>");

//The time and date at Your computer's location Thursday, August 09, 2007 6:29:17 PM.

document.write
("The time zone offset B/W local time and GMT is "+"("+dtObj.getTimezoneOffset()+")" + " minutes.<br/><br/>");

//The time zone offset B/W local time and GMT is -330 minutes.

document.write
("The time and date (GMT) is: "+"("+dtObj.toGMTString()+")" + ".<br/><br/>");

//The time and date (GMT) is: Thu, 9 Aug 2007 12:59:17 UTC.

</script>
</body>
</html>

Note: Output In Coment Line are which i got as result when i Compiled in My System,
so date and time will change according your system time and day.



Sunday, August 5, 2007

Dynamically Increase The Size Of The TextBox Using JavaScript

<html>
<head>
<script>
function incr()
{
var len = document.getElementById('txt').value;
document.getElementById('txt').style.width = 75+len.length*4+'px';
}
</script>
<body>
<input type='text' id='txt' onkeydown='incr()' style='width:75px' />
</body>
</html>




Friday, August 3, 2007

Remove White Space In String Using Regular Expression in JavaScript

<html>
<head>
<script language="javascript">
function rmWhiteSpace()
{


var str = document.getElementById('txt1').value;

str = str.replace(/\s+/g,'');

document.getElementById('txt1').value = str;

// \s+ Description
// + 1 or more of previous expression.
// \s Matches any white-space character.
// Equivalent to the Unicode character categories [\f\n\r\t\v\x85\p{Z}].
// If ECMAScript-compliant behavior is specified with the ECMAScript option,
// \s is equivalent to [ \f\n\r\t\v].
}
</script>
</head>
<body>
<input type='text' id='txt1' value=' Click To Check' /> <input type='button' id='bt1' value='Remove White Space' onclick='rmWhiteSpace();' />
</body>
</html>


Program Demo

OutPut





Sunday, July 15, 2007

Software life cycle (Alpha & Beta Version)

              A software release is the distribution, whether public or private, of an initial or new and upgraded version of a computer software product. Each time a software program or system is changed, the programmers and company doing the work decide on how to distribute the program or system, or changes to that program or system.

            The software release life cycle is composed of different stages that describe the stability of a piece of software, such as Pre-alpha,alpha,beta,Release candidate,Gold

Origin of 'α' and 'ß'

            The term beta test applied to software comes from an early IBM hardware product test convention dating back to punched card tabulating and sorting machines. Hardware first went through an alpha test for preliminary functionality and small scale manufacturing feasibility. Then came a beta test to verify that it actually correctly performed the functions it was supposed to and could be manufactured at scales necessary for the market, and then a c test to verify safety. Beta tests were conducted by people or groups other than the developers. As other companies began developing software for their own use, and for distribution to others, the terminology stuck and now is part of our common vocabulary.



Pre-alpha

            pre-alpha release before alpha or beta, is not "feature complete". It refers to all activities performed during the software project prior to software testing. These activities can include requirements analysis, software design, software development and unit testing.

Alpha

           The alpha version of a product still awaits full testing of all its functionality and is not feature complete, but satisfies all the software requirements. As the first major stage in the release lifecycle, it is named after alpha(the first letter in the Greek alphabet). Alpha level software can be considered approximately 35% complete, and typically includes temporary material and multiple product-breaking issues.

Beta

           A beta version is the first version released outside the organization or community that develops the software, for the purpose of evaluation or real-world black/grey-box testing. The process of delivering a beta version to the users is called beta release. Beta level software is between 60% and 70% complete, generally includes all features, but may also include known issues and bugs of a less serious variety.

Release candidate

          The term release candidate refers to a version with potential to be a final product, ready to release unless fatal bugs emerge. In this stage, the product features all designed functionalities and no known showstopper class bugs. At this phase the product is usually code complete.

Gold or general availability release

          The gold or general availability release version is the final version of a particular product. It is typically almost identical to the final release candidate, with only last-minute bugs fixed. A gold release is considered to be very stable and relatively bug-free with a quality suitable for wide distribution and use by end users. In commercial software releases, this version may also be signed

Courtesy



Wednesday, July 11, 2007

Inserting Date And Selecting Particular Date From Table Using Oracle

Cearting A Sample Table With The Date Field

create table EMP1_Test(id varchar(5),Fname varchar(10), DOB date)
insert into EMP1_Test(ID,FNAME,DOB) values('1','Test',to_date('19991010','yyyymmdd'))
insert into Emp1_Test(ID,FNAME,DOB) values('2','Test',to_date('11101999','mmddyyyy'))

select * from EMP1_test



select * from EMP1_Test where to_char(dob,'MM/DD/YYYY') = '10/10/1999'



Friday, July 6, 2007

Get Mouse Position Using JavaScript

IE Supported

<html>
<body>
<script language="JavaScript">
<!--
document.onmousemove = getCoordinate;
var mosX = 0 ;
var mosY = 0 ;
function getCoordinate(e)
{
mosX = event.clientX + document.body.scrollLeft ;


//clientX Property Sets or retrieves the x-coordinate of the mouse
//pointer's position relative to the client area of the window,
//excluding window decorations and scroll bars
//scrollLeft Property Sets or retrieves the distance between the
//left edge of the object and the leftmost portion of the content
//currently visible in the window.


mosY = event.clientY + document.body.scrollTop;

//clientY Property Sets or retrieves the y-coordinate of the mouse
//pointer's position relative to the client area of the window,
//excluding window decorations and scroll bars.
//scrollTop Property Sets or retrieves the distance between the top
//of the object and the topmost portion of the content currently
//visible in the window.


document.title = "(X Co-Ordinate » "+ mosX +") ( "+"Y Co-ordinate » " +mosY+")";
document.getElementById('dx').innerHTML = "Mouse X ==» "+mosX+"<br>"+"Mouse Y ==» "+mosY;


return true
}
//-->
</script>
<div id="dX"></div>
</body>
</html>



Tuesday, June 19, 2007

C# Regular Expressions

some simple regexes for simple string processing

get filename from url (full filename)
([^\\\\]*$)

get extension from url (full filename)
(?<=\\.)([^\\\\]*$)



Thursday, June 7, 2007

Parsing XML String To XML Using JavaScript

This Program Convert The XML String To XML
<html>
<body>
<script type="text/javascript">
var x;var xmlObj
var t="<NewDataSet>"
t+="<TestDTag>"
t+="<TestDate>06/07/2007</TestDate>"
t+="</TestDTag>"
t+="<TestDTag>"
t+="<TestDate>06/06/2007</TestDate>"
t+="</TestDTag>"
t+="<TestDTag>"
t+="<TestDate>06/05/2007</TestDate>"
t+="</TestDTag>"
t+="<TestDTag>"
t+="<TestDate>06/04/2007</TestDate>"
t+="</TestDTag>"
t+="<TestDTag>"
t+="<TestDate>06/03/2007</TestDate>"
t+="</TestDTag>"
t+="</NewDataSet>";
if (window.ActiveXObject)
{
xmlObj=new ActiveXObject("Microsoft.XMLDOM");
xmlObj.async="false";
xmlObj.loadXML(t);
}

if(xmlObj.documentElement != null)
{
var data = xmlObj.documentElement;
var Adate = xmlObj.documentElement.getElementsByTagName('TestDate');
for (i=0;i<=Adate.length-1;i++)
{
document.write(i+"th ChildElement -->"+data.childNodes[i].childNodes[0].nodeTypedValue+"<br>");
}
}
</script>
</body>
</html>


IE Supported



Monday, May 21, 2007

Restrict User From Ctrl Key Press

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Restrict Ctrl Key Press</title>
<script>
function Restrict()
{
if((window.event.keyCode ==17))
{
alert("Ctrl Key Press In !"+'\r\n'+ "Add Your Own Code Here"); // Add Your Code Here

}
}
</script>
</head>
<body onload="JavaScript:document.body.focus();" onkeydown="Restrict()">
</body>
</html>


(IE Supported)



Saturday, May 19, 2007

JavaScript Get Key Values Or Code On KeyDown

Script
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Find KeyCode</title>
<script language="JavaScript">
function TriggeredKey(e)
{
var keycode;
if (window.event) keycode = window.event.keyCode;
alert("keycode: " + keycode);
}
</script>
</head>
<body onkeydown="TriggeredKey(this)">
</body>
</html>




(IE Supported)


Special Keyboard Key(s) Code

KeyCode
Backspace      8
Tab           9
Enter        13
Shift        16
Ctrl         17
Alt          18
Pause/Break   19
Caps Lock     20
Esc          27
Page Up      33
Page Down     34
End          35
Home         36
Left Arrow    37
Print Screen 44
Delete       46
F1           112
F2           113
F3           114
F4           115
F5           116
F6           117
F7           118
F8           119
F9           120
F10          121
F11          122
F12          123


Google Page Creator

Want to create an online photo tour of your vacation or to share the memorable moments with Your Fiends,Peers and others.....

If you Have Gmail Acount It's Enough Get,Set,Go.................

             Google testing a new product that makes creating your own web pages as easy as creating a document in  a word processor. Google Page Creator is a free tool that lets you create web pages right in your browser and publish them to the web with one click. There's no software to download and no web designer to hire. The pages you create are hosted on Google servers and are available at http://yoursitename.googlepages.com for the world to see.

Courtesy
Courtesy Google


Tuesday, May 15, 2007

Hold Back Or Retain Scroll Bar Postion After PostBack Or Roundtrip

Page Directive

<%Page smartNavigation="True" %>

Global setting

<configuration>
        <system.web>
                 <pages smartNavigation="true"/>
       </system.web>
</configuration>


SmartNavigation Property available only in .NET 1.1,In ASP.NET version 2.0, the SmartNavigation property is deprecated.Use the SetFocus method and the MaintainScrollPositionOnPostback property instead.

Note Regarding SmartNavigation

  1. Eliminating the Flicker caused by navigation Or Postback.
  2. Persisting the scroll position when moving from page to page.
  3. Persisting element focus between navigations.


Delete File If Exists Else Create

This Porgarm will delete a file with name Test.txt if exists in the Root Dir, else create a new file with name Test.txt with in the Root dir.FileInfo and File both the classes are available in System.IO namespace.

FileInfo Class
Provides instance methods for the creation, copying, deletion, moving, and opening of files, and aids in the creation of FileStream objects. This class cannot be inherited.

File Class
Provides static methods for the creation, copying, deletion, moving, and opening of files, and aids in the creation of FileStream objects.



Program

protected void btCreate_Click(object sender, EventArgs e)
{
try
{
FileInfo TheFile = new FileInfo(MapPath(".") + "\\" + "Test.txt");
if (TheFile.Exists)
{
File.Delete(MapPath(".") + "\\" + "Test.txt");
}
else
{
File.Create(Server.MapPath(".") + "\\" + "Test.txt");
}
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}


Saturday, May 12, 2007

CSS Compressor



CSS Compressor

    Use this utility to compress your CSS to increase

loading speed and save on bandwidth as well. You can

choose from three levels of compression, depending on

how legible you want the compressed CSS to be versus

degree of compression.The "Normal" mode should work

well in most cases, creating a good balance between

the two.


Try Google Suggest And Feel The Difference



Try Google Suggest And Feel The Difference



Wednesday, May 9, 2007

Palindrome

private void btCheck_Click(object sender, System.EventArgs e)
{
char[] Temp = TextBox1.Text.ToCharArray();
Array.Reverse(Temp);
string str = new String(Temp);
if(str == TextBox1.Text)
{
Response.Write(@"<script>alert('Palindrome')</script>");
}
else
{
Response.Write(@"<script>alert('!Palindrome')</script>");
}
}



Wednesday, May 2, 2007

Silverlight

 Microsoft Silverlight is a cross-browser, cross-platform plug-in for delivering the next generation of .NET-based media experiences and rich interactive applications for the Web. Silverlight offers a flexible and consistent programming model that supports AJAX, Python, Ruby, and .NET languages such as Visual Basic and C#, and integrates with existing Web applications. Silverlight media capabilities include fast, cost-effective delivery of high-quality audio and video to all major browsers including Firefox, Safari, and Internet Explorer running on Mac or Windows. By using Expression Studio and Visual Studio, designers and developers can collaborate more effectively using the skills they have today to light up the Web of tomorrow.
For More Info

Microsoft® Silverlight™ 1.0 Beta Software Development Kit (SDK)  

Microsoft® Silverlight™ 1.1 Alpha Software Development Kit (SDK) 
 


Microsoft® Silverlight™ 1.1 Alpha Developer Reference Poster






Tuesday, May 1, 2007

Displaying Current Framework Version

private void Page_Load(object sender, System.EventArgs e)
{


if
(!IsPostBack)

{

Version FmVer = Environment.Version;

Response.Write("Version "+FmVer.ToString());

}

}



Sunday, April 29, 2007

Microsoft Pre-Release Software Microsoft .NET Framework 3.5 – Beta 1 Realeased on 4/27/2007

Overview
               The Microsoft .NET Framework 3.5 Beta 1 is a preview release of the latest version of the .NET Framework. Many ISV’s, enterprises and Microsoft product teams are successfully building on the new features Windows Workflow Foundation (WF), Windows Communication Foundation (WCF), Windows Presentation Foundation (WPF) and Windows CardSpace in the .NET Framework 3.0. Microsoft plans to continue to invest in the .NET Framework developer platform and in support of existing users the .NET Framework 3.5 has a minimal number of breaking changes. So that existing applications built for .NET Framework 2.0 or .NET Framework 3.0 should continue to run without requiring changes. The .NET Framework 3.5 adds new features in several major technology areas;

including:
  • Deep integration of Language Integrated Query (LINQ) and data awareness
  • ASP.NET AJAX for quickly creating more efficient, more interactive and highly-personalized Web experiences that work across all the most popular browsers
  • New web protocol support for building WCF services including AJAX, JSON, REST, POX, RSS, ATOM and several new WS-* standards
  • Full tooling support for WF, WCF and WPF including the new workflow-enabled services technology
  • New classes in the base class library (BCL) for the .NET Framework 3.5 address the most common customer requests.
For more detail






Creative Commons License
Disclaimers:We have tried hard to provide accurate information, as a user, you agree that you bear sole responsibility for your own decisions to use any programs, documents, source code, tips, articles or any other information provided on this Blog.