Skip to main content

Posts

Showing posts from November, 2011

Total output in the GridView footer row

Total output in the GridView footer row //Global Declaration  Dim units22 as Integer=0 Dim units2 as Integer=0 //Grid Events Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound         If e.Row.RowType = DataControlRowType.DataRow Then             units22 = Convert.ToInt32(DataBinder.Eval(e.Row.DataItem, "Branches")) //Coloumn name             units2 = units22 + units2         End If         If e.Row.RowType = DataControlRowType.Footer Then             e.Row.Cells(6).Text = "Total"             e.Row.Cells(7).Text = units2.ToString().Trim()             e.Row.Font.Bold = True         End If     End Sub Output:

Key features Of Microsoft Visual Studio 2010 and .NET 4.0

Key features Of Microsoft Visual Studio 2010 and .NET 4.0 Microsoft announced the next version of its developer platform, which will be named Visual Studio 2010 and .NET Framework 4.0.  Microsoft said VS10 will focus on five key areas (in marketing-speak): riding the next-generation platform wave, inspiring developer delight, powering breakthrough departmental applications, enabling emerging trends such as cloud computing, and democratizing application life-cycle management (ALM). “With Visual Studio 2010 and the .NET Framework 4.0, we are focused on the core pillars of developer experience, support for the latest platforms spanning client, server, services and devices, targeted experiences for specific application types, and core architecture improvements,” said S. Somasegar, senior vice president of the Developer Division at Microsoft.  “These pillars are designed specifically to meet the needs of developers, the teams that drive the application life cyc

C# Features in the .NET Framework 4

C# Features in the .NET Framework 4 Since its initial release in 2002, the C# programming language has been improved to enable programmers to write clearer, more maintainable code. The enhancements have come from the addition of features such as generic types, nullable value types, lambda expressions, iterator methods, partial classes and a long list of other useful language constructs. And, often, the changes were accompanied by giving the Microsoft .NET Framework libraries corresponding support. This trend toward increased usability continues in C# 4.0. The additions make common tasks involving generic types, legacy interop and working with dynamic object models much simpler. This article aims to give a high-level survey of these new features. I’ll begin with generic variance and then look at the legacy and dynamic interop features. Covariance and Contravariance Covariance and contravariance are best introduced with an example, and the best is in the framewor

ASP.NET Page Life Cycle Overview

ASP.NET Page Life Cycle Overview       When an ASP.NET page runs, the page goes through a life cycle in which it performs a series of processing steps. These include initialization, instantiating controls, restoring and maintaining state, running event handler code, and rendering. It is important for you to understand the page life cycle so that you can write code at the appropriate life-cycle stage for the effect you intend. If you develop custom controls, you must be familiar with the page life cycle in order to correctly initialize controls, populate control properties with view-state data, and run control behavior code. The life cycle of a control is based on the page life cycle, and the page raises many of the events that you need to handle in a custom control. This topic contains the following sections: General Page Life-cycle Stages Life-cycle Events Additional Page Life Cycle Considerations Catch-Up Events for Added Controls Data Binding

Display Confirmation Message on GridView Deleting

Display Confirmation Message on GridView Deleting This demo describes the different approach to display a confirmation message when deleting a row in GridView and pass the id of the item to the confirmation message. Confirmation means a user is asked first if he/she wanted to delete a record by choosing an option (OK and CANCEL). In this demo, we use the JavaScript confirm function for displaying the confirmation message. Now let’s create our JavaScript confirm function. To do this switch to ASPX source and add the following code block within the <head> tag like: < head runat ="server">     < title > GridView Data Manipulation </ title >     < script type ="text/javascript" language ="javascript">         function ConfirmOnDelete(item)         {           if (confirm( "Are you sure to delete: " + item + "?" )== true )             return true ;           e