View State
|
Session State
|
It is maintained in page level
only
|
It is maintained in session level
|
View state of one page is not
visible in another page
|
It is visible in all pages with in
session
|
It’s information stored in client
only
|
It’s information stored in server
|
It persist the value of particular
page in the client browser when the post back operation is occur.
|
It persist the data of user in the
server and data is available till the user close the browser.
|
It is used to persist
page-instance-specific data.
|
It is used to persist the
user-specific data.
|
Wednesday, July 27, 2016
Difference between the view State and session state in Asp.Net
Saturday, July 23, 2016
What is the stored procedure?
Stored
procedure are the group of SQL statement which run all the SQL statement in a
single unit it is precompiled object if we call to stored procedure then there
is no need to compile again.
Example of
the stored procedure is given below:
Firstly we
create a table with the name emp
Then
create stored procedure:
create
procedure abc(@id int, @nm varchar(20),@s1 int)
as
insert
into emp values(@id, @nm, @s1)
return
After execute the above code we insert data into table by using the following syntax
exec
abc 6,'Abi',22000
Output:
Thursday, July 21, 2016
Magic table in SQL Server
There are two types of Magic table in SQL Server:
Inserted
Deleted
Inserting into table (Inserted table):
When we insert anything in base table in database, a table is automatically created by the SQL server, it is called inserted, and this table contains current updated or inserted record. We can access the record of this table via triggers.
Updating Table (inserted or deleted table):
When we delete anything in base table in database, in spite of one, two tables are created one is called INSERTED and another is called DELETED. Deleted table contain current record after the deletion operation and Inserted table contain previous record .We can access via triggers.
Deleting (Deleted Table):
When we deleted anything in base table in Database, a table is created by SQL Server called deleted table, this table contain current updated record after deletion operation. We can access this record via triggers.
Inserted
Deleted
Inserting into table (Inserted table):
When we insert anything in base table in database, a table is automatically created by the SQL server, it is called inserted, and this table contains current updated or inserted record. We can access the record of this table via triggers.
Updating Table (inserted or deleted table):
When we delete anything in base table in database, in spite of one, two tables are created one is called INSERTED and another is called DELETED. Deleted table contain current record after the deletion operation and Inserted table contain previous record .We can access via triggers.
Deleting (Deleted Table):
When we deleted anything in base table in Database, a table is created by SQL Server called deleted table, this table contain current updated record after deletion operation. We can access this record via triggers.
Author : Sachin Pathak
Tuesday, July 12, 2016
dot net and Sql interview questions for experienced
After clearing telephonic interview, I was went "India
Bulls" for face to face technical round, here I write some questions which is
asked there
Telephonic interview question of India Bulls
Question 1 What is means of abstraction and encapsulation ? (Answer this question as real time scenario).
Question 2 What is difference between readonly and constant in c#, give an example in real time scenario or say where we need to use these in our project?
Question 3 What is Abstract class?
Question 4 does abstract class have constructor?
Question 5 can we create object of abstract class if yes or no then why?
Question 6 if no then why we define constructor in abstract class?
Question 7 it is necessary to declare abstract class all methods will be abstract ?
Question 8 it is necessary to declare abstract class all methods will be abstract ?
Question 8 Can we declare abstract methods in normal classes ?
Question 9 If yes then why we need of abstract class ?
Question 10 If yes then why we need of abstract class ?
Question 11 The given below snippet is correct or not ?
Question 12 What is difference between abstract class and Interface and give the real time example to using both of them ?
Question 13 What is output of given below snippet and why?
Question 14 What is output of given below snippet and why?
Output is:
Question 35 What is difference between DataSet and SqlDataReader and real time use of it and why dataset come after SqlDataReader ?
Question 36 What is difference between var and dynamic keyword in c# ?
Question 37 What is value type and reference type in c# if int is value type then please explain given below snippet
int a = new int();
where its value is stored (heap or stack and why)?
Question 38 What is enum in c#, when we use it?
Question 39 What is struct in c#?
Question 40 Explain given below snippet?
Telephonic interview question of India Bulls
Question 1 What is means of abstraction and encapsulation ? (Answer this question as real time scenario).
Question 2 What is difference between readonly and constant in c#, give an example in real time scenario or say where we need to use these in our project?
Question 3 What is Abstract class?
Question 4 does abstract class have constructor?
Question 5 can we create object of abstract class if yes or no then why?
Question 6 if no then why we define constructor in abstract class?
Question 7 it is necessary to declare abstract class all methods will be abstract ?
Question 8 it is necessary to declare abstract class all methods will be abstract ?
Question 8 Can we declare abstract methods in normal classes ?
Question 9 If yes then why we need of abstract class ?
Question 10 If yes then why we need of abstract class ?
Question 11 The given below snippet is correct or not ?
class
Test
{
public abstract
void meth1();
public virtual
void meth2();
}
|
Question 12 What is difference between abstract class and Interface and give the real time example to using both of them ?
Question 13 What is output of given below snippet and why?
using
System;
namespace
ConsoleApplication2
{
class
Program
{
static void Main(string[]
args)
{
Test2 obj =
new Test2();
Console.ReadKey();
}
}
class
Test1
{
static Test1()
{
Console.WriteLine("Test1");
}
}
class
Test2:Test1
{
static Test2()
{
Console.WriteLine("Test2");
}
}
}
|
Question 14 What is output of given below snippet and why?
using
System;
namespace
ConsoleApplication2
{
class
Program
{
static void Main(string[]
args)
{
Test2 obj =
new Test2();
Console.ReadKey();
}
}
class
Test1
{
public Test1()
{
Console.WriteLine("Test1");
}
}
class
Test2:Test1
{
public Test2()
{
Console.WriteLine("Test2");
}
}
}
|
Question 15 What is static class and real
time use of static class ?
Question 16 What is delegate and real time
working of delegate ?
Question 17 What id Dispose() and when we use
it?
Question 18 What is difference between
ViewState and hiddenfield ?
Question 19 What is Session and and what is
InProc and OutProc and when we use it and difference between them ?
Question 20 When we use cookie , given an
example when you need to use cookie?
Question 21 When we use cookie , given an
example when you need to use cookie?
Question 22 What is WCF and WebService?
Question 23 Can we return a table from SQL
function?
Question 24 What is view in sql?
Question 25 Can we perform insert , update
and delete operation using View in SQL?
Question 26 What is trigger , define step by
step how trigger executed and when we need to use of triggers in sql?
Question 27 What is magic table in sql?
Question 28 What is temporary table in sql ,
use of temporary table and difference between local and global temporary
tables?
Question 29 can we call stored procedure
inside function in sql?
Question 30 can we call function inside
stored procedure in sql?
Question 31 how many no of out parameter
declare in stored procedure?
Question 32 Write a query to output look
like?
Table is:
Column1 | Column2 |
A | 100 |
B | 200 |
C | 300 |
A | 200 |
B | 300 |
Output is:
Column1 | Column2 | Count |
A | 300 | 2 |
B | 500 | 3 |
C | 300 | 1 |
Question 33 Write a query of uncolored area
suppose two circle is two tables in sql?
Question 34 Write a query of uncolored area
suppose two circle is two tables in sql?
Table is:
Column1 |
2 |
3 |
4 |
1 |
5 |
Output is:
Column 2 | Cumulative Sum |
2 | 2 |
3 | 5 |
4 | 9 |
1 | 10 |
5 | 15 |
Question 35 What is difference between DataSet and SqlDataReader and real time use of it and why dataset come after SqlDataReader ?
Question 36 What is difference between var and dynamic keyword in c# ?
Question 37 What is value type and reference type in c# if int is value type then please explain given below snippet
int a = new int();
where its value is stored (heap or stack and why)?
Question 38 What is enum in c#, when we use it?
Question 39 What is struct in c#?
Question 40 Explain given below snippet?
private
void Test()
{
try
{
//execption occur
}
catch {
//here also execption , then what will be happen the exception is handled or not ? //because we want to insert some
value in sql table how can you handle it
}
finally
{
}
}
|
Subscribe to:
Posts (Atom)