Posts

Showing posts from May, 2013

Pie chart using ASP.NET with AJAX Library

Step 1:  Download latest  AjaxToolKit from  here  . (Please download with compatible version of .net 3.5/4/4.5) Step 2:      Add library to reference for solution. Step 3:     Default.aspx page code:   <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <html xmlns=" http://www.w3.org/1999/xhtml "> <head runat="server">     <title></title> </head> <body>     <form id="form1" runat="server">           <cc1:ToolkitScriptManager ID="scriptmanager1" runat ="server"></cc1:ToolkitScriptManager>         <asp:DropDownList ID="ddlCountries" runat="server" OnSelectedIndexChanged="ddlCountries_SelectedIndexChanged"

Session Management Techniques in ASP.Net

Image
Session are the server side method of managing the state of an application i.e. all the web applications' state related info will be stored on server side if we use this technique. The advantages of using Session State are Better security Reduced bandwidth The disadvantages of using Session state are More resource consumption of server. Extra code/care if a Web form is used Using Session State ASP.NET allows us to save values using Session state. It is a global storage mechanism that is accessible from all pages in the Web application. Session state is stored in the Session key/value dictionary . This information will be user specific i.e. for each user separate dictionary will be created and no one can access other session information. below is the Example usage of sessions. global.asax void Session_Start( object sender, EventArgs e) {     // Code that runs when a new session is started     Session[ " number" ] = 0 ; } // Web forms Session[ " nu

Select gridview row using Javascript

Image
I want to select particular row of gridview with using UpdatePanel or postback For that I prefer javascript , Javascript Code :      <script type="text/javascript">       /*Script For Highlighting particlar row */         function HighlightRow(chkB) {             var IsChecked = chkB.checked;             if (IsChecked) {                 chkB.parentElement.parentElement.style.backgroundColor = '#F5D0A9';                 chkB.parentElement.parentElement.style.color = 'white';                 // chkB.parentElement.cell[7].disabled = true;                 //  document.getElementbyID('ddlGridSubDepartment').disabled = '';                 chkB.removeattr             } else {                 chkB.parentElement.parentElement.style.backgroundColor = 'white';                 chkB.parentElement.parentElement.style.color = 'black';             }         }     /*Script For selecting all rows */     function

Private assembly and a shared assembly

Introduction I have seen many people posting the questions about what is shared assemblly, What is private assembly, so I thought of bringing it in the articles section so that everyone could be benefitted from it. This article explains a mcuh needed introduction to new comers in .Net ASSEMBLIES Assemblies are basically the compiled code in .Net which contains the code in Microsoft Intermediate Langauge and one more thing that assembiles do for us as compared to dlls is they can maintain versioning with the help of the manifest. You dont need to register the assemblies after compiling like we needed in dlls. you can put the assemblies in the bin folder and refer the namespaces from there. In short find the assembly description as : Assemblies are the building blocks of .NET Framework applications; they form the fundamental unit of deployment, version control, reuse, activation scoping, and security permissions. An assembly is a collection of types and resources that are built to work