Monday, December 17, 2012
NameValueCollection In C#.NET
Description:
1. It’s a data structure that store data in Key(String) and Value(string) format.
2. It allows user to store multiple(duplicate) values for the same Key.
3. You can access data either via Key or via index.
4. It’s very similar to HashTable that also allow you to store data in Key and Value format.
5. When you add a value in the NameValueCollection , Its size grows automatically by relocation.
6. This class is situated in System.Collections.Specialized namespace.
7. Its performance is very poor than any other data structure like List, Dictionary or Hash Table so you must be very careful while choosing this data structure unless you tested it for performance.
Saturday, December 15, 2012
Display Image Gallery Using Repeater In ASP.NET
Procedure:
1. Drag and Drop a repeater from toolbar in your asp.net web page.
2. Design the layout in the <Item Template></Item Template> section as per requirement or simply paste this code.
<asp:Repeater ID="Repeater1" runat="server">
<HeaderTemplate>
<h2>
Product Category List</h2>
Swap Value In A Table Column
Example: Suppose you have a Product table as below. And you have to swap the active field values i.e. True must be False and False must be True.
Thursday, December 06, 2012
Tuesday, November 27, 2012
Difference between WCF and Web service
Web service is a part of WCF. WCF offers much more flexibility and portability to develop a service when comparing to web service. Still we are having more advantages over Web service. Following points provides detailed difference between them.
Web Service:
- Hosting -It can be hosted in IIS.
- Programming -[WebService] attribute has to be added to the class.
Features of WCF
Service Orientation
One consequence of using WS standards is that WCF enables you to create service oriented applications. Service-oriented architecture (SOA) is the reliance on Web services to send and receive data. The services have the general advantage of being loosely-coupled instead of hard-coded from one application to another. A loosely-coupled relationship implies that any client created on any platform can connect to any service as long as the essential contracts are met.
Important Sql Queries
Introduction: In this article i am going to give some of very useful SQL Queries that are required to us in our day to day programming life.
1. Get current Database Name: Select DB_NAME()
2. Get Details Of All Databases Present In SQL Server: Select * from sys.databases
3. Rename A Database: Exec sp_renamedb ‘oldDatabaseName’ , ‘newDatabaseName’
Dataset Vs DataReader
| Dataset | DataReader |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Thursday, November 22, 2012
Filter GridView Using tablesorter_filter plugin in ASP.NET
Introduction: Hey guys in the previous article i have explained how we can sort gridview and paginate gridview in asp.net at client side without making any postback to server using very small jQuery plugins for table sorting paging, filter. In this article i am going to explain how we can implement the filtering of records based on any column or group of columns either in a table or girdView. You can download each of these plugins by clicking here.
Wednesday, November 21, 2012
Gridview Paging With TableSorter Pager Plugin
Introduction: In the previous article i have illustrated how we can use table sorter plugin into ASP.NET GridView Control to sort records displayed in gridview at client side without consuming server resources..This article describes the implementation of Pager ad-on of the table sorter plugin with GridView in ASP.NET to display paged records at the client side. So without making any post back you would be able to display desired no of records in gridview. So this would be a great approach if your application is going to contains large chunk/amount of data that need to sort and display at client side.
Tuesday, November 20, 2012
Sort GridView Using Table Sorter At Client Side
Introduction:
First of all i would like to introduce you with the table sorter. It's an add-on that uses jQuery plugin to sort the table at client. Since we are sorting table at client side so no server resources is being consumed and no post back occurs and no load on server side for sorting the table. you can download this plugin from the following website www.tablesorter.com .Christian Bach is the author of this plugin which did a fantastic job.
Monday, November 19, 2012
Display Watermark Using jQuery For TextBox Controls
Procedure: Follow these steps.
1. Download the java script that i have created for jquery by clicking this link.
2. Pass the reference of this java script in the head section as follows.
<script src="../Scripts/WaterMark.min.js" type="text/javascript"></script>
Saturday, November 17, 2012
How to display an image gallery using Repeater in ASP.NET
Procedure:
1. Either create a new page or project.
2. Drag and drop a FileUploader and a Button control in your ASPX page.
3. To display a gallery put a Repeater control in the page.
4. In the <ItemTemplate > section of repeater put an image control to display images. Set height and width of this image control.
Thursday, November 15, 2012
Display Tooltip On Mouse Hover Using jQuery UI
Description: Its very simple and just follow these steps.
1. Add reference of jQuery1.9 UI in the aspx page or master page in between <Script> tag
2. Set Title attribute to those html controls for whom you want to show tooltip.
3. Add following method to display tooltip for all control in the html page in between <Script> tag.
$(function () {
$(document).tooltip();
})
This method will display tooltip for all the controls in html page whose title attribute is set.
$(function () {
$('#'txtName).tooltip();
})
However if you want to display tooltip only for selected controls then instead of (doument) you will have to use id (#'txtname') eg of that specific controls.
4. Run your page in the browser to see the effect.
Example:
Thursday, October 11, 2012
An Overview About Generics In C#.NET
The approach of generic programming has been started in 1983 by Ada programming language to reduce the duplication of code by writing a common set of methods and types that differ only by types or environment they are being used.
Introduction:
The term generic programming was originally coined by two guys named David Musser and Alexander Stepanov to describe an approach for software decomposition. In this approach fundamental requirements on types are abstracted from across concrete examples of algorithms and data structures.
So in general terms generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are instantiated when needed for specific types provided as parameters.
An Overview Of Dictionary In C#.NET
Dictionary in C# :
- Dictionary is a generic class that belongs to System.Collection namespace in .NET.
- The dictionary type in C# allow user to retrieve corresponding value very fast with key value.
- A dictionary can store Keys and Values of any data type in .NET.
- It provides a mapping from a set of keys to a set of values .
- Represented as Dictionary<TKey, TValue> pair where TKey represents Key and TValue represents the value associated with the key.
Tuesday, October 09, 2012
Optimization Of Stored Procedure In SQL Server
This article describes that how we can optimize the Stored Procedures so that we can get better performance while our application is talking to database. I am enlisting some of the points from my personal experience.
1) Always Use Fully Qualified Name For All Database Objects:
While working with stored procedure we need to pass name of database objects (table, view, function, other stored procedure(s) etc.) several times. I recommend every developer to use fully qualified object names instead of using only object name. There is a very strong reason behind this recommendation.
SQL server always has to find supplied database object name from sys object that took some millisecond of processing time and consumption of CPU resources. And if, we pass fully qualified name then that processing time and CPU resource consumption to search the object from sys objects get reduced to significant amount.
Another reason behind the scene is it helps SQL Server to directly finding the Complied Cache Plan if available instead of searching the objects in other possible schema. This process of searching and deciding a schema for a database object leads to COMPILE lock on stored procedure which decreases the performance of a stored procedure.
Wednesday, October 03, 2012
Overview Of List Type In C#.NET
List Class : List is a member of System.Collection namespace in .NET which is having lots of features.
Declaration: List is declared as follows.
List<int> list = new List<int>();
Description:
List type in C# resizes itself if required hence you don’t need to worry for size of List.
Used for Linear Collection which are not accessed by Keys.
Lists are considered generics and constructed types.
We must have to use <> (angle bracket) in the List declaration.
It provides many attributes and methods to work with List type; some of them are described with example below.
Monday, September 24, 2012
Xml manipulation in ASP.NET using C#
While working with Xml using C# ,yesterday i found it very simple. We can easily create, modify and delete nodes in Xml files. So its not a bif deal to work with it. So i simply give you an example od working with Xml file which is consumed by a web service and displaying records from Xml into a GridView in asp.net page. Following is the sample.
Friday, August 31, 2012
How to improve code performance using jQuery
Hi guys,
In this article i am enlisting some of the very important points which every developer need to consider while working with jQuery to enhance the performance of code . Examples would be generating very long tables with a lot of rows using AJAX to get JSON data. Or iterating through a long (very long) list of data, etc.
Thursday, August 30, 2012
How to improve performance of web application or portal
In this article i will explain some of the points that all developers must be familiar. Whenever we are planning to develop a web application or web portal we must know these point so that performance of our application is good. So following are the considerable points:--
- Turn off Tracing unless until required
Tracing is one of the wonderful features which enables us to track the application's trace and the sequences. However, again it is useful only for developers and you can set this to "false" unless you require to monitor the trace logging.
How to improve performance of Database Operations in application
Hello Guys.
Today I am going to explain some tips that I have realized to improve the performance of web application or portal in context of database operation. We all know that without any database no dynamic website/application or portal can function. So it’s very important for us to effectively work with database. Following are some of the points which we need to consider while designing and developing our application so that its performance is always better. And we wouldn’t have to worry after the application development that how to optimize this application as its performance is very poor with respect to others.
Thursday, August 16, 2012
Dynamic SQL Statement in SQL Server
Dynamic SQL:
A dynamic sql statement is a set of sql statements which are constructed at execution time.
We may have to face certain condition in our application development where we might have to retrieve records from different table based on different conditions then in that scenario we do use dynamic SQL.
These dynamic Sql statement doesn’t parsed at compile time so it may introduce security vulnerabilities in our databse so we should try to avoid using dynamic sql as much as possible.
There are two ways to execute a dynamic sql statement in sql server:-
sp_executesql
EXECUTE()
Although these two methods produces same results but there might be certain scenario where it may produce different results.
Following is little description about the above two methods:
1. sp_executesql :-
It is a system stored procedure.
It allows parameters to be passed IN or OUT of the dynamic sql statement.
It is less susceptible to SQL Injection.
Higher chance for sql string to remain in cache which results better performance when the same sql statement is executed.
Clean code hence easier to read and maintain.
Support parameter substitution hence more preferable than EXECUTE command.
Syntax:-
sp_executesql [@sqlstmt ],[ @ParameterDefinitionList],[ @ParameterValueList ]
2. EXECUTE():-
When we use this command the parameters should be converted to characters.
Syntax:-
EXECUTE (@sqlStmt)
Example:-
Create procedure sp_GetSalesHistory
(
@WhereClouse nvarchar(2000)=NULL,
@TotalRowsReturned INT OPUTPUT
)
AS
BEGIN
DECLARE @SelectStmt nvarchar(),
DECLARE @FullStmt nvarchar(),
DECLARE @ParameterList nvarchar()
SET @ ParameterList = ’@TotalRowsReturned INT OUTPUT ’
SET @ SelectStmt = ‘SELECT @ TotalRowsReturned = COUNT(*) FROM SalesHistory’
SET @ FullStmt = @ SelectStmt + ISNULL(@WhereClouse,’ ’)
PRINT @ FullStmt
EXECUTE sp_executesql @ FullStmt ,@ ParameterList ,@ TotalRowsReturned =@ TotalRowsReturned OUTPUT
END
What is a singleton in C#.NET?
A singleton is a design pattern used when only one instance of an object is created and shared; that is, it only allows one instance of itself to be created. Any attempt to create another instance simply returns a reference to the first one. Singleton classes are created by defining all class constructors as private. In addition, a private static member is created as the same type of the class, along with a public static member that returns an instance of the class. Here is a basic example:public class SingletonExample {private static SingletonExample _Instance;private SingletonExample () { }public static SingletonExample GetInstance() {if (_Instance == null) {_Instance = new SingletonExample ();}return _Instance;}}
Monday, August 06, 2012
Wednesday, August 01, 2012
Number To Word Conversion In C#
HI guys,
Today i am going to write a program that converts any no input into the system into Word. This program might be asked sometimes during the interview to check the Logic of candidate. so here is the program...
Tuesday, July 31, 2012
Numeric value validation on TextBox
Hi guys, In this post i m going to explain how to perform numeric value validation in a TextBox in ASP.NET. Here i will post two diff. mechanism by using Java Script and JQuery.
Indexers In C#.NET
Indexer In .NET
Indexers provide a natural syntax for accessing elements in a class or struct that encapsulate a list or dictionary of values. Indexers are similar to properties, but are accessed via an index argument rather than a property name. The string class has an indexer that lets you access each of its char values via an int index:
Google to down iGoogle
Internet search giant Google has announced that it would be shutting down its iGoogle personalized home page and a few other services. iGoogle, the search giant's personalized Web portal that was launched in 2005, will retire in November 2013. According to The Los Angeles Times, other services Google is winding down are Google Mini, the Symbian Search App, Google Talk Chatback, and Google Video.
Migrate From ASP.NET To MVC 3
Whenever a new technology or product comes onto the developer scene, people want to know how to best leverage their existing skills to work with it, and nobody wants to have to abandon existing knowledge. Making the move from Web Forms to MVC is no different. Despite the fact that Web Forms & MVC are very different ways of creating web applications on the ASP.NET platform, there are many skills and techniques to take with you.
ASP.NET MVC from Basics to Tips and Tricks
First of all MVC stands for Model-View-Controller.
Below some of the basic components are listed.
- Model = Data / State
- View = Responsible only for rendering the HTML output (.aspx page)
- Controller = Presentation Logic (class with action methods)
- HTTP operations are routed here
- Responsible for selecting the appropriate View
- Provides the View with the proper Model
Dual SIM TouchScreen Phone by Videocon at Rs.2800
Now a days you cannot predict technology stuff. Videocon is about to launch a new cell phone in the Indian market with several features at very low cost.
Features:
- Auto call recording
- Dual-LED torch
Thursday, July 26, 2012
Scaffolding Concept In ASP.NET
Scaffolding
Scaffolding, is a way to automatically generate Web pages for each table in the database. Scaffolding lets you create a functional Web site for viewing and editing data based on the schema of the data. You can easily customize scaffolding elements or create new ones to override the default behavior.
Wednesday, July 25, 2012
ASP.NET MVC 4.0
MVC Overview:
MVC Architecture has implemented by Trygve Reenskaug at 1979 for the first time. It was implemented on Smalltalk at Xerox labs. Then benefits and advantages of this architecture has been accepted by most of the coders and software engineers.It was an information about MVC’s history above. Now lets talk about what really MVC is. The word M stands for Model, V stands for View and C stands for Controller. I am going to mention about each item.
What's New In Visual Studio 2012
USER INTERFACE
The RC includes a series of improvements to the overall UX, which were based on the beta user feedback. Now you can customize the look and feel of Visual Studio development environment as per your convenience. A new Dark Theme has been developed for this purpose.
Performance
The performance has been enhanced drastically with respect to its entire earlier version. The performance between beta and RC was extensive and covers just about every aspect
Tuesday, July 24, 2012
OAuth Overview
OAuth can be defined as follows:
- OAuth is an open protocol that aims to standardize the way desktop and web applications access a user's private data. OAuth provides a mechanism for users to grant access to private data without sharing their private credentials (username/password). Many sites have started enabling APIs to use OAuth because of its security and standard set of libraries.
Flavors of Visual Studio 2012
- Visual Studio Express : For the Web is a free and robust development environment for building, testing, and deploying web applications across the Microsoft Web Platform. Visual Studio Express 2012 for Windows 8 provides the core tools that are required to build compelling, innovative Windows Metro style apps.
Monday, July 23, 2012
Entity Framework In ASP.NET
Entity Framework At-a-Glance
The Microsoft ADO.NET Entity Framework is an Object/Relational Mapping (ORM) framework that enables developers to work with relational data as domain-specific objects, eliminating the need for most of the data access plumbing code that developers usually need to write. Using the Entity Framework, developers issue queries using LINQ, then retrieve and manipulate data as strongly typed objects. The Entity Framework’s ORM implementation provides services like change tracking, identity resolution, lazy
Thursday, July 19, 2012
Social Networking Makes People Anxious: Study
Over 50% of polled participants report negative change in behaviour, attribute it to constant comparisons with online friends' achievements.
[caption id="" align="alignleft" width="200"]
A study carried out by the University of Salford on social networking sites reveals how services such as Facebook andTwitter can make users feel anxious and inadequate. Results from a poll conducted with 298 participants show that more than 50% have seen behaviour changes in themselves for the worse. Of the 53% participants who reported a change in their attitude, 51% found the impact to be negative.
The cause attributed by most people was that their confidence took a beating because they were constantly comparing their achievements with their friends online. Moreover, two-thirds of the pool found it hard to relax or sleep soundly after networking online, while one-fourth revealed that they had been left facing issues in their relationships or workplace after online face-offs. In an indication as to how addictive these services can be, 55% of people also said that they experienced discomfort when their Facebook or email accounts could not be accessed. What's worse, over 60% users needed to physically turn off their gadgets in order to take a break from networking online, since they were unable to ignore their beeping devices whenever somebody posted an update.
Wednesday, July 11, 2012
Review — Nokia Asha 302
MRP: Rs 7000
- 3.2 mp rear camera.
- Wi-Fi, Bluetooth, and 3G.
- A microSD card slot and 3.5 mm jack.
- 1320 mAh battery.
the Asha 302 offers a great deal. However, if you insist in opting for a poorly-built "smartphone" instead, there are a horde of Android handsets out there: the Micromax Ninja2 A56, Lava S12, and Karbonn A7.
Social Networking Makes People Anxious: Study
Over 50% of polled participants report negative change in behaviour, attribute it to constant comparisons with online friends' achievements.
- Social Networking
A study carried out by the University of Salford on social networking sites reveals how services such as Facebook andTwitter can make users feel anxious and inadequate. Results from a poll conducted with 298 participants show that more than 50% have seen behaviour changes in themselves for the worse. Of the 53% participants who reported a change in their attitude, 51% found the impact to be negative.
The cause attributed by most people was that their confidence took a beating because they were constantly comparing their achievements with their friends online. Moreover, two-thirds of the pool found it hard to relax or sleep soundly after networking online, while one-fourth revealed that they had been left facing issues in their relationships or workplace after online face-offs. In an indication as to how addictive these services can be, 55% of people also said that they experienced discomfort when their Facebook or email accounts could not be accessed. What's worse, over 60% users needed to physically turn off their gadgets in order to take a break from networking online, since they were unable to ignore their beeping devices whenever somebody posted an update.
Nokia Lumia 610
Nokia Lumia 610 With Windows Phone 7.5 And 3.7" Screen Launched For Rs 13,000 Mid-range smartphone includes 800 MHz CPU, 256 MB RAM, and 5 mp autofocus camera. News Jayesh Limaye, 06th Jul 2012 - 17:21 Nokia has launched the Lumia 610, its lowest-priced Windows Phone 7.5 device, in India. Expectedly, this smartphone has lowered specs of an 800 MHz CPU and 256 MB RAM to achieve the target price. However, the other specifications have been maintained at the standard WP7.5 requirement levels, with a 3.7" multi-touch capacitive screen having pixel dimensions of 800x480, 5 mp autofocus camera with LED flash, and 8 GB internal storage. As expected, there is no expandable microSD slot. The phone also supports the Wi-Fi hotspot feature for as many as five users at a time. The Lumia 610 carries an MRP of Rs 13,000, which isn't great value considering its compromised specs. At the same event, Nokia also announced a Dark Knight Rises Limited Edition version of the Lumia 800. It plans to sell 200 pieces of this smartphone in India, although the pricing has not been announced as yet
.
Friday, July 06, 2012
Nokia Launches New Celphones
Nokia India is set to roll out two new smartphones running on Windows Phone 7.5 (Tango) in India tomorrow, Lumia 900 and Lumia 610. As per the press invite sent by the Finnish manufacturer, it will also launch The Dark Knight Edition of the former at the event. There is no official statement regarding the prices of the phones.
Lumia 900 is a top-end smartphone that boasts of a 4.3-inch AMOLED display and 8MP rear camera. It will run on a 1.4GHz processor coupled with a 512MB RAM and have 16GB internal memory. The Lumia 900 Batman edition smartphone, which has already hit stores in UK, will be offered with exclusive The Dark Knight Rises content, including themed wallpapers, ringtones and limited edition Batman or Bane character images.
The other phone to be launched tomorrow is the Nokia Lumia 610, which had made its debut atMobile World Congress. It sports a 3.7-inch display, 5MP camera, 800MHz Qualcomm Snapdragon processor, 256MB RAM and 8GB of internal memory. The Mobile Indian has reported that this smartphone will cost around Rs 11,000.
Microsoft, which has developed the Windows Phone platform, has stated that it will upgrade these devices to Windows Phone 7.8, which consists of some Windows Phone 8 (WP8) features. However, these devices will not receive the Windows Phone 8 update, Microsoft has said.
Higg particles (BOSON)
Nokia Pureview 808 : Mobile phone OR Camera
Nokia’s new 808 Pureview a phone or a camera? Its 41megapixel camera rightly got huge amounts of attention when it was unveiled at the Mobile World Congress tradeshow, but the phone itself was largely written off as an experimental piece of innovation. Now, for around £500, you can get your hands on one.
Samsung Galaxy Chat goes big on texting
Scrolling down the Galaxy lineup, the new Samsung Galaxy Chat can be seen seated on the lower end of the shelf. Going by the specifications sheet, it’s a very basic smartphone crafted for those who find themselves texting or chatting quite frequently.
Top 10 most important gadgets of the 21st century
Thursday, July 05, 2012
Java Script to drag and drop image in HTML5
Hi guys, some days ago i came across a situation where i have to drag and drop a image into a rectangle in a web page. I tried following and it works using HTML5.
<!DOCTYPE HTML>
<html>
<head>
<style type="text/css">
God Particle - "BOSON"
Biggest achievement in Physics-"Shadow of a single atom"
Scientists have been able to click the shadow of a single atom for the very first time - an unprecedented feat crowning efforts lasting more than five years.
Wednesday, July 04, 2012
Scientist claims to find the "GOD Particle"
The upcoming announcement of the results of the search for the Higgs Boson are promising to be groundbreaking from a scientific point-of-view. There is a lot of information that may be confusing to some and will be misinterpreted by many. The practical application of being that closer to understanding the secrets of the Universe won’t be realized for some time. It was decades from the discovery of radiation to the point where we could harness the power of the atom for power. As I sit here and write this post, I am still awaiting my Mr. Fusion device promised in 1985.
When you hear the sensationalism on the news about what the Higgs Boson discovery could mean, take it with a grain of salt and do a little critical thinking of your own. No need to eye that two meter thermal exhaust port on the side of the Large Hadron Collider.
What Finding the Higgs Boson Doesn’t Mean ??
The announcement of the results of the search for the Higgs Boson are promising to be groundbreaking from a scientific point-of-view. There is a lot of information that may be confusing to some and will be misinterpreted by many. The practical application of being that closer to understanding the secrets of the Universe won’t be realized for some time. It was decades from the discovery of radiation to the point where we could harness the power of the atom for power. As I sit here and write this post, I am still awaiting my Mr. Fusion device promised in 1985.
BSNL launches 3G pocket router for Rs 5,800
NEW DELHI: State-run telecom operator BSNLhas launched a third generation (3G) wireless pocket router in association with communications solutions provider Shyam Networks.
The 'Winknet Mf50' router comes in handy when there is a need to connect more than one device on a single SIM card.The router will be available in the market with a best buy price of Rs 5,800.A router is a device used for connecting the computer to the internet network.
It is SIM locked with BSNL and anybody who buys the router will be entitled to a plan voucher of Rs 60 which comes bundled with 1GB free data usage
Friday, June 29, 2012
Google Launches Nexus 7 Tablet
With the launch of Google's Nexus 7, the $199 tablet market got even more crowded. So, is it the best?
Amazon opened a lot of eyes when it introduced the Kindle Fire last year at $199. Many people expected it to come out at $249, but Amazon surprised everybody with $199. Now Google's done the same with its Asus-made Nexus 7, which, on paper anyway, offers the best specs for a 7-inch tablet at its price point, besting its closest competitors, the Kindle Fire and the 8GB Nook Tablet (you could also include the Samsung Tab 2 7.0 in this group, but it starts at $250).
Thursday, June 28, 2012
Virtual Keyword In C#
Virtual Keyword in C#
- When a derived class want to override the base class member(s) then base class member(s) need to marked as virtual members.
- A function marked as virtual can be overridden by subclasses wishing to provide a specialized implementation.
- Methods, properties, indexers, and events can all be declared as virtual.
- In the derived class those members will be marked by override keyword.
Wednesday, June 27, 2012
New Features Of .NET 4.0
Introduction
This article contains some of the new features of ASP.NET 4.0 and Visual Studio 2010 IDE.
Improvements in C# 4.0
C# in .NET Framework 4.0 has some more things to offer. These are:
- Dynamic lookup
- Named
- Optional parameters
Dynamic Lookup
There is a new static type named
dynamic. We can use it as object of any type. If there is any error on its usage, we would get it on runtime only. For example:dynamic integerValue = 1;
dynamic stringValue = " a string";
dynamic Result = integerValue + stringValue;
DataSet Vs DataReader
Dataset Vs DataReader
1. DataReader is like a forward only recordset.
2. It fetches one row at a time so very less network cost compare to DataSet(Fethces all the rows at a time).
3. DataReader is readonly so we can't do any transaction on them.
4. DataReader will be the best choice where we need to show the data to the user which requires no transaction.
5. As DataReader is forward only so we can't fetch data randomly. .NET Data Providers optimizes the DataReader to handle huge amount of data.
DataSet
1. DataSet is an in memory representation of a collection of Database objects including tables of a relational database schemas.
2. DataSet is always a bulky object that requires a lot of memory space compared to DataReader. We can say that the DataSet is a small database because it stores the schema and data in the application memory area.
3. DataSet fetches all data from the datasource at a time to its memory area.
4. We can traverse through the object to get the required data like querying database.
Thursday, June 21, 2012
Role-Based Security with Forms Authentication
Introduction
Forms Authentication in ASP.NET can be a powerful feature. With very little code and effort, you can have a simple authentication system that is platform-agnostic. If your needs are more complex, however, and require more efficient controls over assets, you need the flexibility of groups. Windows Authentication gives you this flexibility, but it is not compatible with anything but Internet Explorer since it uses NTLM, Microsoft's proprietary authentication system. Now you must choose how to manage your assets: provide multiple login pages / areas and force users to register for each, or assign groups to users and limit access to pages / areas to particular groups. Obviously, you must choose the latter.
JQuery
JQuery is a new kind of JavaScript Library.jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.
jQuery is free, open source software, dual-licensed under the MIT License or the GNU General Public License. jQuery's syntax is designed to make it easier to navigate a document, select DOM elements, create animations, handle events, and develop Ajax applications. jQuery also provides capabilities for developers to create plug-ins on top of the JavaScript library. This enables developers to create abstractions for low-level interaction and animation, advanced effects and high-level, theme-able widgets. The modular approach to the jQuery library allows the creation of powerful dynamic web pages and web applications.
Ratan Tata Retirement
When long-serving employees retire, companies present them with mementos or gold watches as a form of gratitude and in recognition of services rendered.
But what should a company do when its boss, or sort-of owner, is about to hang up his boots?
Tata Consultancy Services (TCS), India’s largest infotech company, is facing just such a question. It has probably answered it the wrong way.
It’s superboss, Ratan Tata, is about to walk off into the sunset in the next six months, and TCS has decided that Rs 5 crore is a fitting reward for his “long-standing contribution to the sustained growth and success” of the company, according to a report in Business Standard.
Is the company honouring or diminishing Ratan Tata, India’s tallest businessman by far, by putting a price of Rs 5 crore on his life-long efforts to put TCS on the global map? Getty Images
Is the company honouring or diminishing Ratan Tata, India’s tallest businessman by far, by putting a price of Rs 5 crore on his life-long efforts to put TCS on the global map? This, when the formal compensation Tata will receive in 2011-12 will exceed Rs 8 crore.
There’s no question Ratan Tata, who retires this December when he turns 75 as per group policy, has rendered invaluable services to every part of the Tata group and to business, in general, both in India and abroad. If Indian business has a reputation abroad, it owes much to Ratan Tata and his group.
TCS, as the crown jewel in the Tata group, has taken in the lead in recognising Tata’s contribution to its own growth and that of the group.
But there are several reasons to think it is not doing the right thing by trying to put a monetary value to Tata’s contribution – even though this may not be the intention behind the TCS gift.
First, listed companies should not be singling out individual directors for special compensation when there are already board and AGM resolutions that specify what Tata should be paid for his work.
Second, when an exception is supposed to be made to this rule, it is the minority shareholders who should vote on it – not all shareholders. As owner of the vast majority of TCS shares (nearly 74 percent), any such resolution is going to pass, especially since Tata Sons, the main holder of TCS shares, is also run by Ratan Tata. The TCS management is thus putting Tata in the embarrassing position of being the promoter who votes on his own retirement bonus.
Third, since it is fairly certain that almost all Tata companies will also be bidding farewell to their larger-than-life promoter, they could all fall into the TCS trap of saying it not with roses, but cash. The TCS example, if followed by other Tata group companies, will be no different from the political spectacles we see where leaders are weighed in gold or garlanded with cash for services rendered.
We think a Mayawati being received with a garland of Rs 1,000 notes is gross, but a Tata being gifted a Rs 5 crore cheque is somehow sane and sensible. The difference is only in the optics: one looks gross, and the other doesn’t because it happens out of public view.
The point is simple: if Ratan Tata’s services have been priceless and invaluable (which they demonstrably are), why try and show gratitude by trying to do precisely the opposite – by indicating a price and putting a monetary value on what is inestimable?
The Tata Group should not bring down Ratan Tata to the level of our crass political class. They should say it with roses.