Web applications are stateless, means once a web page is rendered from server to client, nothing in the page remains on server and the next time user submits the page, the page will be called and created from scratch. ASP.NET provides following solutions to solve this problem: 1- Viewstate 2- Session Variables 3- Application Variables 4- Cache 5- Cookies Now… Read more →
Month: September 2014
Cookieless Session ASP.NET
Cookie–>Cookies are usually small text files, given ID tags that are stored on user computer’s browser directory or program data subfolders. Cookies are created when use your browser to visit a website that uses cookies to keep track of movements within the site. The website stores a corresponding file(with same ID tag)to the one they set in browser and in… Read more →
Recursive Queries Using Common Table Expressions
A common table expression (CTE) provides the significant advantage of being able to reference itself, thereby creating a recursive CTE. A recursive CTE is one in which an initial CTE is repeatedly executed to return subsets of data until the complete result set is obtained. A query is referred to as a recursive query when it references a recursive CTE.… Read more →
How to call Usercontrol in Asp.Net or Js file
Ascx Page(User control page)—– <%@ Control Language=”C#” AutoEventWireup=”true” CodeBehind=”WebUserControl1.ascx.cs” Inherits=”WebApplication2.UControls.WebUserControl1″ %> <asp:TextBox ID=”txt1″ runat=”server”></asp:TextBox> Asp.net Page— <%@ Page Language=”C#” MasterPageFile=”~/Site.master” CodeBehind=”Default.aspx.cs” Inherits=”WebApplication2._Default” %> <%@ Register Src=”~/UControls/UserControlMultipleInstance.ascx” TagName=”UserControlMultipleInstance” TagPrefix=”uc1″%> <%@ Register Src=”~/UControls/WebUserControl1.ascx” TagName=”uio” TagPrefix=”kl” %> <asp:Content ID=”headContent” ContentPlaceHolderID=”head” Runat=”Server”> </asp:Content> <asp:Content ID=”Content1″ ContentPlaceHolderID=”ContentPlaceHolder1″ Runat=”Server”> <script type=”text/javascript” src=”~/Scripts/JavaScript1.js”></script> <asp:ScriptManagerProxy ID=”ScriptManagerProxy1″ runat=”server” /> <h2>My tables</h2> <div id=”div1″> <kl:uio ID=”UserControlMultipleInstance1″ runat=”server” /> </div> <br… Read more →
Change WAMP server Port Set MySql Password
Set port after wampmanager.tpl http://localhost:portnumber like Type: item; Caption: “${w_localhost}”; Action: run; FileName: “${c_navigator}”; Parameters: “http://localhost:90/”; Glyph: 5 Change port number in C:wampbinapacheapache2.4.9confhttpd.conf Change Password phpmyadmin C:wampappsphpmyadmin4.1.14config.inc.php Change Local to lan or wan network Change httpd.conf file line no 280 #Require local to Require all granted <Directory “c:/wamp/www/”> # onlineoffline tag – don’t remove #Require local Require all granted </Directory> Read more →
ScriptManager Role in Ajax
The controls that UpdatePanel and ScriptManager are used for the ASP.NET AJAX Enabled sites. We use them; firstly, because in traditional webpages the entire page is loaded after a postback, the HTML sent to the browser is much larger than it needs to be. Second, because the entire page is replaced, the browser has to dismiss the old one and… Read more →
Set control id unchange at development time and client site
ClientIDMode is comes with framework 4 or latter. it prevent control renaming functionality in asp.net. Read more →
Updated sql questions
Difference between @@IDENTITY, SCOPE_IDENTITY, IDENT_CURRENT In most of our application scenario, we need to get latest inserted row information through SQL query. And for that, we have multiple options like: @@IDENTITY SCOPE_IDENTITY IDENT_CURRENT All three functions return last-generated identity values. However, the scope and session on which last is defined in each of these functions differ. Compare @@IDENTITY It returns… Read more →
Memory management in .Net
main concern for any application whether application is window based or web based. In .Net, CLR has garbage collector that executes as a part of our program and responsible for reclaiming the memory of no longer used objects. Garbage collector free the memory for objects that are no longer referenced and keeps the memory for future allocations. Advantage of Garbage… Read more →
WCF
Core WCF Assemblies System.Runtime.Serialization.dll System.ServiceModel.dll Core WCF Namespace System.Runtime.Serialization System.ServiceModel System.ServiceModel.Configuration System.ServiceModel.Description System.ServiceModel.MsmqIntegration System.ServiceModel.Security WCF Hosting(Assembly involve in WCF) Read more →