Wednesday, 27 May 2015

javascript == and === difference

1. === operater
=== means value must be equal and type as well
Ex:
var value1=1;
var value2='1';

if(value1===value2) /// this will return false because this value type is different(javascript will do internal type casting even though if we use === it will follow the strict rules),

and

if(0===false) // this will return false because different data type


2.== operator

== means value must be equal,

Ex:
var value1=1;
var value2='1';
if(value1==value2) /// this will return true because (==) will check only value(javascript handle type conversion).

and
if(0==false) // this will return true because false is equal to 0

Monday, 11 May 2015

Best 100+ Frequently Asked Interview Questions in .Net SQL

refer this link

http://www.webblogsforyou.com/100-frequently-asked-interview-questions-on-asp-net-sql-server-oop-concepts/

Thursday, 30 April 2015

cannot open backup device operating system error 5(access is denied.)

possible reason for this errors are,

1. there is no directory with the name
ex, if u r mention path as 'D:\test\abc.bak' may be this directory wont be there or not access for your credentials.
2.second possible is, u wont be having enough space in the disk to save the data.
3.you may not having enough permission/rights in logs drive
ex, if your mention a folder name, for that folder u might not having write permission, something like that.

how to take database backup using sql query

in query window use this syntex:

backup datsbase databasename to disk='location to store'


Example:

backup database sureshdatabase in disk = 'D:\sureshDBBackup\sureshdatabase.bak'

after forming this query execute.




Friday, 17 April 2015

assign null value to enum in c#

You can use the "?" operator for a enum nullable type.

Ex:
public enumname? objenum = null;

or else u can create one more enum as none then use it.

Friday, 27 March 2015

[SOLVED] how to know if page is refreshed in javascript

add this to the need to check is closed or refreshed !!


<script type="text/javascript">

window.onunload = function (e) {
// Firefox || IE
e = e || window.event;
var y = e.pageY || e.clientY;
if (y < 0) {
alert("close");
}
else {
alert("refresh");
}
}

</script>