Using this Code you can clear the browser cache.
You can also use it on LogOut of your site.
Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();
Using this Code you can clear the browser cache.
You can also use it on LogOut of your site.
Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();
Using this script you can get the name of current page.
<script language=”javascript”>
function getPageName() {
var URL = window.location.pathname;
var PageName = URL.substring(URL.lastIndexOf(‘/’) + 1);
//alert(PageName);
return PageName;
}
</script>
MS SQL Server Stores Detail in System table
SELECT name AS ObjectName,
OBJECT_NAME(schema_id) SchemaName,
OBJECT_NAME(parent_object_id) ParentObjectName, name, *
FROM sys.objects
WHERE type = ‘p’
Object type:
AF = Aggregate function (CLR)
C = CHECK constraint
D = DEFAULT (constraint or stand-alone)
F = FOREIGN KEY constraint
PK = PRIMARY KEY constraint
P = SQL stored procedure
PC = Assembly (CLR) stored procedure
FN = SQL scalar function
FS = Assembly (CLR) scalar function
FT = Assembly (CLR) table-valued function
R = Rule (old-style, stand-alone)
RF = Replication-filter-procedure
S = System base table
SN = Synonym
SQ = Service queue
TA = Assembly (CLR) DML trigger
TR = SQL DML trigger
IF = SQL inline table-valued function
TF = SQL table-valued-function
U = Table (user-defined)
UQ = UNIQUE constraint
V = View
X = Extended stored procedure
IT = Internal table
Write Query like this
Select MastCode ,UserName ,UPassword from TblUserMaster where UserName=’admin’ COLLATE SQL_Latin1_General_CP1_CS_AS
Declare @tbl as nvarchar(max)
DECLARE @cmd AS NVARCHAR(max)
set @tbl=’TblItemMaster’
SET @cmd = N’SELECT * FROM ‘ + @tbl +’ Where MastCode = 1′
EXEC sp_executesql @cmd
Page.ClientScript.RegisterStartupScript(this.GetType(), “keyForScript”, “alert(‘This is Server side alert box!’)”, true);
ScriptManager.RegisterClientScriptBlock(this,this.GetType(), “key”, “alert(‘This is Server side alert box!’)”, true); //for update panel,have to include “using System.Web.UI;”
Enjoy javascript from Server side