DataGrid/Gridview to Excel file generation

I have often feel the need for developers to generate an Excel report requirement. Here is a small code snippet to produce the same.

C# Code

string path = Path.GetTempFileName();
StreamWriter writer = new StreamWriter(path);
HtmlTextWriter htmlWriter = new HtmlTextWriter(writer);
Response.ContentType = “application/x-msexcel”;

DataGrid grid = new DataGrid();
grid.DataSource = data; //data to be written in the excel file



Hope it helps.

Tagged with: , ,
Posted in ASP .NET

Introduction to Requirements Planning and Management

Requirements planning and management is key to business analyst. It plays a vital role in determining the project’s success. They should be structured and executed in proper format to avoid any inconsistency during project execution. As a business analyst, planning and managing requirements allows you to monitor and react to requirement challenges, capture changes correctly and consistently, and ensure that the necessary tools and resources are available for requirement activities.

Requirements planning and management consists of defining planning tasks and activities, and outlining the resources needed for these tasks and activities. The main inputs to requirement and planning management flow from the enterprise analysis stage, when business opportunities are identified and solution defined. The inputs to requirement and planning management are

  • the business environment analysis : defines the current business environment.
  • the enterprise requirements scope : defines the scope of the business problem to be solved.
  • the feasibility assessment  : identifies each of the solution options and map to the requirements.

The key outputs from the requirement and planning management are a list of project team members and their roles, a list of stakeholders and their relationship to project, a list of requirement gathering tasks and division of work, and list of tools used to gather and communicate requirements.

For a business analyst, tasks involved in requirements and planning may be stated as follows

  • identify team roles
  • if more than one business analyst, then divide the works
  • how to deal with requirement risk
  • planning considerations
  • select requirement activities
  • estimate requirement activities
  • manage requirement scope
  • measure and reporting
  • manage requirements change
Tagged with: ,
Posted in Requirements Gathering

Object-Oriented Analysis And Design (OOAD)


OOAD focuses on analyzing the requirement and designing the model of the system before the coding starts. OOAD is done to ensure the purpose and requirement of the system is captured and documented before the system is built. OOAD consists of two phases.

  1. Object-oriented Analysis (OOA)
  2. Object-oriented Design (OOD)


Object-oriented Analysis (OOA) Object-oriented Design (OOD)
creating a model of a system based on what the user requires of the system adds detail and design to the model
takes a “black box” approach to the system, ignoring the inner working takes a “white box” approach and makes the decision on how the model will be implemented in the code
model is made in user’s perspective design takes place in developer’s perspective
abstracting from the problem domain. primary classes and objects are identified. new classes are added to provide mechanisms that enable the system to work
implementation environment is not considered implementation environment is considered
Tagged with: , , ,
Posted in Object Oriented Programming, Unified Modeling Language

What is CLR, CTS, CLS in .NET?


Common Language Runtime (CLR)

One of the most important component of .NET framework is CLR, also known as runtime. It provides functionalities like

  1. Memory Management
  2. Exception handling
  3. Debugging
  4. Code Access Security (CAS)
  5. Thread Execution
  6. Compilation

The runtime manages the execution of code. It also enables you to develop application in the language of your choice, such as C#, Visual Basic and Visual C++. You can also refer the class library and other components that are written in different languages supported by .NET framework.

Common Type System (CTS)

The CTS specifies certain guidelines for declaring, using, and managing types at runtime. The functions performed by the CTS are as follows:

  1. Cross-language communication, type safety, and high performance execution of code.
  2. Object-oriented model for implementation of different programming languages.
  3. Guidelines for different languages to follow, ensuring proper interaction between objects implemented in different programming languages.

The CTS can be classified as Value and Reference types.

Common Language Specification (CLS)

The CLS consists of a set of basic language features that are required by many applications to communicate with other objects, irrespective of the language in which they are implemented. The CLS rules define a subset of the common type system. These objects must expose only those features that are common to all the languages they need to interact with. The components which adhere to these features are said to be CLS compliant components. In simple words it facilitates cross-language interoperability.

Tagged with: , ,
Posted in Microsoft .NET

Architecture of .NET Framework 3.5

Microsoft .NET Framework 2.0 and 3.0, along with their service packs, form the foundation of .NET framework 3.5.


As shown in figure, .NET Framework consists of the CLR, .NET framework Base Class Library, Windows Forms, ASP .NET, Console, ActiveX Data Objects for .NET (ADO .NET), .NET Framework Class Library, Common Language Specification (CLS), Common Type System (CTS) and .NET languages, such as C#, Visual Basic. Similarly, .NET Framework 3.0 comprises Windows Workflow Foundation (WWF), Windows Presentation Foundation (WPF), Windows Communication Foundation (WCF) and Windows CardSpace. Finally, .NET Framework 3.5 has few enhancements, such as Linear Integrated Query (LINQ), ADO .NET Entity Framework and Data Services, ASP .NET AJAX, and new compilers for C#, visual Basic and C++.

I will be discussing each component in detail in my next blog.

Tagged with: , ,
Posted in Microsoft .NET

HTC And Tata Docomo Launches HTC 7 Mozart in India


HTC and Tata Docomo finally launched the Windows Phone 7 powered HTC 7 Mozart smartphone in India. This is the second Windows Phone 7 smartphone launched in India, after the HTC HD7 smartphone. If you are planning to check out the Microsoft’s latest mobile OS, they you should consider buying HTC 7 Mozart. It is priced For Rs.26,490.

“The HTC 7 Mozart is a great piece of craftsmanship with some of the most advanced features and perfectly underlines HTC’s focus on raising the bar in mobile phone innovation and design. With its stunning looks, great features and the new Windows Phone 7 experience, we are positive that the HTC 7 Mozart will be a great success in India, and are extremely happy to partner Tata DOCOMO in bringing the phone here,” said Ajay Sharma, Country Head, HTC India.

“When we launched brand Tata Docomo last year, we had promised our subscribers that we would bring to them the best products and services, that will be innovative and pioneering and which would offer convenience and simplicity. Living up to that promise, we are launching the HTC 7 Mozart with the new Windows Phone 7 loaded on. This device, powered by our world class 3G network will deliver a truly enriching experience for the consumer. We will continue working together with HTC to launch more innovative mobile offerings for Indian consumers,” said, Mr Sunil Tandon, Head of Mobility Services & Device Management, Tata Teleservices Limited.

The powerful HTC 7 Mozart features a 3.7 inch touchscreen display with 480 x 800 pixels resolution, 1 GHz processor, Windows Phone 7 OS, Wi-Fi, 3G Connectivity, Bluetooth 2.1 with EDR, 8 megapixel with auto focus and Xenon flash, HD (720p) video recording, 3.5 mm audio jack, 8 GB internal storage, 512 MB ROM, 576 MB RAM, 1300 mAh battery and more. You can visit HTC website here for complete specification and details.

Tagged with: , ,
Posted in Windows Phone 7

Windows Phone 7 and Facebook

Windows Phone 7 and Facebook

Windows Phone 7 getting deeper facebook integration. Check out the link below

Posted in Windows Phone 7
%d bloggers like this: