Error: WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for jQuery.

Some time we face this error while working in asp.net.:
WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for jQuery

Description:

Asp.Net: Create Error log table in SQL database in ASP.NET application using C#.

Asp.Net: Create Error log table in SQL database in ASP.NET application using C#.

SQL: Copy full data of one table to another using SQL command in SQL Database.

Introduction:

In this article I will explain how to copy full data of one table to another new table in SQL database. Some time we want to create a copy of table (with data), then we can achieve this by using Following SQL command.

Description:

Syntax:

Select * into New_Table_name from Source_table_name


In this query New_Table_name is ouput table or can say destination table, where want to copy data from Source_table_name Table.
We just give the name of the output table and new table will be generated with data.

SQL: How to Create table in SQL Database.?

We can create Table in database in two different ways. In this Article I will how to create Table in database (sql Server).

1.     Using  Sql command:

Open SQL server management studio and select Database name where you want to create table. Now write following sql command:

Syntax:

 CREATE TABLE table_name(
   column1 datatype,
   column2 datatype,
   column3 datatype,
   .....
   columnN datatype,
   PRIMARY KEY( one or more columns )
);

SQL: How to create Database in SQL server?

We can create database in two different ways. In this Article I will explain both method to create database.


1.     Using  SQL command:

Syntax:   Create database DataBase_Name
Example: Create database Test

When we execute this statement, database “Test” will be created. To use this database either select Database name like given below:

SQL: How to generate script of database in SQL Server?

In this Article I will explain how to generate script of Database in SQL server.



Follow Given Steps:

1.     Open SQL server management studio. Explore Object Explorer to locate database.
  Right click on the database folderàTaskàGenerate Script
ASp.NET: Increase session timeout or expiry time in web.config or Global.asax.

ASp.NET: Increase session timeout or expiry time in web.config or Global.asax.

Introduction:  

Here, I will explain how to set or increase session timeout or expiry time in webconfig file or in application.
By default session timeout is 20 minutes but sometimes it is required to increase or decrease the session timeout as per application requirement.
So we can set custom session timeout in webconfig or global.asax file in application.


Suppose we want to increase session timeout to 1 hour using webconfig file:

Then add following code in web.config file :
<configuration>
<system.web>
 <sessionState mode="InProc" timeout="60">
 </sessionState>
 </system.web>
</configuration>

OR
<configuration>
<system.web>
 <sessionState mode="InProc" cookieless="false"  timeout="60">
 </sessionState>
 </system.web>
</configuration>

In Global.asax : Set Session time out on Session_Start event:
void Session_Start(object sender, EventArgs e)
{
// Code will run when a new session is started
Session.Timeout = 15;

}
ASP.NET: Remove Session in asp.net using C# and VB.NET.

ASP.NET: Remove Session in asp.net using C# and VB.NET.

We know HTTP is stateless Protocol, it means a new instance of webpage class created each time the page post back. It can’t hold data on page. So to maintain data between different pages, we use Session. Session provides the facility to store information on server.

In this article I will explain how to remove sessions in ASP.NET.

Store Information in Session in C#:
//Storing UserName in Session
Session["SessionName "] = txtUser.Text;

In VB.Net
'Storing UserName in Session
Session("SessionName ")= txtUser.Text


Remove sessions in asp.net using C#:

To remove particular session.
//Remove Particular session
Session.Remove("SessionName");

or
Session["SessionName"] = null;

To remove all sessions created in Application:
//Remove all sessions
Session.RemoveAll();
or
 Session.Abandon();


Remove sessions in VB.NET:

To remove particular session :
'Remove Particular session

Session.Remove("SessionName ")
or
Session("SessionName ") = Nothing

To remove all sessions created in the application:
'Remove all sessions
Session.RemoveAll()
or
Session.Abandon()


ASP.NET: How to bind Repeater control using Stored Procedure?

Here, I will explain How to Bind repeater control in asp.net to display data using Stored Procedure. I will create stored proc in database and use it to get data from database.

Demo:

SQL Server: Explain User defined Functions in SQL Database.

User defined Function: 

User defined Function in SQL server is a set of statements or block of statements. SQL Server user-defined functions are routines that accept parameters, perform an action and return the result of that action as a value. UDF can be used to perform complex calculations.
Function can return two types or output i.e. Single value (scalar) or Table. We can’t modify data using functions, i.e. insert, update and delete.
Two types of user defined functions are there in SQL server:
1.      Scalar valued user defined Functions
2.      Table value User defined  Functions

SQL Server : Explain System defined Functions in SQL database.

SQL Server : Explain System defined Functions in SQL database.

System Defined Functions:  These are the inbuilt functions in SQL server.  Thses functions are provided by sql sever for different purposes. Ex. Date functions and functions to get max value etc.

Description:


There are two type of system defined function:

SQL Server: Functions in SQL Database and their Types.

Functions in SQL server:
Function in SQL server is a set of statements or block of statements. Function is a database object that accepts zero or more parameters and return Output. Function can return two types or output i.e. Single value (scalar) or Table. We can’t modify data using functions, i.e. insert, update and delete.
Functions are different from stored procedures. Functions must return a value, but stored proc may or may not return a value.  For More difference between Stored Proc and Functions, Read the article:

Type of Functions:
A.      System Defined Functions
B.      User defined functions

Kategori

Kategori