<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5661587522794049577</id><updated>2011-07-30T10:39:32.734-07:00</updated><category term='Log File .Net'/><category term='Technical Question and Ans'/><category term='XML'/><category term='.Net GridView'/><category term='Sitefinity 3.7'/><category term='SQL'/><category term='.Net Crystal Report'/><category term='Articles'/><category term='Validation'/><category term='Sharepoint'/><category term='.Net'/><title type='text'>ஏஞ்சல் பதிவுகள்!</title><subtitle type='html'>தேடி கிடைத்த பொருள்,எளிதில்  தொலைவதில்லை
கிடைத்த பொருள், நிலைப்பதில்லை! - அறிவு பசி.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://angeltechworld.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>37</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-5159499338905278303</id><published>2010-05-19T09:19:00.000-07:00</published><updated>2010-05-19T09:46:42.054-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Articles'/><title type='text'>Agile Methodology</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Agile Methodology – An Overview  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Gartner defines Agility as "the ability of an organization to sense environmental change and respond efficiently and effectively to that change." Sensing the need for change also includes the proactive initiation of change. &lt;br /&gt;&lt;br /&gt;Rapidity of business change is driving a need for agility to respond more effectively to change.Organizations needed to make development process changes should strongly consider using Agile rapid applications development methodologies as part of moving to service-oriented development of applications. &lt;br /&gt;&lt;br /&gt;Any enterprise that aspires to respond in real time must have the ability to be agile when needed. Agile is successful because it:&lt;br /&gt;Stresses customer satisfaction&lt;br /&gt;Emphasizes team work (simple, yet effective way to enable groupware style development)&lt;br /&gt;Allows agile programmers communicate with their customers and fellow programmers quite regularly and empowers them to confidently respond to changing customer requirements, even late in the life cycle&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Why Agile&lt;/span&gt;&lt;br /&gt;Traditionally, software development has been process-centric.&lt;br /&gt;Agile methodologies change the face of software development by giving it a human touch (people over processes).&lt;br /&gt;Customers value ROI and time-to-market. &lt;br /&gt;Agile methodologies help in increasing ROI as well as reduce time-to-market. (incremental working software)&lt;br /&gt;Customers see quality, productivity and turn-around time as a risk when it comes to off-shore software development.&lt;br /&gt;Agile methodologies build trust and confidence as the customer is part of the team and the techniques used reduce the offshore risks. (customer collaboration and embracing change)&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Development Firm&lt;/span&gt;&lt;br /&gt;Critical Success Factors &lt;br /&gt;Use Continuous Integration to Avoid Integration Headaches &lt;br /&gt;Have Each Site Send Ambassadors to the Other Sites &lt;br /&gt;Use Contact Visits to build trust &lt;br /&gt;Don't Underestimate the Culture Change &lt;br /&gt;Use wikis to contain common information &lt;br /&gt;Use Test Scripts to Help Understand the Requirements &lt;br /&gt;Use Regular Builds to Get Feedback on Functionality &lt;br /&gt;Use Regular Short Status Meetings &lt;br /&gt;Use Short Iterations &lt;br /&gt;Use an Iteration Planning Meeting that's Tailored for Remote Sites &lt;br /&gt;When Moving a Code Base, Bug Fixing Makes a Good Start &lt;br /&gt;Separate teams by functionality not activity &lt;br /&gt;Expect to need more documents. &lt;br /&gt;Get multiple communication modes working early.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Client : &lt;/span&gt;A  leading supplier of media and technology solutions to connect Health care professionals to customers &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Salient Features&lt;/span&gt;&lt;br /&gt; The Core / Remote Team Model&lt;br /&gt; Phased Requirements &lt;br /&gt; Project Transitioning &lt;br /&gt; Multiple Technical Approach &lt;br /&gt; Agile Source Control&lt;br /&gt; Agile Testing&lt;br /&gt; Daily &amp; Weekly Meetings &lt;br /&gt; Change Request Management&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_yPsA-Y4pO1A/S_QTAvvgWpI/AAAAAAAAAXs/ftJXWopSCiA/s1600/Team.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 311px; height: 320px;" src="http://1.bp.blogspot.com/_yPsA-Y4pO1A/S_QTAvvgWpI/AAAAAAAAAXs/ftJXWopSCiA/s320/Team.jpeg" border="0" alt=""id="BLOGGER_PHOTO_ID_5473020350698642066" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Agile Requirements &amp; Implementation &lt;/span&gt;&lt;br /&gt; 1. Planning requires user/programmer cooperation in defining feature benefits and costs.  - The Core Team Model, The Remote Team Model.&lt;br /&gt; 2. Small releases put out a simple system early and update it often. - Phased Requirements.&lt;br /&gt; 3. Simple design value comes from the simplest program that meets requirements. - Multiple Technical approch.&lt;br /&gt; 4. Re-factoring has Agile teams correct system design defects and recode as necessary - Multiple approch  &amp; Agile source control.&lt;br /&gt; 5. Testing has programmers write tests first, and then create software to fulfill test requirements. - Agile Testing&lt;br /&gt; 6. On-site customers set priorities, answer programmers' questions and cut documentation costs. - Daily &amp; weekly status meeting.&lt;br /&gt; 7. Pair programming has programmers write all production code in pairs, sharing a single machine. - Agile source control&lt;br /&gt; 8. Collective ownership implies shared responsibility for code function and quality. - Daily &amp; Weekly Meetings, &lt;br /&gt;Project Transitions, Change Request&lt;br /&gt;Management, The Core Team Model, The Remote Team Model.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-5159499338905278303?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/5159499338905278303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/5159499338905278303'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2010/05/agile-methodology.html' title='Agile Methodology'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_yPsA-Y4pO1A/S_QTAvvgWpI/AAAAAAAAAXs/ftJXWopSCiA/s72-c/Team.jpeg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-6901579670090295235</id><published>2010-04-19T05:09:00.000-07:00</published><updated>2010-04-19T05:13:05.914-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Get the Row Count</title><content type='html'>Get the Row Count using procedure, insted of select count (*) table Name&lt;br /&gt;&lt;br /&gt;USE [DBName]&lt;br /&gt;GO&lt;br /&gt;/****** Object:  StoredProcedure [dbo].[Sp_RowCount]    Script Date: 04/19/2010 17:40:36 ******/&lt;br /&gt;SET ANSI_NULLS ON&lt;br /&gt;GO&lt;br /&gt;SET QUOTED_IDENTIFIER ON&lt;br /&gt;GO&lt;br /&gt;CREATE Proc [dbo].[Sp_RowCount]( @Tname as varchar(100)) As&lt;br /&gt;Declare @SQL Varchar(500)&lt;br /&gt;Set @SQL='Select Object_Name(Id) As [Table Name], Rows From sysindexes Where indid &lt; 2 And Id=' + Str(Object_Id(@Tname))  // the case if u want only count u remove the first colum of (table name).&lt;br /&gt;Exec (@SQL)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-6901579670090295235?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/6901579670090295235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/6901579670090295235'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2010/04/get-row-count.html' title='Get the Row Count'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-2801419741793577400</id><published>2010-02-28T10:10:00.001-08:00</published><updated>2010-03-15T13:30:42.102-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Articles'/><title type='text'>Design Patterns</title><content type='html'>Design patterns are recurring solutions to software design problems you find again and again in real-world application development. Patterns are about design &lt;br /&gt;&lt;br /&gt;and interaction of objects, as well as providing a communication platform.&lt;br /&gt;Design patterns &lt;bold&gt;categorized as Creational,Structural,Behavioral.&lt;/bold&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;font color="green"&gt;Creational pattern&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;u&gt;Abstract Factory &lt;/u&gt;---&gt;&lt;/span&gt;Creates an instance of several families of classes &lt;br /&gt; (Provide an interface for creating families of related or dependent objects without specifying their concrete classes.)&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_yPsA-Y4pO1A/S550BhKbrCI/AAAAAAAAATE/HcRQRA74zlI/s1600-h/abstract.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 297px; height: 320px;" src="http://2.bp.blogspot.com/_yPsA-Y4pO1A/S550BhKbrCI/AAAAAAAAATE/HcRQRA74zlI/s320/abstract.jpeg" border="0"  /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;u&gt; Builder &lt;/u&gt;---&gt;&lt;/span&gt;Separates object construction from its representation &lt;br /&gt; (Separate the construction of a complex object from its representation so that the same construction process can create different representations..)&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_yPsA-Y4pO1A/S550C_DiPWI/AAAAAAAAATc/dSgfQB1cfPI/s1600-h/builder.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 135px;" src="http://2.bp.blogspot.com/_yPsA-Y4pO1A/S550C_DiPWI/AAAAAAAAATc/dSgfQB1cfPI/s320/builder.jpeg" border="0" &lt;br /&gt; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;u&gt; Factory Method&lt;/u&gt;---&gt;&lt;/span&gt;Creates an instance of several derived classes  &lt;br /&gt; (Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses)&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_yPsA-Y4pO1A/S552PvsIn-I/AAAAAAAAAUE/wJkog7-uPjE/s1600-h/factory.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 126px;" src="http://3.bp.blogspot.com/_yPsA-Y4pO1A/S552PvsIn-I/AAAAAAAAAUE/wJkog7-uPjE/s320/factory.jpeg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;u&gt;  Prototype&lt;/u&gt;---&gt;&lt;/span&gt;A fully initialized instance to be copied or cloned.&lt;br /&gt; (Specify the kind of objects to create using a prototypical instance, and create new objects by copying this prototype.)&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_yPsA-4pO1A/S553YFUvsWI/AAAAAAAAAU8/LlLCxG_Mm4U/s1600-h/prototype.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 184px;" src="http://4.bp.blogspot.com/_yPsA-Y4pO1A/S553YFUvsWI/AAAAAAAAAU8/LlLCxG_Mm4U/s320/prototype.jpeg" border="0" &lt;br /&gt; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;u&gt; Singleton&lt;/u&gt;---&gt;&lt;/span&gt;A class of which only a single instance can exist. &lt;br /&gt; (Ensure a class has only one instance and provide a global point of access to it.)&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_yPsA-Y4pO1A/S553YxaowDI/AAAAAAAAAVM/6f_D7c3EqAU/s1600-h/singleton.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 271px; height: 86px;" src="http://4.bp.blogspot.com/_yPsA-Y4pO1A/S553YxaowDI/AAAAAAAAAVM/6f_D7c3EqAU/s320/singleton.jpeg" border="0" &lt;br /&gt; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;font color="green"&gt;Structural pattern&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;u&gt; Adapter&lt;/u&gt;---&gt;&lt;/span&gt;Match interfaces of different classes &lt;br /&gt; (Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible &lt;br /&gt;interfaces.)&lt;br /&gt;&lt;a  href="http://1.bp.blogspot.com/_yPsA-Y4pO1A/S56UarQ65-I/AAAAAAAAAWE/Br4EMx4dUEM/s1600-h/adapter.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 186px;" src="http://1.bp.blogspot.com/_yPsA-Y4pO1A/S56UarQ65-I/AAAAAAAAAWE/Br4EMx4dUEM/s320/adapter.jpeg" border="0"  /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;u&gt; Bridge&lt;/u&gt;---&gt;&lt;/span&gt;Separates an object’s interface from its implementation &lt;br /&gt; (Decouple an abstraction from its implementation so that the two can vary independently.)&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_yPsA-Y4pO1A/S56Uxyy35bI/AAAAAAAAAWM/IwFOOV6Grdw/s1600-h/bridge.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 210px;" src="http://3.bp.blogspot.com/_yPsA-Y4pO1A/S56Uxyy35bI/AAAAAAAAAWM/IwFOOV6Grdw/s320/bridge.jpeg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;u&gt; Composite&lt;/u&gt;---&gt;&lt;/span&gt;A tree structure of simple and composite objects &lt;br /&gt; (Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly. &lt;br /&gt;&lt;br /&gt;)&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_yPsA-Y4pO1A/S552OlpsmdI/AAAAAAAAAT0/MW0JXQLKOK8/s1600-h/composite.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 232px;" src="http://3.bp.blogspot.com/_yPsA-Y4pO1A/S552OlpsmdI/AAAAAAAAAT0/MW0JXQLKOK8/s320/composite.jpeg" border="0" &lt;br /&gt;/&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;u&gt;  Decorator&lt;/u&gt;---&gt;&lt;/span&gt;Add responsibilities to objects dynamically &lt;br /&gt; (Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.)&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_yPsA-Y4pO1A/S552OwieclI/AAAAAAAAAT8/BylD90OzsT8/s1600-h/decorator.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 264px;" src="http://2.bp.blogspot.com/_yPsA-Y4pO1A/S552OwieclI/AAAAAAAAAT8/BylD90OzsT8/s320/decorator.jpeg" border="0" &lt;br /&gt;/&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;u&gt; Facade&lt;/u&gt;---&gt;&lt;/span&gt;A single class that represents an entire subsystem&lt;br /&gt; (Provide a unified interface to a set of interfaces in a subsystem. Façade defines a higher-level interface that makes the subsystem easier to use.)&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_yPsA-Y4pO1A/S56LEjw01bI/AAAAAAAAAV0/9ErcYU6zFcU/s1600-h/facade.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 229px;" src="http://3.bp.blogspot.com/_yPsA-Y4pO1A/S56LEjw01bI/AAAAAAAAAV0/9ErcYU6zFcU/s320/facade.jpeg" border="0"  /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;u&gt; Flyweight&lt;/u&gt;---&gt;&lt;/span&gt; A fine-grained instance used for efficient sharing&lt;br /&gt; (Use sharing to support large numbers of fine-grained objects efficiently.)&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_yPsA-Y4pO1A/S552P4k8p5I/AAAAAAAAAUM/Gg0EBROCTvM/s1600-h/flyweight.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 198px;" src="http://4.bp.blogspot.com/_yPsA-Y4pO1A/S552P4k8p5I/AAAAAAAAAUM/Gg0EBROCTvM/s320/flyweight.jpeg" border="0" &lt;br /&gt;/&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;u&gt; Proxy&lt;/u&gt;---&gt;&lt;/span&gt;An object representing another object &lt;br /&gt; (Provide a surrogate or placeholder for another object to control access to it.)&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_yPsA-Y4pO1A/S553YaicfAI/AAAAAAAAAVE/kXEA2Qs4e7w/s1600-h/proxy.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 199px;" src="http://2.bp.blogspot.com/_yPsA-Y4pO1A/S553YaicfAI/AAAAAAAAAVE/kXEA2Qs4e7w/s320/proxy.jpeg" border="0" &lt;br /&gt; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;font color="green"&gt;Behavioral pattern&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;u&gt; Chain of Resp&lt;/u&gt;---&gt;&lt;/span&gt;A way of passing a request between a chain of objects &lt;br /&gt; (Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the &lt;br /&gt;&lt;br /&gt;request along the chain until an object handles it.)&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_yPsA-Y4pO1A/S550DC9cjHI/AAAAAAAAATk/jZEZDyoWLLk/s1600-h/chain.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 122px;" src="http://1.bp.blogspot.com/_yPsA-Y4pO1A/S550DC9cjHI/AAAAAAAAATk/jZEZDyoWLLk/s320/chain.jpeg" border="0" &lt;br /&gt;/&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;u&gt; Command&lt;/u&gt;---&gt;&lt;/span&gt;Encapsulate a command request as an object &lt;br /&gt; (Encapsulate a request as an object, thereby letting you parameterize clients with different requests, queue or log requests, and support undoable operations. )&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_yPsA-Y4pO1A/S552OMvurJI/AAAAAAAAATs/_ffTMTk3s6E/s1600-h/command.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 209px;" src="http://3.bp.blogspot.com/_yPsA-Y4pO1A/S552OMvurJI/AAAAAAAAATs/_ffTMTk3s6E/s320/command.jpeg" border="0" &lt;br /&gt;/&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;u&gt; Interpreter&lt;/u&gt;---&gt;&lt;/span&gt;A way to include language elements in a program &lt;br /&gt; (Given a language, define a representation for its grammar along with an interpreter that uses the representation to interpret sentences in the language.)&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_yPsA-Y4pO1A/S5523u7tBkI/AAAAAAAAAUU/wGmdQ3DE1aQ/s1600-h/interpreter.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 210px;" src="http://4.bp.blogspot.com/_yPsA-Y4pO1A/S5523u7tBkI/AAAAAAAAAUU/wGmdQ3DE1aQ/s320/interpreter.jpeg" border="0" &lt;br /&gt;/&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;u&gt; Iterator &lt;/u&gt;---&gt;&lt;/span&gt;Sequentially access the elements of a collection &lt;br /&gt; (Provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation.)&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_yPsA-Y4pO1A/S552329O9jI/AAAAAAAAAUc/trYgUPC-GVs/s1600-h/iterator.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 238px;" src="http://2.bp.blogspot.com/_yPsA-Y4pO1A/S552329O9jI/AAAAAAAAAUc/trYgUPC-GVs/s320/iterator.jpeg" border="0"/&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;u&gt; Mediator&lt;/u&gt;---&gt;&lt;/span&gt;Defines simplified communication between classes &lt;br /&gt; (Define an object that encapsulates how a set of objects interact. Mediator promotes loose coupling by keeping objects from referring to each other explicitly, &lt;br /&gt;&lt;br /&gt;and it lets you vary their interaction independently.)&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_yPsA-Y4pO1A/S5524F2lchI/AAAAAAAAAUk/F9tETAE7DCc/s1600-h/mediator.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 166px;" src="http://2.bp.blogspot.com/_yPsA-Y4pO1A/S5524F2lchI/AAAAAAAAAUk/F9tETAE7DCc/s320/mediator.jpeg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;u&gt; Memento&lt;/u&gt;---&gt;&lt;/span&gt;Capture and restore an object's internal state&lt;br /&gt; (Without violating encapsulation, capture and externalize an object's internal state so that the object can be restored to this state later.)&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_yPsA-Y4pO1A/S5524Q4FDqI/AAAAAAAAAUs/H04bD7W_T9Q/s1600-h/memento.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 114px;" src="http://3.bp.blogspot.com/_yPsA-Y4pO1A/S5524Q4FDqI/AAAAAAAAAUs/H04bD7W_T9Q/s320/memento.jpeg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;u&gt; Observer&lt;/u&gt;---&gt;&lt;/span&gt;A way of notifying change to a number of classes&lt;br /&gt; (Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.)&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_yPsA-Y4pO1A/S55244Hi_hI/AAAAAAAAAU0/Rz_RJgUWveY/s1600-h/observer.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 238px;" src="http://2.bp.blogspot.com/_yPsA-Y4pO1A/S55244Hi_hI/AAAAAAAAAU0/Rz_RJgUWveY/s320/observer.jpeg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;u&gt; State&lt;/u&gt;---&gt;&lt;/span&gt;Alter an object's behavior when its state changes &lt;br /&gt; (Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it.)&lt;br /&gt;&lt;a  href="http://4.bp.blogspot.com/_yPsA-Y4pO1A/S56YwDKnahI/AAAAAAAAAWk/OxdrSR_Lxpk/s1600-h/state.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 138px;" src="http://4.bp.blogspot.com/_yPsA-Y4pO1A/S56YwDKnahI/AAAAAAAAAWk/OxdrSR_Lxpk/s320/state.jpeg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;u&gt; Strategy&lt;/u&gt;---&gt;&lt;/span&gt; Encapsulates an algorithm inside a class&lt;br /&gt; (Allow an object to alter its behavior when its internal state changes. The object will appear to change its class.)&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_yPsA-Y4pO1A/S553ZRhyozI/AAAAAAAAAVc/hX-QEmFZZ5g/s1600-h/strategy.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 120px;" src="http://4.bp.blogspot.com/_yPsA-Y4pO1A/S553ZRhyozI/AAAAAAAAAVc/hX-QEmFZZ5g/s320/strategy.jpeg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;u&gt; Template Method&lt;/u&gt;---&gt;&lt;/span&gt;Defer the exact steps of an algorithm to a subclasse. &lt;br /&gt; (Define the skeleton of an algorithm in an operation, deferring some steps to subclasses. Template Method lets subclasses redefine certain steps of an &lt;br /&gt;&lt;br /&gt;algorithm without changing the algorithm's structure.)&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_yPsA-Y4pO1A/S56VhlJ5lmI/AAAAAAAAAWc/RDv4uCuOCwQ/s1600-h/template.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 207px;" src="http://4.bp.blogspot.com/_yPsA-Y4pO1A/S56VhlJ5lmI/AAAAAAAAAWc/RDv4uCuOCwQ/s320/template.jpeg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;u&gt; Visitor&lt;/u&gt;---&gt;&lt;/span&gt;Defines a new operation to a class without change  &lt;br /&gt; (Represent an operation to be performed on the elements of an object structure. Visitor lets you define a new operation without changing the classes of the &lt;br /&gt;elements on which it operates.)&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_yPsA-Y4pO1A/S56VVy6Yk8I/AAAAAAAAAWU/oYQc3ivYz6I/s1600-h/visitor.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 280px; height: 320px;" src="http://4.bp.blogspot.com/_yPsA-Y4pO1A/S56VVy6Yk8I/AAAAAAAAAWU/oYQc3ivYz6I/s320/visitor.jpeg" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-2801419741793577400?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/2801419741793577400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/2801419741793577400'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2010/02/design-patterns.html' title='Design Patterns'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_yPsA-Y4pO1A/S550BhKbrCI/AAAAAAAAATE/HcRQRA74zlI/s72-c/abstract.jpeg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-311557960279469531</id><published>2010-01-31T09:03:00.001-08:00</published><updated>2010-01-31T09:03:05.175-08:00</updated><title type='text'>Testing Methodology</title><content type='html'>&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-311557960279469531?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/311557960279469531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/311557960279469531'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2010/01/testing-methodology.html' title='Testing Methodology'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-8087979789603433331</id><published>2010-01-20T12:05:00.000-08:00</published><updated>2010-01-20T12:25:13.297-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Articles'/><title type='text'>MVC &amp; 3 Tire Architecture</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Model View Controller (MVC)&lt;br /&gt;Introduction:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Design patterns are very useful to solve complex design problems if used properly. This article explains the basic concept of the Model View Controller (MVC) Design pattern and also shows how closely.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Prerequisites&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Object Oriented-programming concepts, .NET Framework, ADO.NET, C#, XSD.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Definition/Description: Model View Controller (MVC)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;View renders the data from the Model in response to the request made to the model by controlled events made by user interaction.&lt;br /&gt;&lt;br /&gt;Model View Controller is a design approach to separate the application object model from GUI, originally invented around 80s. Then later on it has become a widely accepted common design pattern. The main objective behind this pattern is to decouple the view of the data (presentation layer) from the actual data processing so that the same model can be used for various views. This is achieved by using three different types of objects that interact with each other in loosely coupled manner with their discreet set of tasks.&lt;br /&gt;&lt;br /&gt;These three objects are known as Model, View and Controller. We will learn for each of them here.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_yPsA-Y4pO1A/S1djjI00WPI/AAAAAAAAALU/zOVzcJMa-pI/s1600-h/MVC.JPEG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 234px;" src="http://2.bp.blogspot.com/_yPsA-Y4pO1A/S1djjI00WPI/AAAAAAAAALU/zOVzcJMa-pI/s320/MVC.JPEG" border="0" alt=""id="BLOGGER_PHOTO_ID_5428917331134011634" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;VIEW:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;View is the graphical data presentation (outputting) irrespective of the real data processing. View is the responsible for look and feel, some custom formatting, sorting etc. View is completely isolated from actual complex data operations. For example, Online product catalog view is completely separated from database connection, query, tables etc. It simply gets final row-data from the model and puts some cosmetics and formatting before displaying it in browser. View provides interface to interact with the system. The beauty of MVC approach is that it supports any kind of view, which is challenging in todays distributed and multi-platform environment. &lt;br /&gt;&lt;br /&gt;A MVC model can have multiple views, which are controlled by controller. View interface can be of WEB-FORMS, HTML, XML/XSLT, XTML, and WML or can be Windows forms etc. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;MODEL:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Model is responsible for actual data processing, like database connection, querying database, implementing business rules etc. It feeds data to the view without worrying about the actual formatting and look and feel. Data provided by Model is display-neutral so it can be interfaced with as many views without code redundancy; this eases your code maintenance and reduces bugs and allows code -reuse at good extent. Model responds to the request made by controllers and notifies the registered views to update their display with new data.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;CONTROLLER:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Controller is responsible for Notice of action. Controller responds to the mouse or keyboard input to command model and view to change. Controllers are associated with views. User interaction triggers the events to change the model, which in turn calls some methods of model to update its state to notify other registered views to refresh their display.&lt;br /&gt;&lt;br /&gt;Benefits:&lt;br /&gt;&lt;br /&gt;Following are the few of the benefits of MVC design pattern.&lt;br /&gt;&lt;br /&gt;Since MVC handles the multiple views using the same enterprise model it is easier to maintain, test and upgrade the multiple system.&lt;br /&gt;&lt;br /&gt;It will be easier to add new clients just by adding their views and controllers.&lt;br /&gt;&lt;br /&gt;Since the Model is completely decoupled from view it allows lot of flexibilities to design and implement the model considering reusability and modularity. This model also can be extended for further distributed application.&lt;br /&gt;&lt;br /&gt;It is possible to have development process in parallel for model, view and controller.&lt;br /&gt;&lt;br /&gt;This makes the application extensible and scalable.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Drawbacks:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Requires high skilled experienced professionals who can identify the requirements in depth at the front before actual design. &lt;br /&gt;&lt;br /&gt;It requires the significant amount of time to analyze and design.&lt;br /&gt;&lt;br /&gt;This design approach is not suitable for smaller applications. It Overkills the small applications.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;.NET and MVC:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Lets try to find out how closely ASP.NET allows architecting application to meet MVC concept. &lt;br /&gt;&lt;br /&gt;Model: Dataset/Business Entities, DataAccess components&lt;br /&gt;View: .ASPX pages&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Controller: Code-behind .vb/.cs files&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Typed dataset is one of the greatest features in .NET, which holds the application data in memory and represents the application business entity model, which bridges the UI components with Service Interface and Data Access layer.&lt;br /&gt;&lt;br /&gt;So, service interface and Data Access components populate these typed Datasets. Now, these filled datasets can be bound to any view in UI layer.&lt;br /&gt;&lt;br /&gt;.ASPX and ASCX pages server as view and mean to interface with application, while the code behind classes for these files server as the controller functions.&lt;br /&gt;&lt;br /&gt;ASP.NET doesnt have central controller function, instead the code-behind file can directly make request to the Model and can update the dataset. But lot of controller function can be implemented in code behind class events in .aspx or .ascx pages, like Page_Onload(), OnItem_Created() etcevents.&lt;br /&gt;&lt;br /&gt;.NET Framework has all Object-oriented features like code reuse, encapsulation etcSo, proper design of your model can make your user interface and view completely separated from model which can server multiple views.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.c-sharpcorner.com/uploadfile/napanchal/mvcdesign12052005035152am/mvcdesign.aspx"&gt;Reference&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-8087979789603433331?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/8087979789603433331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/8087979789603433331'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2010/01/mvc-3-tire-architecture.html' title='MVC &amp; 3 Tire Architecture'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_yPsA-Y4pO1A/S1djjI00WPI/AAAAAAAAALU/zOVzcJMa-pI/s72-c/MVC.JPEG' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-7779202884816578395</id><published>2009-12-13T10:43:00.000-08:00</published><updated>2009-12-13T11:27:44.166-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Articles'/><title type='text'>3. Architecture</title><content type='html'>&lt;strong&gt;.Net 3.0 runtime&lt;/strong&gt;&lt;br /&gt;Contains the core pillars (WPF, WWF etc) and runtime components. If we wish only to run any .net 3.0 application, installing .net 3.0 runtime is enough.&lt;br /&gt;&lt;br /&gt;While the .NET Framework 2.0 class library is partially superseded by the new components (WF, WCF, and WPF) added in version 3.0, many portions of the original class library are still crucial to developers. The technologies of version 2.0 (ASP.NET, WinForms, ADO.NET, XML etc.) largely remain the elementary part of the new release; however, .NET framework 3.0 developers may now prefer using WPF over Windows Forms for writing a native Windows GUI.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_yPsA-Y4pO1A/SyU4-U5mTRI/AAAAAAAAAKs/g40kwr_IR08/s1600-h/architecture.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 170px;" src="http://3.bp.blogspot.com/_yPsA-Y4pO1A/SyU4-U5mTRI/AAAAAAAAAKs/g40kwr_IR08/s320/architecture.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5414796770396228882" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Windows Workflow Foundation (WF)&lt;/strong&gt;&lt;br /&gt;WF broadly comprises of the following assorted components:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Activity&lt;/strong&gt;: A unit of work ranging from very simple to quite complex. &lt;br /&gt;&lt;strong&gt;Workflow&lt;/strong&gt;: A group of activities that partially or completely implements a business process. &lt;br /&gt;&lt;strong&gt;WF Designers&lt;/strong&gt;: The graphical tools to create and modify workflows and activities. &lt;br /&gt;&lt;strong&gt;WF Base Activity Library&lt;/strong&gt;: A fundamental group of activities (IfElse, While, Listen etc. design constructs) used to create workflows. These are quite similar to the BizTalk Orchestration shapes. &lt;br /&gt;&lt;strong&gt;WF Runtime Engine&lt;/strong&gt;: A library that executes workflows. It also provides other services, such as communicating with software outside the workflow. &lt;br /&gt;&lt;strong&gt;Host process&lt;/strong&gt;: A Windows application that hosts the Windows Workflow Foundation runtime engine, workflows, and runtime services for persisting a workflow's state, handling transactions, etc. &lt;br /&gt;&lt;br /&gt;WF provides the Workflow Designer, a Visual Studio-hosted graphical tool for creating workflows. The activities in a workflow can be drawn using the Base Activity Library (BAL) provided with WF.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Windows Communication Foundation (WCF) &lt;/strong&gt;&lt;br /&gt;However applications are built (using workflow or otherwise), most of them need to communicate with each other. This inter-application communication has taken a big leap forward in the last few years. After a perpetual era of disagreement, all of the major vendors agreed to support SOAP based Web services which makes interoperability between applications built on different technology platforms, such as J2EE and the .NET Framework, significantly simpler. So, this also makes the idea of service-oriented architecture much more plausible for most organizations.&lt;br /&gt;&lt;br /&gt;A lot of communication approaches exist in the .NET Framework 2.0 such as ASP.NET Web Services, .NET Remoting, System.Messaging supporting queued messaging through MSMQ, Web Services Enhancements (WSE) - an extension to ASP.NET Web Services that supports WS-Security etc. However, instead of requiring developers to use a different technology with a different application programming interface for each kind of communication, WCF provides a common approach and API. "WCF is actually an old wine in new bottle", and was previously called as Indigo. In the .NET Framework 3.0 environment, most applications that might have used one of the communication technologies listed above will instead use WCF.&lt;br /&gt;&lt;br /&gt;WCF provides strong support for interoperable communication through SOAP. This includes support for several specifications, including WS-Security, WS-ReliableMessaging, and WS-AtomicTransaction. WCF doesn't itself require SOAP, so other approaches can also be used, including optimized binary protocol and queued messaging using MSMQ. WCF also takes an explicit service-oriented approach to communication, and loosens some of the tight couplings that can exist in distributed object systems, making interaction less error-prone and easier to change. Thus, WCF addresses a range of communication problems for applications. Three of its most important aspects that clearly stand out are:&lt;br /&gt;&lt;br /&gt;Unification of Microsoft�s communication technologies. &lt;br /&gt;Support for cross-vendor interoperability, including reliability, security, and transactions. &lt;br /&gt;Rich support for service orientation development.&lt;br /&gt;To sum up, communication between applications, whether within an organization or across, is a fundamental part of any modern software. The .NET Framework 3.0 attempts to address enduring communication challenges by using the service-oriented approach of WCF.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Windows CardSpace (WCS) &lt;/strong&gt;Digital identities are the way how people electronically represent themselves today on the Internet. In the majority of cases, a person's digital identity is expressed as a simple username, and when its combined with a password, it is used to access web sites, email servers, e-merchants, online banks etc. Yet, despite their simplicity and popularity, usernames and passwords haunt people. Many of us have a hard time remembering all of the usernames and passwords of different sites. Thus, some people use the same values for different sites, easing the memory problem but increasing the security risk. &lt;br /&gt;&lt;br /&gt;Usernames, passwords, and other personal information can be stolen by phishers. By sending delusory emails, phishers entice their victims to log in to their Web site that looks just like, say, the site of the victim's bank. So once the victim enters his username and password, the phisher can use this information to masquerade as the user on the real site. &lt;br /&gt;&lt;br /&gt;Reducing occurrences and severity of these problems requires an entirely new approach to managing digital identities. WCS (originally called InfoCard) provides this. It helps people keep track of their digital identities as distinct information cards. If a Web site accepts WCS logins, users attempting to log in to that site will see a WCS selection. By choosing a card, users also choose a digital identity that will be used to access this site. Rather than remembering a plethora of usernames and passwords, users need only recognize the card they wish to use. &lt;br /&gt;&lt;br /&gt;The identities represented by these cards are created by one or more identity providers. These identities will typically use stronger cryptographic mechanisms to allow users to prove their identity. WCS itself also includes a self-issued identity provider that runs on client machines. With this provider, users can create their own identities that don't rely on passwords for authentication. &lt;br /&gt;&lt;br /&gt;So if passwords aren't used to log in to a site, phishers can inflict no harm either. Well, not really! Phishers, if somehow, can trick a user to log into a bogus site, might be still able to acquire personal information of the user, such as sensitive medical information etc. Preventing this requires that users be able to distinguish real sites from the look-alike fakes created by phishers. To allow this, the organization that owns a Web site can get a high-assurance certificate. Unlike today's simple SSL certificates, acquiring this new kind of certificate involves a much more rigorous process, including stronger proof that the organization applying for it actually is who it claims to be. A high-assurance certificate can also carry a company's logo and other information to help the user correctly determine whether a site using this certificate is legitimate. When a user accesses a new site, WCS always displays the information in that site's certificate using a standard screen. Based on the strength of the certificate received, this screen will indicate different levels of assurance of the site's identity.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Windows Presentation Foundation (WPF)&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;User interfaces are an important part of most Windows applications. No matter how much software evolves, traditional menu-driven GUIs are here to stay for some more time. Similarly, the need to display video, run animations, use 2/3D graphics, and work with different document formats also cannot be superseded. And all of this must be possible whether the application is a stand-alone desktop client or is accessed through a Web browser.&lt;br /&gt;&lt;br /&gt;So far, all of these aspects of the user interface have been provided in different ways on Windows. For example, a developer needs to use Windows Forms to build a Windows GUI, or HTML/ASPX/Applets/JavaScript etc. to build a web interface, Windows Media Player or software such as Adobe's Flash Player for displaying video etc. The challenge for developers is certainly clear: building a coherent user interface for different kinds of clients using diverse technologies isn't a simple job.&lt;br /&gt;&lt;br /&gt;A primary goal of WPF (originally called Avalon) is to address this challenge! By offering a consistent platform for these entire user interface aspects, WPF makes life simpler for developers. By taking a more modern approach, including support for video, animation, 2/3D graphics, and various kinds of documents, WPF can let users work with information in new ways. And by providing a common foundation for desktop clients and browser clients, WPF makes it easier to build applications that address both. &lt;br /&gt;&lt;br /&gt;Another challenge that has long faced the creators of user interfaces stems from the different roles required for building effective interfaces. Software developers are needed to create the logic behind the interface, and Designers are required to define the interface's look and feel. Yet older technologies such as Windows Forms are focused entirely on the developer. There's no truly effective way for developers and designers to collaborate. To address this issue, WPF relies on the eXtensible Application Markup Language (XAML). An XML-based language, XAML allows specifying a user interface declaratively rather than in code. This makes it much easier for user interface design tools like MS Expression Blend (originally branded as MS Expression Interactive Designer and code named as Sparkle) to generate and work with an interface specification based on the visual representation created by a designer. Designers will be able to use such tools to create the look of an interface and then have a XAML definition of that interface generated for them. The developer imports this definition into Visual Studio, then creates the logic the interface requires.&lt;br /&gt;&lt;br /&gt;Developers can also build a XAML browser application (XBAP) to create a remote client that runs inside a Web browser. Built on the same foundation as a stand-alone WPF application, an XBAP allows presenting the same style of user interface within a downloadable browser application. The best part is that the same code can potentially be used for both kinds of applications, which means that developers no longer need different skill sets for desktop and browser clients. The downloaded XBAP from the Internet runs in a secure sandbox (like Java applets), and thus it limits what the downloaded application can do.&lt;br /&gt;&lt;br /&gt;Burp, GUI is a complex but an important part of the modern applications. Through WPF, the .NET Framework 3.0 presents a more complete and consistent solution to the challenges these interfaces present. The goal is to let people who create user interfaces (both developers and designers) effectively collaborate and do their jobs more expeditiously. So beware, because when your boss hears all this, she/he will certainly start expecting more from you.. : ( But I guess, that is the flip side of adopting any new technology. &lt;br /&gt;&lt;br /&gt;Cocktails&lt;br /&gt;�As an ideal meal cannot conclude without cocktails, so cannot a technology review without addressing criticism�. &lt;br /&gt;&lt;br /&gt;Of late, I have came across some criticism of .NET 3.0 release and its branding on grounds that the new release doesn't accommodate .Net 2.0 bugs or language enhancements (like LINQ). It is also said that it does not add up anything substantial (other than WinFx lib) and that there shall be no performance gains too. Some even envisage the .Net 3.0 release as an improvised marketing ploy to hype up the forthcoming Vista release. &lt;br /&gt;&lt;br /&gt;On the contrary, the re-branding from WinFx to .NET Framework and regrouping of the various technologies, "now", under a unified .NET Framework 3.0 banner, is a far better measure than it can be any later. This will not only avert another round of marketing confusion in future but also prevent the ever expanding branding namespace from getting further convoluted. After all, haven't we long forgotten the Longhorn for Vista (even though there was so much of brick-batting initially over it)? Plausibly, forgetting demands lesser efforts or time than remembering does.&lt;br /&gt;&lt;br /&gt;The fact that .Net framework 3.0 is not introducing anything sour at this stage that will require redesigning or recoding the existing applications, is ostensibly welcome. It, otherwise, could have stirred the development community and their trust. Now that our lives are simplified (or at least are less complicated); bug fixes and fancy enhancements can shortly arrive (as patches/SPs). Similarly, major performance gains can be targeted with every new CPU/architecture release.&lt;br /&gt;&lt;br /&gt;The aforesaid concerns and the resultant inertia, to a certain extent, were predictable at the time of announcement of the .Net release 3.0!! So, the ensuing confusion is obvious and is owing to the fact that from the very first release, till thus far; the .Net Framework has primarily grown vertically upwards and its now (with the new 3.0 release) attempting to expand horizontally outwards. This, however, indicates the overall maturity of the platform and is by far a healthy sign. So, instead of remaining dubious anymore, lets wisely step forward to accept the new version as an "additive" release (or more simply put the "production" release of WPF, WCF, WF, and WCS technologies), which is veritably colossal enough to be understated.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-7779202884816578395?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/7779202884816578395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/7779202884816578395'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/12/3-architecture.html' title='3. Architecture'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_yPsA-Y4pO1A/SyU4-U5mTRI/AAAAAAAAAKs/g40kwr_IR08/s72-c/architecture.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-7838457954586788937</id><published>2009-12-12T07:30:00.000-08:00</published><updated>2009-12-12T08:15:47.426-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Basic Query</title><content type='html'>SQL SELECT statement has the widest variety of query options, which are used to control the way data is returned.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ORDER BY&lt;/strong&gt;—A clause that returns the result set in a sorted order based on specified columns.&lt;br /&gt;example:&lt;br /&gt;SELECT * FROM Contacts ORDER BY first_name;&lt;br /&gt;You are free to use ORDER BY with any select statement that might return multiple rows. You can also use it in conjunction with other clauses:&lt;br /&gt;&lt;br /&gt;SELECT first_name, last_name FROM Contacts WHERE first_name BETWEEN ‘a’ AND ‘k’ ORDER BY last_name;&lt;br /&gt;&lt;br /&gt;When you use DISTINCT, it applies to all requested columns. If you want a list of all the salespeople in your table and the companies they represent but not every sales entry, you can use the following statement. Note that this may return several entries from the same company, etc. DISTINCT applies to the entire requested result set.&lt;br /&gt;&lt;br /&gt;DISTINCT—A keyword that returns only unique rows within a result set&lt;br /&gt;&lt;br /&gt;SELECT DISTINCT company, last_name, first_name FROM Sales;&lt;br /&gt;&lt;br /&gt;COUNT—A function that returns a numeric value which equals the number of rows matching your query&lt;br /&gt;&lt;br /&gt;The COUNT function tells you how many rows are in a result set. As with all functions, it accepts one parameter. This basic example will tell you how many rows are in your table:&lt;br /&gt;SELECT COUNT(*) FROM Sales;&lt;br /&gt;&lt;br /&gt;You can also use it to count the number of rows in any result set.&lt;br /&gt;SELECT COUNT(*) FROM Sales WHERE net_amount &gt; 100;&lt;br /&gt;&lt;br /&gt;AVG—A function that returns the numeric value that equals the average of the numbers in a specified column&lt;br /&gt;&lt;br /&gt;AVG returns the average of all the fields in a column with a numeric data type. It accepts one column name as its parameter, and it will return “0” if it's used on a non-numeric column.&lt;br /&gt;&lt;br /&gt;SELECT AVG(net_amount) FROM Sales;&lt;br /&gt;SELECT AVG(net_amount) FROM Sales WHERE company LIKE ‘%ABCD Co%’;&lt;br /&gt;&lt;br /&gt;SUM—A function that adds the numbers in a specified column&lt;br /&gt;SUM works just like AVG, except it returns the sum of values in all fields in the result set.&lt;br /&gt;SELECT SUM(net_amount) FROM Sales WHERE net_amount &gt; 100;&lt;br /&gt;&lt;br /&gt;MIN—A function that returns the lowest non-null value in a column&lt;br /&gt;MIN returns the lowest, non-null value in the specified column. If the column is a numeric data type, the result will be the lowest number. If it's a string data type, it will return the value that comes first alphabetically.&lt;br /&gt;SELECT MIN(net_amount) FROM Sales WHERE last_name = “Smith”;&lt;br /&gt;SELECT MIN(last_name) FROM Sales;&lt;br /&gt;&lt;br /&gt;MAX—A function that returns the largest value in a column&lt;br /&gt;MAX works just like MIN, only it returns the highest non-null value. It too can be used on strings or numbers.&lt;br /&gt;SELECT MAX(net_amount) FROM Sales;&lt;br /&gt;SELECT MAX(company) FROM Sales WHERE net_amount &gt; 100;&lt;br /&gt;The MAX function is sometimes used on columns containing an auto-incremented key field to determine what the next entry’s key ID will be. Unless you’re running a nonpublic database, be wary of using this information to insert the next entry, in case another user beats you to the punch.&lt;br /&gt;&lt;br /&gt;GROUP BY— Group by keyword is used to give records in same column rows in grouped manner. Group by can be used on one column name and more than one column name in SQL query&lt;br /&gt;&lt;br /&gt;Example using the SUM function&lt;br /&gt;For example, you could also use the SUM function to return the name of the department and the total sales (in the associated department). The HAVING clause will filter the results so that only departments with sales greater than $1000 will be returned.&lt;br /&gt;&lt;br /&gt;SELECT department, SUM(sales) as "Total sales"&lt;br /&gt;FROM order_details&lt;br /&gt;GROUP BY department&lt;br /&gt;HAVING SUM(sales) &gt; 1000;&lt;br /&gt;Example using the COUNT function&lt;br /&gt;&lt;br /&gt;For example, you could use the COUNT function to return the name of the department and the number of employees (in the associated department) that make over $25,000 / year. The HAVING clause will filter the results so that only departments with more than 10 employees will be returned.&lt;br /&gt;&lt;br /&gt;SELECT department, COUNT(*) as "Number of employees"&lt;br /&gt;FROM employees&lt;br /&gt;WHERE salary &gt; 25000&lt;br /&gt;GROUP BY department&lt;br /&gt;HAVING COUNT(*) &gt; 10;&lt;br /&gt;&lt;br /&gt;Example using the MIN function&lt;br /&gt;For example, you could also use the MIN function to return the name of each department and the minimum salary in the department. The HAVING clause will return only those departments where the starting salary is $35,000.&lt;br /&gt;&lt;br /&gt;SELECT department, MIN(salary) as "Lowest salary"&lt;br /&gt;FROM employees&lt;br /&gt;GROUP BY department&lt;br /&gt;HAVING MIN(salary) = 35000;&lt;br /&gt;&lt;br /&gt;Example using the MAX function&lt;br /&gt;For example, you could also use the MAX function to return the name of each department and the maximum salary in the department. The HAVING clause will return only those departments whose maximum salary is less than $50,000.&lt;br /&gt;&lt;br /&gt;SELECT department, MAX(salary) as "Highest salary"&lt;br /&gt;FROM employees&lt;br /&gt;GROUP BY department&lt;br /&gt;HAVING MAX(salary) &lt; 50000;&lt;br /&gt;&lt;strong&gt;Joins&lt;/strong&gt;&lt;br /&gt;A join in SQL is a clause that allows` merging of records from one or more than one tables in database. The records from the tables are fetched based on   some values that are common to each. &lt;br /&gt;&lt;br /&gt;SELECT  * from Employees e JOIN  Salary s ON  e.employeeid=s.employeeid;&lt;br /&gt;&lt;strong&gt;Inner Join&lt;/strong&gt;Two tables getting join result set display which is matched records only&lt;br /&gt;&lt;strong&gt;Explicit type&lt;/strong&gt;&lt;br /&gt;SELECT *from shooters s  INNER JOIN guntypes g ON s.guntype = g.guntype ;&lt;br /&gt;&lt;strong&gt;Implicit type&lt;/strong&gt;&lt;br /&gt;SELECT *from shooters s , guntypes g  WHERE  s.guntype = g.guntype ;&lt;br /&gt;&lt;strong&gt;Cross join&lt;/strong&gt;&lt;br /&gt;Is also called Cartesian join. Result of joining each row of the table with each row of the other table&lt;br /&gt;&lt;strong&gt;Left outer join &lt;/strong&gt;-  unmatched left table records and matched right table records.&lt;br /&gt;SELECT *from shooters s  LEFT OUTER JOIN guntypes g ON s.guntype = g.guntype ;&lt;br /&gt;&lt;strong&gt;Right outer join&lt;/strong&gt; – unmatched right table and matched left table&lt;br /&gt;SELECT *from shooters s  RIGHT OUTER JOIN guntypes g ON s.guntype = g.guntype ;&lt;br /&gt;&lt;strong&gt;Full outer join&lt;/strong&gt; merged the result fetched from left and right&lt;br /&gt;SELECT *from shooters s  FULL OUTER JOIN guntypes g ON s.guntype = g.guntype ;&lt;br /&gt;&lt;br /&gt;It is a simple sql join condition which uses the equal sign as the comparison operator. &lt;br /&gt;&lt;strong&gt;Equi joins&lt;/strong&gt; are SQL Outer join and SQL Inner join.&lt;br /&gt;&lt;strong&gt;SQL Non Equi Join:&lt;/strong&gt;&lt;br /&gt;A Non Equi Join is a SQL Join whose condition is established using all comparison operators except the equal (=) operator. Like &gt;=, &lt;=, &lt;, &gt;&lt;br /&gt;SELECT first_name, last_name, subject &lt;br /&gt;FROM student_details &lt;br /&gt;WHERE subject != 'Maths&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-7838457954586788937?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/7838457954586788937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/7838457954586788937'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/12/basic-query.html' title='Basic Query'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-8418197165448071073</id><published>2009-12-11T21:32:00.000-08:00</published><updated>2009-12-11T21:58:10.488-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Keys, Cosntraints, index</title><content type='html'>A constraint is a property assigned to a column or the set of columns in a table that prevents certain types of inconsistent data values from being placed in the column(s). Constraints are used to enforce the data integrity. This ensures the accuracy and reliability of the data in the database. The following categories of the data integrity exist&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Entity Integrity&lt;/span&gt; ensures that there are no duplicate rows in a table.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Domain Integrity&lt;/span&gt; enforces valid entries for a given column by restricting the type, the format, or the range of possible values.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Referential integrity&lt;/span&gt; ensures that rows cannot be deleted, which are used by other records (for example, corresponding data values between tables will be vital).&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;User-Defined Integrity&lt;/span&gt; enforces some specific business rules that do not fall into entity, domain, or referential integrity categories.&lt;br /&gt;&lt;br /&gt;A PRIMARY KEY constraint is a unique identifier for a row within a database table. Every table should have a primary key constraint to uniquely identify each row and only one primary key constraint can be created for each table. The primary key constraints are used to enforce entity integrity&lt;br /&gt;&lt;br /&gt;CREATE TABLE employee(&lt;br /&gt;   EmployeeId INT  NOT NULL CONSTRAINT pk_employee PRIMARY KEY (EmployeeId)&lt;br /&gt;,&lt;br /&gt;   LName VARCHAR(30) NOT NULL,&lt;br /&gt;   FName VARCHAR(30) NOT NULL,&lt;br /&gt;   Address VARCHAR(100) NOT NULL,&lt;br /&gt;   HireDate DATETIME NOT NULL,&lt;br /&gt;   Salary MONEY NOT NULL CONSTRAINT check_sale CHECK (salary &gt; 0)&lt;br /&gt;)&lt;br /&gt;Constraints Enhancements&lt;br /&gt;&lt;br /&gt;When you attempt to update or delete a key to which existing foreign keys point. You can control it by using the new ON DELETE and ON UPDATE clauses in the REFERENCES clause of the CREATE TABLE and ALTER TABLE statements. For example, in the previous versions of SQL Server if you wanted to do a cascade delete from the referenced table when the appropriate record in the parent table is deleted, you had to create a trigger which executed on delete of the parent table, but now you can simply specify the ON DELETE clause in the REFERENCES clause.&lt;br /&gt;CREATE TABLE Books (&lt;br /&gt;   BookID INT NOT NULL PRIMARY KEY,&lt;br /&gt;   AuthorID INT NOT NULL,&lt;br /&gt;   BookName VARCHAR(100) NOT NULL,&lt;br /&gt;   Price MONEY  NOT NULL&lt;br /&gt;)&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;CREATE TABLE Authors (&lt;br /&gt;   AuthorID INT NOT NULL PRIMARY KEY,&lt;br /&gt;   Name VARCHAR(100) NOT NULL&lt;br /&gt;)&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;ALTER TABLE Books &lt;br /&gt;ADD CONSTRAINT fk_author &lt;br /&gt;FOREIGN KEY (AuthorID) &lt;br /&gt;REFERENCES Authors (AuthorID) ON DELETE CASCADE &lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;Constraints are the built-in mechanism for enforcing data integrity. Using constraints is preferred to using triggers, rules, and defaults because built-in integrity features use much less overhead and perform faster than the ones you can create. When you write your own code to realize the same actions the constraints can make you can make some errors, so the constraints are not only faster, but also are more consistent and reliable. So, you should use triggers and rules only when the constraints do not provide all the needed functionality.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Candidate Key&lt;/span&gt; - A Candidate Key can be any column or a combination of columns that can qualify as unique key in database. There can be multiple Candidate Keys in one table. Each Candidate Key can qualify as Primary Key.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Primary Key&lt;/span&gt; - A Primary Key is a column or a combination of columns that uniquely identify a record. Only one Candidate Key can be Primary Key.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_yPsA-Y4pO1A/SyMsOuZr06I/AAAAAAAAAKk/KEPtKSAe5sw/s1600-h/sql-primary-candidate-key.JPG.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 186px; height: 320px;" src="http://3.bp.blogspot.com/_yPsA-Y4pO1A/SyMsOuZr06I/AAAAAAAAAKk/KEPtKSAe5sw/s320/sql-primary-candidate-key.JPG.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5414219808515019682" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Select a key that does not contain NULL&lt;/span&gt; &lt;br /&gt;It may be possible that there are Candidate Keys that presently do not contain value (not null) but technically they can contain null. In this case, they will not qualify for Primary Key. In the following table structure, we can see that even though column [name] does not have any NULL value it does not qualify as it has the potential to contain NULL value in future&lt;br /&gt;A table can have multiple Candidate Keys that are unique as single column or combined multiple columns to the table. They are all candidates for Primary Key. Candidate keys that follow all the three rules - 1) Not Null, 2) Unique Value in Table and 3) Static - are the best candidates for Primary Key. If there are multiple candidate keys that are satisfying the criteria for Primary Key&lt;br /&gt;&lt;br /&gt;When you use the multiple-column constraint format, you can create a composite key. A composite key specifies multiple columns for a primary-key or foreign-key constraint.&lt;br /&gt;The next example creates two tables. The first table has a composite key that acts as a primary key, and the second table has a composite key that acts as a foreign key. &lt;br /&gt;CREATE TABLE accounts (&lt;br /&gt;   acc_num INTEGER,&lt;br /&gt;   acc_type INTEGER,&lt;br /&gt;   acc_descr CHAR(20),&lt;br /&gt;   PRIMARY KEY (acc_num, acc_type))&lt;br /&gt;&lt;br /&gt;CREATE TABLE sub_accounts (&lt;br /&gt;   sub_acc INTEGER PRIMARY KEY,&lt;br /&gt;   ref_num INTEGER NOT NULL,&lt;br /&gt;   ref_type INTEGER NOT NULL,&lt;br /&gt;   sub_descr CHAR(20),&lt;br /&gt;   FOREIGN KEY (ref_num, ref_type) REFERENCES accounts&lt;br /&gt;      (acc_num, acc_type))&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Cluster index &amp; Non cluster index&lt;/span&gt;&lt;br /&gt;Primary_Key column is a monotonically increasing integer and that the last three columns are VARCHAR columns. Let's also assume that there is a clustered index on the Primary_Key column, and that there are no nonclustered indexes on the table.&lt;br /&gt;&lt;br /&gt;Now, let's assume we run the following query:&lt;br /&gt;&lt;br /&gt;SELECT Customer_No, Customer_Name, Customer_Address &lt;br /&gt;FROM Table_Name &lt;br /&gt;WHERE Primary_Key = 1001&lt;br /&gt;&lt;br /&gt;When the query optimizer analyzes this query, it will know that the Primary_Key column is the key to a clustered index. So the clustered index will (most likely) be used to locate the Primary_Key of 1001 very quickly using a clustered index lookup. In addition, since the other three columns are part of the clustered index, the values for these three columns are immediately available and can be immediately displayed after the query finishes executing. Keep in mind that all the columns in a clustered index are stored at the leaf level of the clustered index, so SQL Server, in this example, does not have to look elsewhere to find the data to be returned.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Non cluster&lt;/span&gt;&lt;br /&gt;Now, let's take a look at the following query:&lt;br /&gt;&lt;br /&gt;SELECT Customer_No, Customer_Name, Customer_Address &lt;br /&gt;FROM Table_Name &lt;br /&gt;WHERE Customer_No = 'ABC123'&lt;br /&gt;&lt;br /&gt;In this case, when this query is analyzed by the query optimizer, there is no index on the column Customer_No. Because of this, SQL Server will perform a clustered index scan to look for the designated record to return. Since this column is not indexed or unique, every row in the table will have to be scanned until the record is found. Once it is found, the rest of the record (because it is a clustered index and each row's data is part of the leaf index), is immediately available and the data is returned.&lt;br /&gt;&lt;br /&gt;If we need to perform the above query often, it would be to our advantage to add a nonclustered index to the Customer_No column. This way, when we run a query like the one above, instead of performing a time-consuming clustered index scan, it can use the nonclustered index on Customer_No to perform an index lookup, which is much faster than a clustered table scan. But is this all we need to do to optimize the above query? Actually, we have forgotten something. If we run the query, let's look at it again below, something else has to happen before our data is returned.&lt;br /&gt;&lt;br /&gt;SELECT Customer_No, Customer_Name, Customer_Address &lt;br /&gt;FROM Table_Name &lt;br /&gt;WHERE Customer_No = 'ABC123'&lt;br /&gt;&lt;br /&gt;When this query runs, it will use the nonclustered index on the Customer_No column to quickly identify the record using an index lookup. But unlike a clustered index, a nonclustered index only contains the data stored in the index, which is, in this case, only the Customer_No column. On the other hand, our query wants to return three columns: Customer_No, Customer_Name, and Customer_Address, not just key Customer_No. Because of this, SQL Server will now have to perform another step before it can return our data. Once it has located the correct row in the nonclustered index, then SQL Server must then look up the values of the other two columns from the clustered index, where this data is stored&lt;br /&gt;Covering indexes, if used judiciously, can be used to speed up many types of commonly run queries. But covering indexes have some limitations. For example, they are limited to a maximum of 16 columns; they have a 900-character maximum width; certain datatypes cannot be included in them; and adding additional columns to an index makes the index wider, which in turn requires more disk I/O to read and write the rows, potentially hurting performance, especially if the table is subject to many INSERTs, UPDATEs, and DELETEs.&lt;br /&gt;&lt;br /&gt;"nonkey column nonclustered indexes." This new feature is a variation of the standard covering index we have been talking about up to this point, but with some advantages over covering indexes.&lt;br /&gt;&lt;br /&gt;Let's go back to our example query.&lt;br /&gt;&lt;br /&gt;SELECT Customer_No, Customer_Name, Customer_Address &lt;br /&gt;FROM Table_Name &lt;br /&gt;WHERE Customer_No = 'ABC123'&lt;br /&gt;&lt;br /&gt;Let's assume, as before, that there is a clustered index on Primary_Key. Now, instead of creating a covering index as described above, what we can do is create a nonclustered index on Customer_No, but instead of adding Customer_Name and Customer_Address as additional key columns to the index, we instead add Customer_Name and Customer_Address as nonkey columns to the nonclustered index.&lt;br /&gt;&lt;br /&gt;nonkey column nonclustered index over using a covering index. The benefits include:&lt;br /&gt;&lt;br /&gt;All data types are supported, except text, ntext, and image. So you have more datatype options than a covering index. &lt;br /&gt;The maximum number of columns is 1,023, not 16 as with covering indexes. &lt;br /&gt;Because the actual index is narrower, the key is more efficient and can offer better performance over a covering index where all of the columns are part of the key.&lt;br /&gt;Yes, these are small differences, but lots of small differences add up and can help boost the performance of your SQL Server. In fact, you may want to review all of your currently existing covering indexes and change them to nonkey column nonclustered indexes to see if your query performance increases. Depending on the circumstances, performance could indeed increase.&lt;br /&gt;&lt;br /&gt;Nonkey columns are created using the INCLUDE clause of the CREATE INDEX statement. For example:&lt;br /&gt;&lt;br /&gt;CREATE INDEX IX_Table ON Table (Key_Index_Column) INCLUDE (Column1, Column2, Column3)&lt;br /&gt;&lt;br /&gt;More space is required to store indexes with nonkey columns. Nonkey column data is stored at both the leaf level of the index and in the table itself. &lt;br /&gt;Larger indexes mean fewer rows can fit on a page, potentially increasing disk I/O. &lt;br /&gt;Index maintenance is increased for data modifications, potentially hurting performance if nonkey columns are large and the database experiences a high level of data modifications.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-8418197165448071073?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/8418197165448071073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/8418197165448071073'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/12/keys-cosntraints-index.html' title='Keys, Cosntraints, index'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_yPsA-Y4pO1A/SyMsOuZr06I/AAAAAAAAAKk/KEPtKSAe5sw/s72-c/sql-primary-candidate-key.JPG.gif' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-6537768295979654959</id><published>2009-11-12T00:48:00.000-08:00</published><updated>2009-11-12T01:04:30.035-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sharepoint'/><title type='text'>WebPart Creation &amp; Deployment</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Custom Web Part Creation and Deployment&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Creating Web User Control in VS2005 or VS2008.&lt;br /&gt;Step 1: Create new project (Web application Project) &lt;br /&gt; Note: Do not use new Web Site when creating project.&lt;br /&gt;Step 2: Name the Project  with good name.  Since this becomes our DLL.&lt;br /&gt;Step 3: Create Web User Control, with complete UI and Logic.&lt;br /&gt;Step 4: Build the project. Which will create a DLL.&lt;br /&gt;&lt;br /&gt;Create Web Part Project Library: &lt;br /&gt;This project is our Web part Library. Usually we will create only one Library project for all the web parts we develop.&lt;br /&gt;Step 1: Open new  dev VS2005. Create New Library Project.&lt;br /&gt;Step 2:  Name the project  with Good name.  (This becomes Dll)&lt;br /&gt;Step 3: Add a reference system.web to the project. This contains all the related name space for web part to work in share point.&lt;br /&gt;Step 4: Add a Class. Name it. This becomes the WebPart. &lt;br /&gt;Step 5: Import below name space.&lt;br /&gt;using System.Web.UI.WebControls.WebParts;&lt;br /&gt;Step 6: Inherit WebPart Class. &lt;br /&gt;&lt;br /&gt;namespace BasicWebParts&lt;br /&gt;{&lt;br /&gt;    public class HelloWorld:WebPart &lt;br /&gt;    {&lt;br /&gt;        &lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;Step 6: Override Create control method .And modify the code to reflect the user control file name. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Example class code:&lt;br /&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Text;&lt;br /&gt;using System.Web.UI.WebControls.WebParts;&lt;br /&gt;using System.Web.UI;&lt;br /&gt;&lt;br /&gt;namespace BasicWebParts&lt;br /&gt;{&lt;br /&gt;    public class UserControlWebPart:WebPart &lt;br /&gt;    {&lt;br /&gt;        Control cntrl;&lt;br /&gt;        protected override void CreateChildControls()&lt;br /&gt;        {&lt;br /&gt;            this.cntrl = this.Page.LoadControl(@"~/usercontrols/ucDisplay.ascx");&lt;br /&gt;            this.Controls.Add(this.cntrl);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Change only the ucDisplay.ascx  only to your user control.&lt;br /&gt;&lt;br /&gt;Step 7:  (Important) &lt;br /&gt;Add the below line to AssemblyInfo file located under Properties folder .&lt;br /&gt;[assembly: System.Security.AllowPartiallyTrustedCallers]  &lt;br /&gt;Better Add it at the end.&lt;br /&gt;&lt;br /&gt;Information: This related to security issue while inporting the Webpart by sharepoint. &lt;br /&gt;&lt;br /&gt;Step 8: Creating snk file.&lt;br /&gt;1.Open Application Properties as shown below Image. &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_yPsA-Y4pO1A/SvvOWAJMiJI/AAAAAAAAAJY/4DHrOtfclpk/s1600-h/webpart1.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 223px;" src="http://2.bp.blogspot.com/_yPsA-Y4pO1A/SvvOWAJMiJI/AAAAAAAAAJY/4DHrOtfclpk/s320/webpart1.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5403139055352055954" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2. Click on signing  Choose Strong name key  &lt;New …&gt;  as shown in below.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_yPsA-Y4pO1A/SvvO3xUoRKI/AAAAAAAAAJg/LTxCmh2zUU8/s1600-h/webpart2.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 260px;" src="http://1.bp.blogspot.com/_yPsA-Y4pO1A/SvvO3xUoRKI/AAAAAAAAAJg/LTxCmh2zUU8/s320/webpart2.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5403139635489031330" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3. Enter Project Name as snk file name and uncheck the Protect my key file with password.&lt;br /&gt;4. Click ok. And save the changes.  snk file got created.&lt;br /&gt;&lt;br /&gt;Step 9:  Build the Project.  Get the Dll.&lt;br /&gt;Step 10:  Extract public Key token.&lt;br /&gt;Open visual studio 2005 command prompt.&lt;br /&gt;Enter  sn –T “Path of the dll” &lt;br /&gt;Example: sn  -T “C:\Project1\bin\debug\Test.dll”&lt;br /&gt;Note the Public Key Token: it will be like example “fa29fd297c3b296b”&lt;br /&gt;Step 11:&lt;br /&gt;Add Safe Control Tag in Web.config of the site. To find web.config go to IIS server virtual directory and explore the same. &lt;br /&gt;By Default Location is like : C:\inetpub\wwwroot\wss\virtualdirectories\siteport&lt;br /&gt;Open Web.config  . Copy paste one safe control tag from their and modify the Assembly PublicKey token, Namespace.&lt;br /&gt;Example:&lt;br /&gt;&lt;SafeControl Assembly="BasicWebParts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=fa29fd297c3b296b" Namespace="BasicWebParts" TypeName="*" Safe="True" AllowRemoteDesigner="True" /&gt;&lt;br /&gt;&lt;br /&gt;Step 12: Deploy dlls and supporting files.&lt;br /&gt;1. Deploying User Control s&lt;br /&gt;2. Create a folder “usercontrol s” in the site root .&lt;br /&gt;Assume 1001 is the site port we created. Create the directory like below &lt;br /&gt;C:\inetpub\wwwroot\wss\virtualdirectories\1001\usercontrols.&lt;br /&gt;Step 13: Place ASCX controls to this folder.&lt;br /&gt;Step 14: Place WebpartDlls, WebUserControl dlls created from above steps into bin folder.&lt;br /&gt;&lt;br /&gt;Adding web part to the site:  &lt;br /&gt;&lt;br /&gt; Step 1: Open site - Click Site Actions - Site Settings - Webparts  Webpart gallery will open&lt;br /&gt;Step 2: Click New . New ly created webpart are displayed. Check the web part to add into current site.&lt;br /&gt;Step 3: Add web part from web part pane to any webpart page.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Note:&lt;/span&gt;&lt;br /&gt;rest of the activities whatever functionality/design we can change as it Usercontrols update to reference folder.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-6537768295979654959?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/6537768295979654959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/6537768295979654959'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/11/webpart-creation-deployment.html' title='WebPart Creation &amp; Deployment'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_yPsA-Y4pO1A/SvvOWAJMiJI/AAAAAAAAAJY/4DHrOtfclpk/s72-c/webpart1.JPG' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-5515345880322094364</id><published>2009-11-12T00:04:00.001-08:00</published><updated>2009-11-12T00:15:21.031-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sharepoint'/><title type='text'>SharePoint Architecture</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Server Architecture:&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_yPsA-Y4pO1A/SvvBrC36ERI/AAAAAAAAAJI/2BgO187T_aM/s1600-h/Sharepointarch.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 293px;" src="http://4.bp.blogspot.com/_yPsA-Y4pO1A/SvvBrC36ERI/AAAAAAAAAJI/2BgO187T_aM/s320/Sharepointarch.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5403125123210940690" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;1. The SPFarm object is the highest object within the Windows SharePoint Services object model hierarchy. The Servers property gets a collection representing all the servers in the deployment, and the Services property gets a collection representing all the services.&lt;br /&gt;2. Each SPServer object represents a physical server computer. The ServiceInstances property provides access to the set of individual service instances that run on the individual computer.&lt;br /&gt;3. Each SPService object represents a logical service or application installed in the server farm. A service object provides access to server farm-wide settings of the load-balanced service that a respective service instance implements. Derived types of the SPService class include, for example, objects for Windows services, such as the timer service, search, Microsoft SQL Server, the database service, etc. and also objects for Web services, such as Windows SharePoint Services or services in the Microsoft Office system. &lt;br /&gt;4. An SPWebService object provides access to configuration settings for a specific logical service or application. The WebApplications property gets the collection of Web applications that run the service.&lt;br /&gt;5. An SPDatabaseServiceInstance object represents a single instance of a database service running on the server computer. The SPDatabaseServiceInstance class derives from the SPServiceInstance class and thus inherits the Service property, which provides access to the service or application that the instance implements. The Databases property gets the collection of content databases used in the service.&lt;br /&gt;6. Each SPWebApplication object represents a load-balanced Web application based in Internet Information Services (IIS). The SPWebApplication object provides access to credentials and other server farm wide application settings. The Sites property gets the collection of site collections within the Web application, and the ContentDatabases property collection of content databases used in the Web application. The SPWebApplication class replaces the obsolete SPVirtualServer class; but it can still be helpful to think of a SPWebApplication object as a virtual server; that is, a set of one or more physical servers that appear as a single server to users.&lt;br /&gt;7. An SPContentDatabase object inherits from the SPDatabase class and represents a database that contains user data for a SharePoint Web application. The Sites property gets the collection of site collections for which the content database stores data, and the WebApplication property gets the parent Web application.&lt;br /&gt;8. An SPSiteCollection object represents the collection of site collections within the Web application. The Item property or indexer gets a specified site collection from the collection, and the Add method creates a site collection within the collection.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Site Architecture&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_yPsA-Y4pO1A/SvvB-TkkRVI/AAAAAAAAAJQ/bz_d1AkYLJo/s1600-h/sharepoint1.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 239px; height: 320px;" src="http://3.bp.blogspot.com/_yPsA-Y4pO1A/SvvB-TkkRVI/AAAAAAAAAJQ/bz_d1AkYLJo/s320/sharepoint1.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5403125454110737746" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;1. Each SPSiteobject, despite its singular name, represents a set of logically related SPWeb objects (see below). Such a set is commonly called a "site collection," but SPSite is not a standard Microsoft .NET collection class, in contrast to SPWebCollection. Rather, it has members that can be used to manage the site collection. The AllWebs property provides access to the SPWebCollection object that represents the collection of all Web sites within the site collection, including the top-level site. The Microsoft.SharePoint.SPSite.OpenWebmethod of the SPSite class returns a specific Web site.&lt;br /&gt;2. Each site collection includes any number of SPWeb objects, and each object has members that can be used to manage a site, including its template and theme, as well as to access files and folders on the site. The Webs property returns an SPWebCollection object that represents all the subsites of a specified site, and the Lists property returns an SPListCollection object that represents all the lists in the site. &lt;br /&gt;3. Each SPList object has members that are used to manage the list or access items in the list. The GetItems method can be used to perform queries that return specific items. The Fields property returns an SPFieldCollection object that represents all the fields, or columns, in the list, and the Items property returns an SPListItemCollection object that represents all the items, or rows, in the list.&lt;br /&gt;4. Each SPField object has members that contain settings for the field.&lt;br /&gt;5. Each SPListItem object represents a single row in the list.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-5515345880322094364?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://msdn.microsoft.com/en-us/library/ms473633.aspx' title='SharePoint Architecture'/><link rel='enclosure' type='' href='http://blog.sharepointhosting.com/Downloads/SharePoint-Tutorials.aspx' length='0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/5515345880322094364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/5515345880322094364'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/11/sharepoint-architecture.html' title='SharePoint Architecture'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_yPsA-Y4pO1A/SvvBrC36ERI/AAAAAAAAAJI/2BgO187T_aM/s72-c/Sharepointarch.JPG' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-2794832576664179382</id><published>2009-11-11T22:34:00.000-08:00</published><updated>2009-11-11T23:14:22.458-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sitefinity 3.7'/><title type='text'>Culture Specifcation, Activate PageworkFlow</title><content type='html'>1) To enable the culture, activate pageworkFlow&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_yPsA-Y4pO1A/SvuyQfgSgsI/AAAAAAAAAI4/IT3-YT7XR1g/s1600-h/P1.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 305px; height: 320px;" src="http://1.bp.blogspot.com/_yPsA-Y4pO1A/SvuyQfgSgsI/AAAAAAAAAI4/IT3-YT7XR1g/s320/P1.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5403108174365622978" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_yPsA-Y4pO1A/SvuyVYdozmI/AAAAAAAAAJA/3fe3gbI5mUY/s1600-h/P2.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 271px;" src="http://3.bp.blogspot.com/_yPsA-Y4pO1A/SvuyVYdozmI/AAAAAAAAAJA/3fe3gbI5mUY/s320/P2.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5403108258374798946" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2).cs file&lt;br /&gt;using System;&lt;br /&gt;using System.Web.UI.WebControls;&lt;br /&gt;using Telerik.Workflow;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using Telerik.Workflow.WebControls;&lt;br /&gt;using Telerik.Cms.Engine;&lt;br /&gt;using System.Net.Mail;&lt;br /&gt;using Telerik.Cms;&lt;br /&gt;using Telerik.Security;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public partial class Sitefinity_Admin_ControlTemplates_Pages_PageViewer : System.Web.UI.UserControl&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;    {&lt;br /&gt;        if (this.workflow.Controls.Count &gt; 0)&lt;br /&gt;            notificationArea.Visible = true;&lt;br /&gt;&lt;br /&gt;        workflow.Command += new CommandEventHandler(PageWorkflowMenu_Command);&lt;br /&gt;      &lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    void PageWorkflowMenu_Command(object sender, CommandEventArgs e)&lt;br /&gt;    {&lt;br /&gt;&lt;br /&gt;        &lt;br /&gt;        WorkflowInstance workflow = ((WorkflowMenu)sender).GetWorkflow();&lt;br /&gt;&lt;br /&gt;        if (workflow != null)&lt;br /&gt;        {&lt;br /&gt;&lt;br /&gt;            List&lt;EventActivity&gt; commands = new List&lt;EventActivity&gt;();&lt;br /&gt;&lt;br /&gt;            this.LoadCommands(commands, workflow.Activity.Activities);&lt;br /&gt;&lt;br /&gt;            int idx = int.Parse((string)e.CommandArgument);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            string strRole = string.Empty;            &lt;br /&gt;            &lt;br /&gt;&lt;br /&gt;            Telerik.Cms.CmsManager manager = new Telerik.Cms.CmsManager();&lt;br /&gt;&lt;br /&gt;            Telerik.Cms.ICmsPage page = manager.Provider.GetPageByWorkflow(workflow.ID);&lt;br /&gt;&lt;br /&gt;            System.Net.Mail.MailMessage mailMsg = new System.Net.Mail.MailMessage();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            mailMsg.IsBodyHtml = true;&lt;br /&gt;&lt;br /&gt;            switch (idx)&lt;br /&gt;            {&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                case 0:&lt;br /&gt;                    mailMsg.Subject = "page pending approval";&lt;br /&gt;                    strRole = "administrators";&lt;br /&gt;                    string relativeurl = page.DefaultUrl.Url;&lt;br /&gt;                    mailMsg.Body += String.Format("The '{0}' page has been sent for approval. Comments:" + hiddenTextArea.Value + "  To approve the page, please go to URL: http://{1}{2}?cmspagemode=edit", page.Name, System.Web.HttpContext.Current.Request.Url.Host, relativeurl.Substring(1));&lt;br /&gt;                    break;&lt;br /&gt;&lt;br /&gt;                case 1:&lt;br /&gt;&lt;br /&gt;                    mailMsg.Subject = "page approved";&lt;br /&gt;                    strRole = "Content Editor";&lt;br /&gt;                    mailMsg.Body += String.Format("The '{0}' page has been approved. Comments:" + hiddenTextArea.Value + "   To approve the page, please go to URL: http://{1}/Sitefinity/Admin/Pages.aspx", page.Name, System.Web.HttpContext.Current.Request.Url.Host);&lt;br /&gt;&lt;br /&gt;                    break;&lt;br /&gt;&lt;br /&gt;                case 2:&lt;br /&gt;&lt;br /&gt;                    mailMsg.Subject = "page declined";&lt;br /&gt;                    strRole = "Content Editor";&lt;br /&gt;                    mailMsg.Body += String.Format("The '{0}' page has been declined. Comments:" + hiddenTextArea.Value + "  ", page.Name, System.Web.HttpContext.Current.Request.Url.Host);&lt;br /&gt;&lt;br /&gt;                    break;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            if (!mailMsg.Subject.Equals(string.Empty))&lt;br /&gt;            {&lt;br /&gt;&lt;br /&gt;                string[] usernames = Telerik.Security.UserManager.Default.GetUsersInRole(strRole);&lt;br /&gt;                //For every user, send him or her an e-mail &lt;br /&gt;                foreach (string username in usernames)&lt;br /&gt;                {&lt;br /&gt;                    System.Web.Security.MembershipUser user = Telerik.Security.UserManager.Default.GetUser(username);&lt;br /&gt;                    mailMsg.To.Add(user.Email);&lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;                // Init SmtpClient and send      &lt;br /&gt;                System.Net.Mail.SmtpClient smtpClient = new System.Net.Mail.SmtpClient();&lt;br /&gt;                if (mailMsg.To.Count &lt;= 0)&lt;br /&gt;                    mailMsg.To.Add(mailMsg.From);&lt;br /&gt;&lt;br /&gt;                smtpClient.Send(mailMsg);&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    private void LoadCommands(List&lt;EventActivity&gt; commands, IList&lt;Activity&gt; activities)&lt;br /&gt;    {&lt;br /&gt;&lt;br /&gt;        foreach (Activity act in activities)&lt;br /&gt;        {&lt;br /&gt;&lt;br /&gt;            if (act is EventActivity)&lt;br /&gt;&lt;br /&gt;                commands.Add((EventActivity)act);&lt;br /&gt;&lt;br /&gt;            this.LoadCommands(commands, act.Activities);&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-2794832576664179382?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/2794832576664179382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/2794832576664179382'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/11/culture-specifcation-activate.html' title='Culture Specifcation, Activate PageworkFlow'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_yPsA-Y4pO1A/SvuyQfgSgsI/AAAAAAAAAI4/IT3-YT7XR1g/s72-c/P1.JPG' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-3680245022469769688</id><published>2009-11-11T22:02:00.000-08:00</published><updated>2009-11-11T23:39:23.506-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sitefinity 3.7'/><title type='text'>Adding Control to Module &amp; Data Fetch</title><content type='html'>If you would like to add the key value. in any inbuilt sitefinity module&lt;br /&gt;say for example. active check box on the module. while fetching a value based on the check pull the data.&lt;br /&gt;&lt;br /&gt;1)&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_yPsA-Y4pO1A/SvunEJWoKvI/AAAAAAAAAIo/3cZbWgDRBGU/s1600-h/NewsModule.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 178px;" src="http://2.bp.blogspot.com/_yPsA-Y4pO1A/SvunEJWoKvI/AAAAAAAAAIo/3cZbWgDRBGU/s320/NewsModule.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5403095867633183474" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2) while fetching the data to your userControl&lt;br /&gt;&lt;br /&gt;Namespace&lt;br /&gt;using Telerik.Cms;&lt;br /&gt;using Telerik.Newsletters;&lt;br /&gt;using Telerik.Notifications.Newsletters;&lt;br /&gt;using System.Collections;&lt;br /&gt;using Telerik.Cms.Engine;&lt;br /&gt;using Telerik.Cms.Web;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_yPsA-Y4pO1A/SvuolmafcAI/AAAAAAAAAIw/6kRvuwNM-u8/s1600-h/News.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 248px;" src="http://3.bp.blogspot.com/_yPsA-Y4pO1A/SvuolmafcAI/AAAAAAAAAIw/6kRvuwNM-u8/s320/News.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5403097541881327618" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3).cs&lt;br /&gt;&lt;br /&gt;  void GetAllNews()&lt;br /&gt;    {&lt;br /&gt;&lt;br /&gt;        NewsManager objnewsManager = new NewsManager("News");&lt;br /&gt;        IMetaSearchInfo[] filters = new IMetaSearchInfo[4];&lt;br /&gt;        filters[0] = new MetaSearchInfo(MetaValueTypes.DateTime, "Expiration_Date", DateTime.Now, SearchCondition.GreaterOrEqual);&lt;br /&gt;        filters[1] = new MetaSearchInfo(MetaValueTypes.ShortText, "Category", ConfigurationManager.AppSettings["NewsandPressrelease"].ToString());&lt;br /&gt;        filters[2] = new MetaSearchInfo(MetaValueTypes.Boolean, "Active",true);&lt;br /&gt;        filters[3] = new MetaSearchInfo(MetaValueTypes.Boolean, "English", false);&lt;br /&gt;        IList lstListOfNewsItems = objnewsManager.Content.GetContent("Publication_Date DESC", filters);&lt;br /&gt;        DataTable dtNewsValue = new DataTable();&lt;br /&gt;        dtNewsValue.Columns.Add("MoreURL");&lt;br /&gt;        dtNewsValue.Columns.Add("Publication_Date");&lt;br /&gt;        dtNewsValue.Columns.Add("Title");&lt;br /&gt;        dtNewsValue.Columns.Add("Thumbnail");&lt;br /&gt;        int icnt = 0;&lt;br /&gt;        QFCLib objQFCLib = new QFCLib();&lt;br /&gt;&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;&lt;br /&gt;            if (lstListOfNewsItems.Count &gt; 0)&lt;br /&gt;            {&lt;br /&gt;                foreach (IContent ICntNews in lstListOfNewsItems)&lt;br /&gt;                {&lt;br /&gt;                    string strImageURL = "";&lt;br /&gt;&lt;br /&gt;                    if (ICntNews.GetMetaData("Thumbnail").ToString() != "" &amp;&amp; ICntNews.GetMetaData("Thumbnail").ToString() != null)&lt;br /&gt;                    {&lt;br /&gt;                        strImageURL = objQFCLib.GetThumbnailURL(ICntNews.GetMetaData("Thumbnail").ToString()) + "?width=87&amp;height=79&amp;proportional=false&amp;decreaseOnly=true";&lt;br /&gt;                    }&lt;br /&gt;                    DateTime strPDate = Convert.ToDateTime(ICntNews.GetMetaData("Publication_Date"));&lt;br /&gt;                    if (strPDate &lt; DateTime.Now)&lt;br /&gt;                    {&lt;br /&gt;                            icnt = icnt + 1;&lt;br /&gt;                            dtNewsValue.Rows.Add(ConfigurationManager.AppSettings["NewsDetails"].ToString() + "?sNewsID=" + ICntNews.ID, strPDate.ToString("MM.dd.yyyy"), ICntNews.GetMetaData("Title"), strImageURL);&lt;br /&gt;                       &lt;br /&gt;                    }&lt;br /&gt;                    if (icnt == 5) break;&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            if (dtNewsValue.Rows.Count &gt; 0)&lt;br /&gt;            {&lt;br /&gt;                repeater.DataSource = dtNewsValue;&lt;br /&gt;                repeater.DataBind();&lt;br /&gt;                dtNewsValue.Dispose();&lt;br /&gt;             &lt;br /&gt;            }&lt;br /&gt;            else&lt;br /&gt;            {&lt;br /&gt;                lblMsg.Text = Resources.ARCommonResource.NoDataFound;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        catch (Exception ex)&lt;br /&gt;        {&lt;br /&gt;            AppLogger.LogError("GetAllNews Mediacenter() " + ex.Message, AppLogger.Severity.Error);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;4) protected void repeater_ItemDataBound(object sender, RepeaterItemEventArgs e)&lt;br /&gt;    {&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)&lt;br /&gt;            {&lt;br /&gt;                HtmlGenericControl newsThumbnailImgContainer = (HtmlGenericControl)e.Item.FindControl("newsThumbnailImgContainer");&lt;br /&gt;&lt;br /&gt;                if (((System.Data.DataRowView)(e.Item.DataItem)).Row.ItemArray[3].ToString() != "")&lt;br /&gt;                {&lt;br /&gt;                    newsThumbnailImgContainer.Visible = true;&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        catch (Exception ex)&lt;br /&gt;        {&lt;br /&gt;            AppLogger.LogError("DataBound MediaArchive() " + ex.Message, AppLogger.Severity.Error);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;5)if the content level if any images to get the image&lt;br /&gt; Add to the cs file &lt;br /&gt; #region " Sitefinity Method GetItemUrl "&lt;br /&gt;    public string GetItemUrl(string provider, Guid id, bool resolveAsAbsoluteUrl)&lt;br /&gt;    {&lt;br /&gt;        if (ContentManager.Providers.ContainsKey(provider))&lt;br /&gt;        {&lt;br /&gt;            IContent cnt = ContentManager.Providers[provider].GetContent(id);&lt;br /&gt;            if (cnt != null)&lt;br /&gt;                return VirtualPathUtility.ToAbsolute(cnt.UrlWithExtension, HttpContext.Current.Request.ApplicationPath);&lt;br /&gt;        }&lt;br /&gt;        else&lt;br /&gt;        {&lt;br /&gt;            ICmsUrlContext urlContext = UrlHelper.GetUrl(id);&lt;br /&gt;            if (urlContext != null)&lt;br /&gt;            {&lt;br /&gt;                SiteMapNode node = urlContext.GetSiteMapNode();&lt;br /&gt;                if (node != null)&lt;br /&gt;                    return VirtualPathUtility.ToAbsolute(node.Url,HttpContext.Current.Request.ApplicationPath);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        return String.Concat("Item not found: [", provider, "]", id); &lt;br /&gt;    }&lt;br /&gt;    #endregion&lt;br /&gt;  &lt;br /&gt;    #region " Get Thumbnail URL "&lt;br /&gt;    public string GetThumbnailURL(string pstrThumbnail)&lt;br /&gt;    {&lt;br /&gt;        &lt;br /&gt;       string[] strImage = pstrThumbnail.Split(']');&lt;br /&gt;       string strImageURL=string.Empty;&lt;br /&gt;       if (strImage.Length == 2)&lt;br /&gt;       {&lt;br /&gt;           Guid idImage = new Guid(strImage[1]);&lt;br /&gt;           strImageURL = GetItemUrl(strImage[0].Substring(1).ToString(), idImage, true);&lt;br /&gt;       }&lt;br /&gt;       else&lt;br /&gt;       {&lt;br /&gt;           return pstrThumbnail.Replace("~","");&lt;br /&gt;       }&lt;br /&gt;       return strImageURL;&lt;br /&gt;    }&lt;br /&gt;    #endregion&lt;br /&gt;strImageURL = objQFCLib.GetThumbnailURL(ICntNews.GetMetaData("Thumbnail").ToString()) + "?width=87&amp;height=79&amp;proportional=false&amp;decreaseOnly=true";&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;6)  Upload the above ascx on the page leve add controls via and drag.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-3680245022469769688?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/3680245022469769688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/3680245022469769688'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/11/adding-control-notification.html' title='Adding Control to Module &amp; Data Fetch'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_yPsA-Y4pO1A/SvunEJWoKvI/AAAAAAAAAIo/3cZbWgDRBGU/s72-c/NewsModule.JPG' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-520802945053132137</id><published>2009-11-11T21:30:00.000-08:00</published><updated>2009-11-11T23:39:23.507-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sitefinity 3.7'/><title type='text'>Sitefinity Admin Tools</title><content type='html'>Telerik Sitefinity is an ASP.NET 2.0-based Content Management System (CMS) that enables the construction of dynamic, fully editable Web sites.&lt;br /&gt;Sitefinity's out-of-the-box functionality, creating custom modules, and incorporating any ASP.NET 2.0 component in the site could be achieved by using Sitefinity APIs in the Visual Studio development environment.&lt;br /&gt;&lt;br /&gt;Default Modules provided by them we can edit add our own controls in the tools.&lt;br /&gt;&lt;br /&gt;Adding a Tools(Nothing but an customized module): our own control&lt;br /&gt;1) Create a table in the DB access the link via.&lt;br /&gt;&lt;br /&gt;SET ANSI_NULLS ON&lt;br /&gt;GO&lt;br /&gt;SET QUOTED_IDENTIFIER ON&lt;br /&gt;GO&lt;br /&gt;CREATE TABLE [dbo].[QFC_Module](&lt;br /&gt; [ModuleID] [int] IDENTITY(1,1) NOT NULL,&lt;br /&gt; [ModuleName] [nvarchar](255) NULL, -- UserMangement&lt;br /&gt; [ModulePath] [nvarchar](500) NULL, -- /ApplicationPath/Folder/UserList.aspx&lt;br /&gt; [Priority] [int] NULL, -- sequence&lt;br /&gt; CONSTRAINT [PK_QFC_Module] PRIMARY KEY CLUSTERED &lt;br /&gt;(&lt;br /&gt; [ModuleID] ASC&lt;br /&gt;)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]&lt;br /&gt;) ON [PRIMARY]&lt;br /&gt;&lt;br /&gt;2) Add a Values manually &lt;br /&gt;   ex; 1, UserMangement, /ApplicationPath/Folder/UserList.aspx, Order&lt;br /&gt;customized all modules admin would like to get in a CMS when login.&lt;br /&gt;&lt;br /&gt;3)Write sp to get the Modules.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_yPsA-Y4pO1A/Svujb-CLwiI/AAAAAAAAAIg/nXlIL9kcd3o/s1600-h/AdminComponent.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 136px;" src="http://4.bp.blogspot.com/_yPsA-Y4pO1A/Svujb-CLwiI/AAAAAAAAAIg/nXlIL9kcd3o/s320/AdminComponent.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5403091878864994850" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;4).cs back based on the role also we can hide the link position. should control in DB level&lt;br /&gt;&lt;br /&gt; if (!IsPostBack)&lt;br /&gt;        {&lt;br /&gt;            QFCLib objQFCLib = new QFCLib();&lt;br /&gt;            DataTable dtModules = objQFCLib.GetModules();&lt;br /&gt;            string strhtml = "";&lt;br /&gt;            try&lt;br /&gt;            {&lt;br /&gt;                if (dtModules.Rows.Count &gt; 0)&lt;br /&gt;                {&lt;br /&gt;                    foreach (DataRow dr in dtModules.Rows)&lt;br /&gt;                    {&lt;br /&gt;                        string strModuleName = dr["ModuleName"].ToString();&lt;br /&gt;                        Telerik.WebControls.RadWindow rw = new Telerik.WebControls.RadWindow();&lt;br /&gt;                        rw.Title = strModuleName;&lt;br /&gt;                        rw.ID = "RW" + dr["ModuleID"].ToString();&lt;br /&gt;                        rw.Height = Unit.Pixel(600);&lt;br /&gt;                        rw.Width = Unit.Pixel(800);&lt;br /&gt;                        rw.VisibleStatusbar = false;&lt;br /&gt;                        RadWindowManager1.Windows.Add(rw);&lt;br /&gt;                        strhtml += "&lt;li&gt;&lt;a href=\"#\" onclick=\"OpenRadWindow('" + dr["ModulePath"].ToString() + "','" + rw.ID + "')\"&gt;" + strModuleName + "&lt;/a&gt;&lt;/li&gt;";&lt;br /&gt;&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            catch (Exception ex)&lt;br /&gt;            {&lt;br /&gt;                AppLogger.LogError("PageLoad ModuleBinding() " + ex.Message, AppLogger.Severity.Error);&lt;br /&gt;            }&lt;br /&gt;            dtModules.Dispose();&lt;br /&gt;            ul_container.InnerHtml = strhtml;&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;5)Drag and drop the Usercontrol on sitefinity tools.aspx page. just deactivate all controls placed on the Page.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-520802945053132137?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.sitefinity.com' title='Sitefinity Admin Tools'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/520802945053132137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/520802945053132137'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/11/basics-of-sitefinity.html' title='Sitefinity Admin Tools'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_yPsA-Y4pO1A/Svujb-CLwiI/AAAAAAAAAIg/nXlIL9kcd3o/s72-c/AdminComponent.JPG' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-6667225388947928861</id><published>2009-10-23T02:25:00.000-07:00</published><updated>2009-10-23T02:51:16.141-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>Common Methods Arrange  as a Tools</title><content type='html'>Write the common Methods instead  refering  every time on the class file just drag and drop/ click on the  method any .cs file it refers  later can make as object (scenario for many parameters)&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_yPsA-Y4pO1A/SuF7jc7cR_I/AAAAAAAAAII/MONgVfii-Gg/s1600-h/Image1.JPEG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 206px;" src="http://1.bp.blogspot.com/_yPsA-Y4pO1A/SuF7jc7cR_I/AAAAAAAAAII/MONgVfii-Gg/s320/Image1.JPEG" border="0" alt=""id="BLOGGER_PHOTO_ID_5395729677557712882" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_yPsA-Y4pO1A/SuF8GCNdCaI/AAAAAAAAAIQ/Brghx6Sa7G0/s1600-h/Image2.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 208px;" src="http://1.bp.blogspot.com/_yPsA-Y4pO1A/SuF8GCNdCaI/AAAAAAAAAIQ/Brghx6Sa7G0/s320/Image2.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5395730271680924066" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_yPsA-Y4pO1A/SuF8QbgHygI/AAAAAAAAAIY/UVR_8e17AJM/s1600-h/Image3.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 240px; height: 83px;" src="http://4.bp.blogspot.com/_yPsA-Y4pO1A/SuF8QbgHygI/AAAAAAAAAIY/UVR_8e17AJM/s320/Image3.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5395730450268801538" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-6667225388947928861?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/6667225388947928861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/6667225388947928861'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/10/common-methods-arrange-as-tools.html' title='Common Methods Arrange  as a Tools'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_yPsA-Y4pO1A/SuF7jc7cR_I/AAAAAAAAAII/MONgVfii-Gg/s72-c/Image1.JPEG' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-6132703059831231397</id><published>2009-10-19T23:09:00.000-07:00</published><updated>2009-10-21T05:03:21.824-07:00</updated><title type='text'>DropdownList Apply Colors for Category</title><content type='html'>if(!ispostback)&lt;br /&gt;{&lt;br /&gt;   BindDll()&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;void BindDll()&lt;br /&gt; {   &lt;br /&gt;    SqlConnection mycn;&lt;br /&gt;            SqlDataAdapter myda;&lt;br /&gt;            DataTable  dt;&lt;br /&gt;            String strConn;            &lt;br /&gt;            strConn = ConfigurationManager.ConnectionStrings["connString"].ConnectionString;&lt;br /&gt;            mycn = new SqlConnection(strConn);&lt;br /&gt;            myda = new SqlDataAdapter ("Select * FROM Category", mycn);&lt;br /&gt;            dt = new DataTable();&lt;br /&gt;            myda.Fill(dt);&lt;br /&gt;            DropDownList1.DataSource = dt;&lt;br /&gt;            DropDownList1.DataTextField = "CategoryName";&lt;br /&gt;            DropDownList1.DataValueField ="CategoryId";&lt;br /&gt;            DropDownList1.DataBind () ;&lt;br /&gt;            for (int i =0;i &lt; DropDownList1.Items.Count ;i++ )&lt;br /&gt;            {               &lt;br /&gt;                DropDownList1.Items[i].Attributes.Add("style", "color:" + dt.Rows[i]["Color"].ToString());&lt;br /&gt;            }&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;If the ddl is available in a grid set the property on grid onRowDatabound.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-6132703059831231397?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/6132703059831231397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/6132703059831231397'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/10/dropdownlist-apply-colors-for-category.html' title='DropdownList Apply Colors for Category'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-1565028071296792171</id><published>2009-10-13T04:58:00.000-07:00</published><updated>2009-10-13T05:05:34.665-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>.Csv File Reader</title><content type='html'>Read .csv File add to dataTable&lt;br /&gt;&lt;br /&gt;Create a CSVReader.cs&lt;br /&gt;&lt;br /&gt; using System;&lt;br /&gt; using System.Data;&lt;br /&gt; using System.Configuration;&lt;br /&gt; using System.Web;&lt;br /&gt; using System.Web.Security;&lt;br /&gt; using System.Web.UI;&lt;br /&gt; using System.Web.UI.WebControls;&lt;br /&gt; using System.Web.UI.HtmlControls;&lt;br /&gt; using System.IO;&lt;br /&gt; using System.Text;&lt;br /&gt; using System.Collections;&lt;br /&gt;&lt;br /&gt; public class CSVReader&lt;br /&gt;&lt;br /&gt; {&lt;br /&gt;     private Stream objStream;&lt;br /&gt;     private StreamReader objReader;&lt;br /&gt;&lt;br /&gt;     #region CSVFileReader&lt;br /&gt;     // CSV File Read&lt;br /&gt;     public CSVReader(Stream filestream) : this(filestream, null) { }&lt;br /&gt;&lt;br /&gt;     public CSVReader(Stream filestream, Encoding enc)&lt;br /&gt;     {&lt;br /&gt;         try&lt;br /&gt;         {&lt;br /&gt;&lt;br /&gt;             this.objStream = filestream;&lt;br /&gt;             if (!filestream.CanRead)&lt;br /&gt;             {&lt;br /&gt;                 return;&lt;br /&gt;             }&lt;br /&gt;             objReader = (enc != null) ? new StreamReader(filestream, enc) : new StreamReader(filestream);&lt;br /&gt;         }&lt;br /&gt;         catch(Exception ex)&lt;br /&gt;         {&lt;br /&gt;             AppLogger.LogError("CSVReader" + ex.Message, AppLogger.Severity.Error);&lt;br /&gt;         }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;     public string[] GetCSVLine()&lt;br /&gt;     {&lt;br /&gt;             string data = objReader.ReadLine();             &lt;br /&gt;             data = data.Replace("\t", "\",\"");           &lt;br /&gt;             if (!data.StartsWith("\""))&lt;br /&gt;             {&lt;br /&gt;                 data = "\"" + data + "\"";&lt;br /&gt;             }&lt;br /&gt;             &lt;br /&gt;             if (data == null) return null;&lt;br /&gt;             if (data.Length == 0) return new string[0];&lt;br /&gt;             ArrayList result = new ArrayList();&lt;br /&gt;             ParseCSVData(result, data);&lt;br /&gt;             return (string[])result.ToArray(typeof(string));         &lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt;     private void ParseCSVData(ArrayList result, string data)&lt;br /&gt;    {&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;            int position = -1;&lt;br /&gt;            while (position &lt; data.Length)&lt;br /&gt;            result.Add(ParseCSVField(ref data, ref position));&lt;br /&gt;        }&lt;br /&gt;        catch(Exception ex)&lt;br /&gt;        {&lt;br /&gt;            AppLogger.LogError("ParseCSVData" + ex.Message, AppLogger.Severity.Error);&lt;br /&gt;        }&lt;br /&gt;    }   &lt;br /&gt;  &lt;br /&gt;     private string ParseCSVField(ref string data, ref int StartSeperatorPos)&lt;br /&gt;     {        &lt;br /&gt;             if (StartSeperatorPos == data.Length - 1)&lt;br /&gt;             {&lt;br /&gt;                 StartSeperatorPos++;&lt;br /&gt;                 return "";&lt;br /&gt;             }&lt;br /&gt;             int fromPos = StartSeperatorPos + 1;&lt;br /&gt;             if (data[fromPos] == '"')&lt;br /&gt;             {&lt;br /&gt;                 int nextSingleQuote = GetSingleQuote(data, fromPos + 1);&lt;br /&gt;                 int lines = 1;&lt;br /&gt;                 while (nextSingleQuote == -1)&lt;br /&gt;                 {&lt;br /&gt;                     data = data + "\n" + objReader.ReadLine();&lt;br /&gt;                     nextSingleQuote = GetSingleQuote(data, fromPos + 1);&lt;br /&gt;                     lines++;&lt;br /&gt;                     if (lines &gt; 20)&lt;br /&gt;&lt;br /&gt;                         throw new Exception("lines overflow: " + data);&lt;br /&gt;                 }&lt;br /&gt;&lt;br /&gt;                 StartSeperatorPos = nextSingleQuote + 1;&lt;br /&gt;                 string tempString = data.Substring(fromPos + 1, nextSingleQuote - fromPos - 1);&lt;br /&gt;                 tempString = tempString.Replace("'", "''");&lt;br /&gt;                 return tempString.Replace("\"\"", "\"");&lt;br /&gt;             }&lt;br /&gt;&lt;br /&gt;             int nextComma = data.IndexOf(',', fromPos);&lt;br /&gt;             if (nextComma == -1)&lt;br /&gt;             {&lt;br /&gt;                 StartSeperatorPos = data.Length;&lt;br /&gt;                 return data.Substring(fromPos);&lt;br /&gt;             }&lt;br /&gt;             else&lt;br /&gt;             {&lt;br /&gt;                 StartSeperatorPos = nextComma;&lt;br /&gt;                 return data.Substring(fromPos, nextComma - fromPos);&lt;br /&gt;             }         &lt;br /&gt;     }&lt;br /&gt; &lt;br /&gt;     private int GetSingleQuote(string data, int SFrom)&lt;br /&gt;     {&lt;br /&gt;         try&lt;br /&gt;         {&lt;br /&gt;             int i = SFrom - 1;&lt;br /&gt;             while (++i &lt; data.Length)&lt;br /&gt;                 if (data[i] == '"')&lt;br /&gt;                 {&lt;br /&gt;                     if (i &lt; data.Length - 1 &amp;&amp; data[i + 1] == '"')&lt;br /&gt;                     {&lt;br /&gt;                         i++;&lt;br /&gt;                         continue;&lt;br /&gt;                     }&lt;br /&gt;                     else&lt;br /&gt;                     {&lt;br /&gt;                         return i;&lt;br /&gt;                     }&lt;br /&gt;                 }&lt;br /&gt;         }&lt;br /&gt;         catch(Exception ex)&lt;br /&gt;         {&lt;br /&gt;             AppLogger.LogError("GetSingleQuote" + ex.Message, AppLogger.Severity.Error);&lt;br /&gt;         }&lt;br /&gt;&lt;br /&gt;        return -1;&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;    #endregion&lt;br /&gt;&lt;br /&gt;    #region destructor&lt;br /&gt;     ~CSVReader()&lt;br /&gt;    {}&lt;br /&gt;    #endregion&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; DataTable dtUser = new DataTable();&lt;br /&gt;&lt;br /&gt;        int[] iColumns = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };&lt;br /&gt;        int iUpdate = 0;&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;           //fexport.PostedFile.InputStream --&gt; Directly reading .csv file from .net file uploader. &lt;br /&gt;            CSVReader objreader = new CSVReader(fexport.PostedFile.InputStream);&lt;br /&gt;            string[] strheaders = objreader.GetCSVLine();&lt;br /&gt;&lt;br /&gt;            foreach (string strHeader in strheaders)&lt;br /&gt;            {&lt;br /&gt;                dtUser.Columns.Add(strHeader);&lt;br /&gt;            }&lt;br /&gt;            string[] struserData;&lt;br /&gt;            while ((struserData = objreader.GetCSVLine()) != null)&lt;br /&gt;                dtUser.Rows.Add(struserData);&lt;br /&gt;        }&lt;br /&gt;        catch (Exception exe)&lt;br /&gt;        {&lt;br /&gt;            lblMsg.Text = "Check the CSV Data Sheet Format.";            &lt;br /&gt;            AppLogger.LogError("csv sheet DataRead()QNews " + exe.Message, AppLogger.Severity.Error);&lt;br /&gt;        }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-1565028071296792171?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/1565028071296792171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/1565028071296792171'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/10/csv-file-reader.html' title='.Csv File Reader'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-4028266630127909872</id><published>2009-09-11T00:13:00.000-07:00</published><updated>2009-09-11T00:19:08.537-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>SQL Paging</title><content type='html'>&lt;strong&gt;Using Stored Procedure Managing Pagination&lt;/strong&gt;&lt;br /&gt;CREATE PROCEDURE SPName &lt;br /&gt;   @PageNum int,&lt;br /&gt;   @PageSize int&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt;SET NOCOUNT ON;&lt;br /&gt;WITH OrdersRN &lt;br /&gt;AS&lt;br /&gt;(&lt;br /&gt;    SELECT ROW_NUMBER() OVER(ORDER BY createdatetime desc) AS RowNum ,NewsId,Title,createdatetime        &lt;br /&gt;      FROM bdl_news&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;SELECT *   FROM OrdersRN WHERE RowNum BETWEEN ((@PageNum - 1) * @PageSize + 1 )  AND (@PageNum * @PageSize ) ORDER BY createdatetime desc&lt;br /&gt;    &lt;br /&gt;end&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-4028266630127909872?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/4028266630127909872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/4028266630127909872'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/09/sql-paging.html' title='SQL Paging'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-3265900556769140905</id><published>2009-08-26T05:29:00.000-07:00</published><updated>2009-08-26T05:45:47.399-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Articles'/><title type='text'>Remoting</title><content type='html'>http://www.devx.com/dotnet/Article/7002&lt;br /&gt;&lt;strong&gt;Introduction:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Remoting is a means by which one operating system process, or program, can communicate with another process. The two processes can exist on the same computer or on two computers connected by a LAN or the Internet. Communicating between two programs may seem like a big "so what," but it's a rather involved process.&lt;br /&gt;&lt;br /&gt;In any operating system, two paramount goals are security and stability. One way to achieve these goals is to load each executing program into its own process. By design, processes are isolated from each other—the code in one process cannot access the code or data of another process. That design enhances security by preventing one program from snooping around where it does not have access rights, and it enhances stability by ensuring that problems in one program cannot inadvertently corrupt the memory space of another program or of the operating system itself. The .NET Framework provides an additional level of isolation with application domains, which permit two or more programs to run within the same process, maintaining the same level of isolation as if they were in separate processes while minimizing the overhead of multiple processes. &lt;br /&gt;&lt;br /&gt;Web services are probably the best known type of remoting, but they are not your only option.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;While the need for isolation between processes is clear, the fact remains that separate programs sometimes do need to communicate. The emphasis on distributed computing and scalability makes this need even more prevalent today. The .NET Framework provides several method for cross-process communication, collectively called remoting. Web services are probably the best known type of remoting, but they are not your only option. In this article you'll see an overview of .NET remoting technologies that may help you choose between the various remoting options&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Marshal by Value or by Reference :&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Marshal by value: the server creates a copy of the object passes the copy to the client. &lt;br /&gt;Marshal by reference: the client creates a proxy for the object and then uses the proxy to access the object.&lt;br /&gt;&lt;br /&gt;When a client makes a call to an object marshaled by value (MBV), the server creates an exact copy and sends that copy to the client. The client can then use the object's data and executable functionality directly within its own process or application domain without making additional calls to the server. To implement MBV you must either implement the ISerializable interface in your classes, or mark them with the &lt;serializable()&gt; attribute. &lt;br /&gt;&lt;br /&gt;In contrast, when a client makes a call to an object marshaled by reference (MBR), the .NET framework creates a proxy in the client's application domain and the client uses that proxy to access the original object on the server. To implement MBR a class must, at minimum, extend the System.MarshalByRefObject class. Figure 1 illustrates the differences between MBV and MBR.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Given the differences between MBV and MBR, how do you decide which to use when you're programming a remotable class? In some situations you have no choice—you must use MBR, such as when the remote component must run in its own original app domain, in order to access local files or use operating system handles. These operations could not be carried out by a copy of the object running in the client's app domain. You would also need to use MBR when the client must be made aware of changes in the object. When using MBV the copy of the object that is sent to the client is static, and does not reflect subsequent changes to the state of the object on the server. &lt;br /&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;In many situations, however, either MBV or MBR will work, and the question is which is better? The concern here is that old bugaboo—bandwidth. Ask yourself which technique places fewer demands on the transport between server and client? With MBV you need move the object copy from the server to the client one time. While that can be a significant task with large objects, after the copy is at the client, calls to it are all within the client's app domain and do not involve the transport mechanism at all. &lt;br /&gt;&lt;br /&gt;In contrast, MBR does not require a copy of the entire object to be transported to the client—but each and every time the client accesses the remote object it requires either a one-way or round-trip transport of information. Individually these calls may not place a heavy demand on communication, but hundreds or thousands of calls can add up. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Channels:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;HttpChannel: Implements a channel that uses the HTTP protocol. &lt;br /&gt;TcpChannel: Implements a channel that uses the TCP protocol (Transmission Control Protocol). &lt;br /&gt;Both of these classes are dual-purpose in that they implement both a client channel, used on the client side to communicate with remote objects, and a server channel, used on the server side to communicate with clients. The HttpChannel class formats messages using the SOAP protocol, which encodes communications as XML. In contrast the TcpChannel class uses a binary format for messages. While binary formatting is more efficient (formatted messages are smaller), the plain text format of SOAP is much less likely to have problems with firewalls and other network security measures. &lt;br /&gt;&lt;br /&gt;When you create a server—that is, a remotable class—you also define and register one or more channels for the class and associate each channel with a specific port. By registering a channel/port combination you tell the .NET infrastructure to listen on that port for messages intended for that channel. When a message arrives, the framework routes it to the correct server object. Figure 2 illustrates how the client and server communicate. Note that when you're using remoting on a single system, the port numbers used by the client and server cannot be the same, because you can use a given port only once.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Demonstration:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This demonstration program presents a simple remoting example. It illustrates the basic tasks involved in creating a remotable class, a server, and a client. To help keep things easy to understand, the demo makes use of .NET command line applications and the command-line compiler, but the same principles apply when you use remoting with other application types. To work with the demo, open a Visual Studio .NET (VS.NET) command prompt from the Start menu by selecting Microsoft Visual Studio .NET, then selecting Visual Studio .NET Tools, and finally Visual Studio .NET Command Prompt. The Command Prompt window opened by this command is like any other Windows command prompt but has the necessary environment and path variables set to let you use the VS.net command line compilers. Create a folder for the project, and make that folder current. &lt;br /&gt;&lt;br /&gt;The remotable class (called RemoteClass) contains a single method that returns a "secret" word to the caller. The class constructor displays a console message when a client activates the class. I've included the console message for demonstration purposes only; it's not required for the class to function. Listing 1 shows the source code for the RemoteClass. Note that the only aspect of the class related to remoting is that it inherits from MarshalByRefObject. You can create the demo code using any text editor and then save it in the project folder under the name RemoteClass.cs. Then, from the command prompt, compile the class using the following command (enter the command on a single line): &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   csc /t:library /debug /r:System.Runtime.Remoting.dll &lt;br /&gt;      RemoteClass.cs&lt;br /&gt; The class compiles to the file RemoteClass.dll. &lt;br /&gt;&lt;br /&gt;Creates a new TcpChannel on port 8085. Note that this is the same channel on which the client will look for the remotable class. &lt;br /&gt;Registers the channel with the .NET infrastructure. &lt;br /&gt;Registers the remotable class using a call to the RemotingConfiguration.RegisterWellKnownServiceType() method. The arguments to this call are: &lt;br /&gt;The first argument identifies the class being registered. &lt;br /&gt;The second argument specifies the URI for the class. A client will use this URI when looking for the class. &lt;br /&gt;The third argument specifies that if there are multiple calls to the class (from more than one client), they will all be services by the same instance of the class. &lt;br /&gt;Display a message to the user and then pause until the user presses Enter. &lt;br /&gt;&lt;br /&gt;Step 4 is required because the server must be executing to do its job. In other words, only while the server program is running will it "listen" for client requests for the remotable class. &lt;br /&gt;&lt;br /&gt;To complete the server, save the code from Listing 3 as Server.cs and compile it with the following command line (enter the command on a single line): &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   csc /debug /r:remoteclass.dll &lt;br /&gt;      /r:System.Runtime.Remoting.dll Server.cs&lt;br /&gt; Assuming all three parts of the project compiled successfully, you can test the program as follows. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Open a second Command Prompt window and change to the project folder. You will now have two Command Prompt windows open (the need for this will become clear in a moment). &lt;br /&gt;In one of the windows enter "Server" to execute the server program. It will display the message "Hit &lt;enter&gt; to exit...". The server is now waiting, listening for client requests for the remotable class. &lt;br /&gt;In the other Command prompt window enter "Client" to execute the client program. You'll see two things happen: &lt;br /&gt;The client window displays the message "The secret word is REMOTING", and the client program terminates. &lt;br /&gt;The server window displays the message "MyRemoteClass activated", signaling that a client activated the remote class. &lt;br /&gt;To terminate the server, switch to the server window and press Enter. &lt;br /&gt;You've seen a simple example introducing you to the .NET Framework's remoting capabilities. Given the power of remoting, the relative ease with which you can accomplished it comes as a welcome surprise to many developers. While few real-world scenarios are as simple as the demonstration program presented here, the principles remain the same.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-3265900556769140905?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.devx.com/dotnet/Article/7002' title='Remoting'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/3265900556769140905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/3265900556769140905'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/08/remoting.html' title='Remoting'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-4635039380467817151</id><published>2009-07-27T02:31:00.000-07:00</published><updated>2009-07-27T02:35:46.324-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><title type='text'>Return XML File</title><content type='html'>Get the data from datatable/list, write it in a xml format.&lt;br /&gt;&lt;br /&gt;using System.Data.SqlClient;&lt;br /&gt;using System.IO;&lt;br /&gt;using System.Xml;&lt;br /&gt;using System.Text;&lt;br /&gt;&lt;br /&gt;protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;    {&lt;br /&gt;        ReturnProductDetailsCollections();&lt;br /&gt;    }&lt;br /&gt;    void ReturnProductDetailsCollections()&lt;br /&gt;    {&lt;br /&gt;        Response.Cache.SetExpires(DateTime.Now.AddSeconds(-60));&lt;br /&gt;        PGILib objPGLib = new PGILib();&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;            int CollectionID;&lt;br /&gt;            StringWriter sw = new StringWriter();&lt;br /&gt;            XmlTextWriter writer = new XmlTextWriter(sw);&lt;br /&gt;            if (Request.QueryString["ProductID"] != null &amp;&amp; Request.QueryString["LanguageID"] != null)&lt;br /&gt;            {&lt;br /&gt;                CollectionID = Convert.ToInt32(Request.QueryString["ProductID"]);&lt;br /&gt;                int iLanguageID = Convert.ToInt32(Request.QueryString["LanguageID"]);&lt;br /&gt;&lt;br /&gt;                string Currentlang = "";&lt;br /&gt;                DataTable dtCurrentlang = new DataTable();&lt;br /&gt;                dtCurrentlang = objPGLib.Script_GetLanguageName(iLanguageID);&lt;br /&gt;                if (dtCurrentlang.Rows.Count &gt; 0)&lt;br /&gt;                {&lt;br /&gt;                    foreach (DataRow dr in dtCurrentlang.Rows)&lt;br /&gt;                    {&lt;br /&gt;                        Currentlang = dr["LanguageShortName"].ToString();&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;                int CategoryID = objPGLib.getCollectionCategoryIDByMarket(iLanguageID); &lt;br /&gt;&lt;br /&gt;                writer.WriteStartElement("designgallery");&lt;br /&gt;                writer.WriteAttributeString("Result", "Success");&lt;br /&gt;                DataTable dtProductCollection = new DataTable();&lt;br /&gt;&lt;br /&gt;                dtProductCollection = objPGLib.Script_GetDesignerCollections(CollectionID,CategoryID);&lt;br /&gt;                if (dtProductCollection.Rows.Count &gt; 0)&lt;br /&gt;                {&lt;br /&gt;                    foreach (DataRow dr1 in dtProductCollection.Rows)&lt;br /&gt;                    {&lt;br /&gt;                        string strpPath = ConfigurationManager.AppSettings["UploadLocation"].ToString() + dr1["SmallThumbnailPath"].ToString();&lt;br /&gt;                        writer.WriteStartElement("product");&lt;br /&gt;                        writer.WriteAttributeString("productid", dr1["ProductID"].ToString());&lt;br /&gt;                        writer.WriteAttributeString("smallthumbnail", strpPath);&lt;br /&gt;                        writer.WriteAttributeString("name", dr1["ProductName"].ToString());&lt;br /&gt;                        writer.WriteAttributeString("designer", dr1["FirstName"].ToString());&lt;br /&gt;                        writer.WriteEndElement();&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            else&lt;br /&gt;            {&lt;br /&gt;                writer.WriteStartElement("designgallery");&lt;br /&gt;                writer.WriteAttributeString("Result", "Failure");&lt;br /&gt;&lt;br /&gt;            }&lt;br /&gt;                 &lt;br /&gt;          &lt;br /&gt;            &lt;br /&gt;            writer.WriteEndElement();&lt;br /&gt;            Response.ContentType = "text/xml";&lt;br /&gt;            Response.ContentEncoding = Encoding.UTF8;&lt;br /&gt;            Response.Write(sw);&lt;br /&gt;        }&lt;br /&gt;        catch (Exception ex)&lt;br /&gt;        {&lt;br /&gt;            AppLogger.LogError("Designer Gallery Product ReturnProductDetailsCollections(based on designerid) " + ex.Message, AppLogger.Severity.Error);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-4635039380467817151?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/4635039380467817151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/4635039380467817151'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/07/return-xml-file.html' title='Return XML File'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-3288702138610291640</id><published>2009-07-27T02:07:00.000-07:00</published><updated>2009-07-27T02:29:40.330-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>Rss Feeds in asp.net</title><content type='html'>To write the Rss Contents from list/datatable.&lt;br /&gt;&lt;br /&gt;steps to follow:&lt;br /&gt;&lt;br /&gt;Get the all the item (ex: news in a list/datatable loop through the items bind in the rss feeds format)&lt;br /&gt;&lt;br /&gt;refer the attached image.&lt;br /&gt;&lt;br /&gt;image 1&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_yPsA-Y4pO1A/Sm1y8S-8MrI/AAAAAAAAAHY/pH-e-TxNyUA/s1600-h/Rss1.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 196px;" src="http://1.bp.blogspot.com/_yPsA-Y4pO1A/Sm1y8S-8MrI/AAAAAAAAAHY/pH-e-TxNyUA/s320/Rss1.jpeg" border="0" alt=""id="BLOGGER_PHOTO_ID_5363069111481676466" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;image 2&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_yPsA-Y4pO1A/Sm1zMf5QgcI/AAAAAAAAAHg/vP78lZnhDBg/s1600-h/Rss2.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 257px;" src="http://1.bp.blogspot.com/_yPsA-Y4pO1A/Sm1zMf5QgcI/AAAAAAAAAHg/vP78lZnhDBg/s320/Rss2.jpeg" border="0" alt=""id="BLOGGER_PHOTO_ID_5363069389825409474" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;C#Code:&lt;br /&gt;&lt;br /&gt; protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;    {&lt;br /&gt;        this.Context.Response.ContentType = "text/xml";&lt;br /&gt;        this.Context.Response.ContentEncoding = Encoding.UTF8;&lt;br /&gt;        ShowHeader(this.Context);&lt;br /&gt;        NewsManager newsManager = new Telerik.News.NewsManager("News");&lt;br /&gt;        IList listOfNewsItems = newsManager.Content.GetContent();&lt;br /&gt;        if (listOfNewsItems.Count &gt; 0)&lt;br /&gt;        {&lt;br /&gt;            foreach (IContent ICntNews in listOfNewsItems)&lt;br /&gt;            {&lt;br /&gt;                DateTime strPDate = Convert.ToDateTime(ICntNews.GetMetaData("Publication_Date"));&lt;br /&gt;                if (strPDate &lt; DateTime.Now)&lt;br /&gt;                {&lt;br /&gt;                    ShowItem(this.Context, ICntNews);&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        ShowFooter(this.Context);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    private void ShowItem(HttpContext context, Telerik.Cms.Engine.IContent content)&lt;br /&gt;    {&lt;br /&gt;        context.Response.Write("&lt;item&gt;");&lt;br /&gt;        context.Response.Write(string.Format("&lt;title&gt;{0}&lt;/title&gt;", content.GetMetaData("Title")));        &lt;br /&gt;        DateTime dtPubdate = Convert.ToDateTime(content.GetMetaData("Publication_Date"));&lt;br /&gt;        context.Response.Write(string.Format("&lt;pubDate&gt;{0}&lt;/pubDate&gt;", dtPubdate.ToString("ddd, dd MMM yyyy hh:mm:ss GMT")));&lt;br /&gt;        context.Response.Write(string.Format("&lt;description&gt;{0}&lt;/description&gt;", content.GetMetaData("Summary")));&lt;br /&gt;        context.Response.Write(string.Format("&lt;link&gt;{0}://{1}{2}&lt;/link&gt;", context.Request.Url.Scheme, context.Request.Url.Authority, ConfigurationManager.AppSettings["NewsDetails"].ToString() + "?sNewsID=" + content.ID));        &lt;br /&gt;        context.Response.Write(string.Format("&lt;guid isPermaLink=\"false\"&gt;{0}&lt;/guid&gt;", content.ID));        &lt;br /&gt;        context.Response.Write("&lt;/item&gt;");&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    private void ShowHeader(HttpContext context)&lt;br /&gt;    {&lt;br /&gt;        context.Response.Write("&lt;?xml version=\"1.0\" ?&gt;");&lt;br /&gt;        context.Response.Write("&lt;rss version=\"2.0\"&gt;");&lt;br /&gt;        context.Response.Write("&lt;channel&gt;");&lt;br /&gt;        context.Response.Write("&lt;title&gt;QFC Authority news&lt;/title&gt; ");&lt;br /&gt;        context.Response.Write("&lt;description&gt;News headlines&lt;/description&gt; ");&lt;br /&gt;        context.Response.Write("&lt;link&gt;http://www.qfc.com.qa/&lt;/link&gt; ");&lt;br /&gt;        context.Response.Write("&lt;docs&gt;http://backend.userland.com/rss&lt;/docs&gt; "); &lt;br /&gt;        context.Response.Write(Environment.NewLine);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    private void ShowFooter(HttpContext context)&lt;br /&gt;    {&lt;br /&gt;        context.Response.Write("&lt;/channel&gt;");&lt;br /&gt;        context.Response.Write("&lt;/rss&gt;");&lt;br /&gt;    } &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-3288702138610291640?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/3288702138610291640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/3288702138610291640'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/07/rss-feeds-in-aspnet.html' title='Rss Feeds in asp.net'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_yPsA-Y4pO1A/Sm1y8S-8MrI/AAAAAAAAAHY/pH-e-TxNyUA/s72-c/Rss1.jpeg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-8583242419905545437</id><published>2009-07-10T01:43:00.000-07:00</published><updated>2009-10-21T21:54:42.996-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>Open outlook and add reciepient emailid</title><content type='html'>To send mail call the below method in .Net.&lt;br /&gt;1)&lt;br /&gt;using System.Web.Mail;&lt;br /&gt;    public Boolean SendMail(string pstrFrom, string pstrTo, string pstrSubject, string pstrBody)&lt;br /&gt;    {&lt;br /&gt;        Boolean Result = false;&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;            MailMessage omsg = new MailMessage();&lt;br /&gt;            omsg.From = pstrFrom;&lt;br /&gt;            omsg.To = pstrTo;&lt;br /&gt;            omsg.Subject = pstrSubject;&lt;br /&gt;            omsg.Body = pstrBody;&lt;br /&gt;            omsg.Priority = MailPriority.High;&lt;br /&gt;            omsg.BodyFormat = MailFormat.Html;&lt;br /&gt;            SmtpMail.SmtpServer = "";&lt;br /&gt;            SmtpMail.Send(omsg);&lt;br /&gt;            Result = true;&lt;br /&gt;        }&lt;br /&gt;        catch (Exception ex)&lt;br /&gt;        {&lt;br /&gt;            Result = false;&lt;br /&gt;            AppLogger.LogError("SendMail(4 parameters): " + ex.Message, AppLogger.Severity.Error);&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;        return Result;&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;2)To open a outlook.&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_yPsA-Y4pO1A/SlcBoEjT2mI/AAAAAAAAAHQ/kwYB-mT4-ps/s1600-h/mail.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 121px;" src="http://1.bp.blogspot.com/_yPsA-Y4pO1A/SlcBoEjT2mI/AAAAAAAAAHQ/kwYB-mT4-ps/s320/mail.jpeg" border="0" alt=""id="BLOGGER_PHOTO_ID_5356752069708733026" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-8583242419905545437?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/8583242419905545437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/8583242419905545437'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/07/opens-outlook-and-adds-reciepients-to.html' title='Open outlook and add reciepient emailid'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_yPsA-Y4pO1A/SlcBoEjT2mI/AAAAAAAAAHQ/kwYB-mT4-ps/s72-c/mail.jpeg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-5782242890648974360</id><published>2009-07-08T22:55:00.000-07:00</published><updated>2009-07-08T23:01:01.931-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>DateFormat</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Standard Formats:&lt;/span&gt;&lt;br /&gt;The following table lists the standard format characters for internationally accepted standard patterns. The format characters are case-sensitive; for example, 'g' and 'G' represent slightly different patterns. Note that on the whole the format handling of the DateTimePicker is almost identical to that of the associated Culture.DateTimeFormatInfo instance, the main exception being that day names "dddd" are not used anywhere.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_yPsA-Y4pO1A/SlWGzk3gEOI/AAAAAAAAAHA/TMELES3Cq84/s1600-h/DateFormat.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 126px;" src="http://2.bp.blogspot.com/_yPsA-Y4pO1A/SlWGzk3gEOI/AAAAAAAAAHA/TMELES3Cq84/s320/DateFormat.jpeg" border="0" alt=""id="BLOGGER_PHOTO_ID_5356335552454988002" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Custom Formats:&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_yPsA-Y4pO1A/SlWHcdqOV0I/AAAAAAAAAHI/eq8kED20ANY/s1600-h/DateFormatexp.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 214px;" src="http://3.bp.blogspot.com/_yPsA-Y4pO1A/SlWHcdqOV0I/AAAAAAAAAHI/eq8kED20ANY/s320/DateFormatexp.jpeg" border="0" alt=""id="BLOGGER_PHOTO_ID_5356336254894888770" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-5782242890648974360?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/5782242890648974360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/5782242890648974360'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/07/dateformat.html' title='DateFormat'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_yPsA-Y4pO1A/SlWGzk3gEOI/AAAAAAAAAHA/TMELES3Cq84/s72-c/DateFormat.jpeg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-4632922320681359216</id><published>2009-07-03T02:14:00.000-07:00</published><updated>2009-07-03T03:00:57.548-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>Passing Data/Parameter/Value/ from one page to another page (.aspx/.ascx)</title><content type='html'>&lt;strong&gt;&lt;font color="red"&gt;Passing Data/Parameter/Value/ from one page to another page (.aspx/.ascx)&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;Passing parameters from one page to another page is a very common task in Web development. Especially  when you develop a project &amp; redirects or navigates from one ASP.NET Web page to another, you will frequently want to pass information from the source page to the target page . In this post, I will show you some ways of transferring data/parameters/values between one page to another page which is also termed as State Management. The pages I created to show you the example is really simple which consists of a text field and a button in the first page named as page1 and a blank second page named as page2.&lt;br /&gt;&lt;br /&gt;According to the characteristics of aspx page lifecycle web form do not retain their value after a page is displayed. To solve this problem, ASP.NET provides the following ways to retain variables between pages:&lt;br /&gt;&lt;strong&gt;&lt;font color="red"&gt;Query Strings&lt;br /&gt;Cookies&lt;br /&gt;Session variables&lt;br /&gt;Server.Transfer&lt;br /&gt;Post Back URL&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;font color="red"&gt;&lt;br /&gt;Using Query String:&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;The most common &amp; easiest way of passing data is query string. Usually we pass value(s) through query string of the page and then this value is pulled from Request object in another page. One thing keep in mind that user can view query string value any time(from brwser address, View source, even on mouse over of a link etc.). So never pass information which is secure like password through query string. Drawback of  Query string appear after a question mark of a URL.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br /&gt;Suppose you want to pass the txtName TextBox value from page1 to page2 on button click event:&lt;br /&gt;&lt;br /&gt;protected void btn_Click(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;Response.Redirect("page2.aspx?name=" + txtName.Text);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Now the question is how we can read/retrieve my name from page2.aspx page? The way is:&lt;br /&gt;&lt;br /&gt;string name = Request.QueryString["name"];&lt;br /&gt;&lt;br /&gt;Now more advance is if you want to transfer special charaters or a line with spaces then you must have to use Server.UrlEncode method before transfer &amp; Server.UrlDecode method to read data from page2.aspx:&lt;br /&gt;&lt;br /&gt;protected void btn_Click(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;Response.Redirect("page2.aspx?name=" + Server.UrlEncode(txtName.Text));&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;and to read from page2:&lt;br /&gt;&lt;br /&gt;string name = Server.UrlDecode(Request.QueryString["name"]);&lt;br /&gt;&lt;br /&gt;Now i want to show you how you can transfer more data:&lt;br /&gt;&lt;br /&gt;protected void cmdTransfer_Click(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;Response.Redirect("page2.aspx?name="+Server.UrlEncode(txtName.Text)+"&amp;age="+txtAge.Text);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Now read both name &amp; age from page2 in the same way:&lt;br /&gt;&lt;br /&gt;string name = Request.QueryString["name"];&lt;br /&gt;string age = Request.QueryString["age"];&lt;br /&gt;&lt;br /&gt;now you can check the both parameter (with null value then write it).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;font color="red"&gt;Cookies:&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;Developers use cookies to store small amounts of information on the client. Drawback if user  set the browser status cookie not supported won’t help. It’s stored only client machine. From the server we can check the page load event.&lt;br /&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br /&gt;Now we create a cookie from page1 &amp; read from page2:&lt;br /&gt;for page1 button click event:&lt;br /&gt;&lt;br /&gt;protected void cmdTransfer_Click(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;if(Request.Browser.Cookies) // To check that the browser support cookies&lt;br /&gt;{&lt;br /&gt;HttpCookie cookie = new HttpCookie("myname");&lt;br /&gt;cookie.Value = txtName.Text;&lt;br /&gt;cookie.Expires = DateTime.Now.AddDays(1);&lt;br /&gt;Response.Cookies.Add(cookie);&lt;br /&gt;Response.Redirect("page2.aspx");&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;// You have to follow other option.&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Now read from page2:&lt;br /&gt;if(Request.Cookies["myname"] != null)&lt;br /&gt;Response.Write(Request.Cookies["myname"].Value);&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;font color="red"&gt;Using Session Variables:&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;By default, session variables are stored in the web server  memory. Session variables are unique per each user. If you open same url in two browser then server will create two independent sessions for you. Keep in mind that each session has a expire time. You can configure session time from IIS. Also one another thing is, you can receive session value form any pages after assigning. Write the below code under page1 button:&lt;br /&gt;&lt;br /&gt;protected void btn_Click(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;Session["name"] = txtName.Text;&lt;br /&gt;Response.Redirect("page2.aspx");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Now read session variable value from page2:&lt;br /&gt;&lt;br /&gt;string name ="";&lt;br /&gt;if(Session["name"]!=null)&lt;br /&gt;name=Session["name"].ToString();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;font color="red"&gt;Using Server.Transfer:&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;We will use Server. Transfer to send the control to a new page. Note that Server.Transfer only transfers the control to the new page and does not redirect the browser to it, which means you will see the address of the old page in your URL. If the user clicks Refresh on his browser, the browser prompt a message warning that the page can not be refreshed without resending information. Write the below code under page1 button click event:&lt;br /&gt;&lt;br /&gt;protected void btn_Click(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;Server.Transfer("page2.aspx", true);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;And write the below code in page2 load event:&lt;br /&gt;&lt;br /&gt;if (Request.Form["txtEmail"])&lt;br /&gt;Response.Write(Request.Form["txtNamel"]);&lt;br /&gt;&lt;br /&gt;Now run the page1, enter your name &amp; click. You will see your name in page2. Merits of using the above it won’t give any blank page or any warnings.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;font color="red"&gt;Using Post Back URL:&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;ASP.NET 2.0 has been introduced Cross page posting. By PreviousPage object you can search controls value from which page you are redirected here. To implement Cross page posting you have to define the PostBackUrl property of page1 button to page2. Like:&lt;br /&gt;&lt;br /&gt;aspx/ascx design page btn propery called PostBackUrl="page2.aspx"&lt;br /&gt;&lt;br /&gt;Now write the below code in page2 load event:&lt;br /&gt;&lt;br /&gt;TextBox txtName = (TextBox)(PreviousPage.FindControl("txtName"));&lt;br /&gt;string myname =txtName.Text;&lt;br /&gt;Or&lt;br /&gt;If you use usercontrol the previouspage// prpery won’t support. &lt;br /&gt;TextBox txtName = (TextBox)Page.PreviousPage.FindControl("txtName"));&lt;br /&gt;string myname =txtName.Text;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-4632922320681359216?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/4632922320681359216'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/4632922320681359216'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/07/passing-dataparametervalue-from-one.html' title='Passing Data/Parameter/Value/ from one page to another page (.aspx/.ascx)'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-6048277081640489356</id><published>2009-06-23T01:29:00.000-07:00</published><updated>2009-06-23T02:39:35.499-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Technical Question and Ans'/><title type='text'>Asp.Net questions&amp;Ans</title><content type='html'>What are the parts of the .NET Framework?&lt;br /&gt;.NET Framework has two main parts: &lt;br /&gt;The common language runtime (CLR)&lt;br /&gt;The .NET Framework class library&lt;br /&gt;What are the ways to persistent data in a web application?&lt;br /&gt;Data can be persisted in the web application using any of the following mechanism.&lt;br /&gt;ApplicationState&lt;br /&gt;SessionState&lt;br /&gt;ViewState.&lt;br /&gt;How does classes are organized in the .NET Framework?&lt;br /&gt;The .NET Framework has organized its classes using namespaces.&lt;br /&gt;What is the point to remember about Transfer method in ASP.NET?&lt;br /&gt;Transfer method can't be used with HTML pages. It works only with .aspx pages. &lt;br /&gt;What are the different exception-handling approaches in ASP.NET Web applications?&lt;br /&gt;Exceptions can be handled using any of the following approaches:&lt;br /&gt;Try, Catch, and Finally keywords in VB.NET or the try, catch, and finally keywords in C#.&lt;br /&gt;Error event procedures at the Global, Application, or Page levels.&lt;br /&gt;Describe the purpose of error pages and why they are needed.&lt;br /&gt;Error page is used to trap exceptions occur outside the scope of the application.&lt;br /&gt;The exceptions of these types are identified by HTTP response codes.&lt;br /&gt;These exceptions are handled by IIS by displaying custom error pages listed in your application’s Web.config file.&lt;br /&gt;Explain how tracing helps in handling exceptions.&lt;br /&gt;Tracing helps developer by recording an unusual event while application is running. The developer can trace the unexpected events in the trace log, thus can fix the problem.&lt;br /&gt;Difference between Windows and Forms authentication user lists in Web.config&lt;br /&gt;User lists for Windows authentication are included in the element of Web.config.&lt;br /&gt;User lists for Forms authentications are included in the element of Web.config.&lt;br /&gt;Explain how to require authentication using the Web.config file in ASP.NET.&lt;br /&gt;We can include &lt;authorization&gt; element to require authentication as shown below:&lt;br /&gt;&lt;authorization&gt;&lt;br /&gt;     &lt;deny users="?" /&gt;&lt;br /&gt;&lt;/authorization&gt;&lt;br /&gt;What is the difference between the Debug and Trace classes?&lt;br /&gt;Code using the Debug class is stripped out of release builds.&lt;br /&gt;Code using the Trace class is left in. &lt;br /&gt;Write a directive to cache responses for a Web form for 30 seconds.&lt;br /&gt;&lt;%@ OutputCache Duration=”30” VaryByParam=”me” %&gt;&lt;br /&gt;Explain how to detect when application data is about to be removed from the cache.&lt;br /&gt;We can detect using onRemoveCallback delegate.&lt;br /&gt;CurrentCulture property vs. Current¬UICulture property.&lt;br /&gt;The CurrentCulture property states how the .NET Framework handles dates, currencies, sorting, and formatting issues. &lt;br /&gt;The CurrentUICulture property determines which satellite assembly is used when loading resources.&lt;br /&gt;What is the purpose of MVC patter?&lt;br /&gt;MVC pattern separates the GUI from the data. It helps in providing multiple views for the same data. &lt;br /&gt;Explain how to enable and disable connnection pooling.&lt;br /&gt;Set pooling = true in the connectionstring. By default, it is true.&lt;br /&gt;Set pooling = false to disable connection pooling.&lt;br /&gt;Dataset.clone vs. Dataset.copy&lt;br /&gt;Dataset.clone copies the structure only whereas dataset copy copies both structure and data.&lt;br /&gt;Explain how to configure WebGarden in ASP.NET.&lt;br /&gt;WebGarden can be configured using process model setting in "machine.config" or "web.config".&lt;br /&gt;What is Webfarm?&lt;br /&gt;Webform consist of two or more web server of same configuration. When any request is made, the router logic of webform decides which web server from the farm handles the request. &lt;br /&gt;Explain the advantages of having webfarm.&lt;br /&gt;Webfarm allows the application to run even if a server is down, since request can be served by other web server of the farm.&lt;br /&gt;What is windows service?&lt;br /&gt;Windows service has the capability to start automatically when the computer boots. It can be manually paused, stopped or even restarted.&lt;br /&gt;Explain how to remove anonymous access to the IIS web application.&lt;br /&gt;&lt;configuration&gt;&lt;br /&gt;     &lt;system.web&gt;&lt;br /&gt;               &lt;authorization&gt;&lt;br /&gt;                             &lt;deny user = "?"&gt;&lt;br /&gt;               &lt;/authorization&gt;&lt;br /&gt;     &lt;/system.web&gt;&lt;br /&gt;&lt;/configuration&gt;&lt;br /&gt;How to enable tracing in ASP.NET &lt;br /&gt;Tracing can be enabaled as shown below:&lt;br /&gt;&lt;%@Page Trace = "True"%&gt;&lt;br /&gt;Name the major events in Global.aspx file.&lt;br /&gt;-Application_Init&lt;br /&gt;-Application_Disposed&lt;br /&gt;-Application_Error&lt;br /&gt;-Application_Start&lt;br /&gt;-Application_End&lt;br /&gt;-Application_BeginRequest&lt;br /&gt;-Application_EndRequest&lt;br /&gt;-Application_PreRequestHandlerExecute&lt;br /&gt;-Application_PostRequestHandlerExecute&lt;br /&gt;-Application_PreSendRequestHeaders&lt;br /&gt;-Application_PreSendContent&lt;br /&gt;-Application_AcquireRequestState&lt;br /&gt;-Application_ReleaseRequestState&lt;br /&gt;-Application_ResolveRequestCache&lt;br /&gt;-Application_UpdateRequestCache&lt;br /&gt;-Application_AuthenticateRequest&lt;br /&gt;-Application_AuthorizeRequest&lt;br /&gt;-Session_Start&lt;br /&gt;-Session_End&lt;br /&gt;What are authentication techniques in ASP.NET?&lt;br /&gt;-Windows authentication&lt;br /&gt;-Passport authentication&lt;br /&gt;-Forms authentication&lt;br /&gt;Authentication vs. authorization&lt;br /&gt;-Authentication is varying the identity of the user.&lt;br /&gt;-Authorization is the process of allowing an authenticated user access to resources.&lt;br /&gt;Explain the uses of Global.asax file.&lt;br /&gt;-using this we can set application-level variables&lt;br /&gt;-we can use application-level events.&lt;br /&gt;How many types of validation controls are provided by ASP.NET? Explain them. &lt;br /&gt;There are 6 validation controls in ASP.NET:&lt;br /&gt;1. RequiredFieldValidator: It is for mandatory field.&lt;br /&gt;2. RegularExpressionValidator: It checks the match with a given regularexpression.&lt;br /&gt;3. CompareValidator: It checks that the value in the validated control matches with the value of another control or with a specific value.&lt;br /&gt;4. RangeValidator: It checks the validated control value with a specified range.&lt;br /&gt;5.. CustomValidator: Require to do custom validation on any control after writing required code.&lt;br /&gt;6. ValidationSummary:This control is used to display a summary of all validation errors raised in a particular Web page.&lt;br /&gt;What is impersonation in ASP.NET? &lt;br /&gt;Impersonation is used to decide whether a user request in an ASp.NET application can run under the authenticated identity received from IIS or under a specific identity specified in web.config file when impersonation is enabled.When it is disabled the user request will run under the ASPNET account( the process identity of the application worker process) .By default it is disabled.&lt;br /&gt;&lt;identity impersonate="true" userName="domain\user" password="password" /&gt;&lt;br /&gt;or&lt;br /&gt;&lt;identity impersonate="true"/&gt;&lt;br /&gt;or&lt;br /&gt;&lt;identity impersonate="false"/&gt;&lt;br /&gt;Explain how a web application works.&lt;br /&gt;Answer - A web application resides in the server and serves the client™s requests over internet. The client access the web page using browser from his machine. When a client makes a request, it receives the result in the form of HTML which are interpreted and displayed by the browser. &lt;br /&gt; &lt;br /&gt;A web application on the server side runs under the management of Microsoft Internet Information Services (IIS). IIS passes the request received from client to the application. The application returns the requested result in the form of HTML to IIS, which in turn, sends the result to the client. &lt;br /&gt;Application State&lt;br /&gt;Data stored in the application object can be shared by all the sessions of the application. Application object stores data in the key value pair.&lt;br /&gt;Session State&lt;br /&gt;Session State stores session-specific information and the information is visible within the session only. ASP.NET creates unique sessionId for each session of the application. SessionIDs are maintained either by an HTTP cookie or a modified URL, as set in the application's configuration settings. By default, SessionID values are stored in a cookie.&lt;br /&gt;ASP.NET session vs Classic ASP&lt;br /&gt;ASP session variables are recycled when IIS restarts. ASP.NET session is maintained even if IIS reboots.&lt;br /&gt;With ASP session, we can’t have web farms. ASP.NET session supports multiple servers since it can be stored in state server and SQL server.&lt;br /&gt;ASP session is compatible to only those browsers that support cookies. &lt;br /&gt;What is event bubbling?&lt;br /&gt;In ASP.NET, we can have child controls inside server control like Datagrid, Datalist, Repeater. Example, combo box can be placed inside Datagrid. The child can’t raise their events by himself; they send events to their parent which pass to the page as “Itemcommand” event. This processing is called event bubbling.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-6048277081640489356?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/6048277081640489356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/6048277081640489356'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/06/aspnet-questions.html' title='Asp.Net questions&amp;Ans'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-8825777113503534686</id><published>2009-06-22T23:50:00.001-07:00</published><updated>2009-06-22T23:50:44.963-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Technical Question and Ans'/><title type='text'>SQL Qustion and Answers</title><content type='html'>What is RDBMS?&lt;br /&gt;Relational Data Base Management Systems (RDBMS) are database management systems that maintain data records and indices in tables. Relationships may be created and maintained across and among the data and tables. In a relational database, relationships between data items are expressed by means of tables. Interdependencies among these tables are expressed by data values rather than by pointers. This allows a high degree of data independence. An RDBMS has the capability to recombine the data items from different files, providing powerful tools for data usage.&lt;br /&gt;&lt;br /&gt;What is normalization?&lt;br /&gt;Database normalization is a data design and organization process applied to data structures based on rules that help build relational databases. In relational database design, the process of organizing data to minimize redundancy. Normalization usually involves dividing a database into two or more tables and defining relationships between the tables. The objective is to isolate data so that additions, deletions, and modifications of a field can be made in just one table and then propagated through the rest of the database via the defined relationships.&lt;br /&gt;&lt;br /&gt;What are different normalization forms?&lt;br /&gt;&lt;br /&gt;1NF: Eliminate Repeating Groups&lt;br /&gt;Make a separate table for each set of related attributes, and give each table a primary key. Each field contains at most one value from its attribute domain.&lt;br /&gt;2NF: Eliminate Redundant Data&lt;br /&gt;If an attribute depends on only part of a multi-valued key, remove it to a separate table.&lt;br /&gt;3NF: Eliminate Columns Not Dependent On Key &lt;br /&gt;If attributes do not contribute to a description of the key, remove them to a separate table. All attributes must be directly dependent on the primary key&lt;br /&gt;BCNF: Boyce-Codd Normal Form&lt;br /&gt;If there are non-trivial dependencies between candidate key attributes, separate them out into distinct tables.&lt;br /&gt;4NF: Isolate Independent Multiple Relationships&lt;br /&gt;No table may contain two or more 1:n or n:m relationships that are not directly related.&lt;br /&gt;5NF: Isolate Semantically Related Multiple Relationships &lt;br /&gt;There may be practical constrains on information that justify separating logically related many-to-many relationships.&lt;br /&gt;ONF: Optimal Normal Form&lt;br /&gt;A model limited to only simple (elemental) facts, as expressed in Object Role Model notation.&lt;br /&gt;DKNF: Domain-Key Normal Form&lt;br /&gt;A model free from all modification anomalies. &lt;br /&gt;&lt;br /&gt;Remember, these normalization guidelines are cumulative. For a database to be in 3NF, it must first fulfill all the criteria of a 2NF and 1NF database.&lt;br /&gt;&lt;br /&gt;What is Stored Procedure?&lt;br /&gt;A stored procedure is a named group of SQL statements that have been previously created and stored in the server database. Stored procedures accept input parameters so that a single procedure can be used over the network by several clients using different input data. And when the procedure is modified, all clients automatically get the new version. Stored procedures reduce network traffic and improve performance. Stored procedures can be used to help ensure the integrity of the database.&lt;br /&gt;e.g. sp_helpdb, sp_renamedb, sp_depends etc.&lt;br /&gt;&lt;br /&gt;What is Trigger?&lt;br /&gt;A trigger is a SQL procedure that initiates an action when an event (INSERT, DELETE or UPDATE) occurs. Triggers are stored in and managed by the DBMS.Triggers are used to maintain the referential integrity of data by changing the data in a systematic fashion. A trigger cannot be called or executed; the DBMS automatically fires the trigger as a result of a data modification to the associated table. Triggers can be viewed as similar to stored procedures in that both consist of procedural logic that is stored at the database level. Stored procedures, however, are not event-drive and are not attached to a specific table as triggers are. Stored procedures are explicitly executed by invoking a CALL to the procedure while triggers are implicitly executed. In addition, triggers can also execute stored procedures.&lt;br /&gt;Nested Trigger: A trigger can also contain INSERT, UPDATE and DELETE logic within itself, so when the trigger is fired because of data modification it can also cause another data modification, thereby firing another trigger. A trigger that contains data modification logic within itself is called a nested trigger.&lt;br /&gt;&lt;br /&gt;What is View?&lt;br /&gt;A simple view can be thought of as a subset of a table. It can be used for retrieving data, as well as updating or deleting rows. Rows updated or deleted in the view are updated or deleted in the table the view was created with. It should also be noted that as data in the original table changes, so does data in the view, as views are the way to look at part of the original table. The results of using a view are not permanently stored in the database. The data accessed through a view is actually constructed using standard T-SQL select command and can come from one to many different base tables or even other views.&lt;br /&gt;&lt;br /&gt;What is Index?&lt;br /&gt;An index is a physical structure containing pointers to the data. Indices are created in an existing table to locate rows more quickly and efficiently. It is possible to create an index on one or more columns of a table, and each index is given a name. The users cannot see the indexes, they are just used to speed up queries. Effective indexes are one of the best ways to improve performance in a database application. A table scan happens when there is no index available to help a query. In a table scan SQL Server examines every row in the table to satisfy the query results. Table scans are sometimes unavoidable, but on large tables, scans have a terrific impact on performance.&lt;br /&gt;&lt;br /&gt;Clustered indexes define the physical sorting of a database table’s rows in the storage media. For this reason, each database table may have only one clustered index.&lt;br /&gt;Non-clustered indexes are created outside of the database table and contain a sorted list of references to the table itself.&lt;br /&gt;&lt;br /&gt;What is the difference between clustered and a non-clustered index?&lt;br /&gt;A clustered index is a special type of index that reorders the way records in the table are physically stored. Therefore table can have only one clustered index. The leaf nodes of a clustered index contain the data pages. &lt;br /&gt;&lt;br /&gt;A nonclustered index is a special type of index in which the logical order of the index does not match the physical stored order of the rows on disk. The leaf node of a nonclustered index does not consist of the data pages. Instead, the leaf nodes contain index rows.&lt;br /&gt;&lt;br /&gt;What are the different index configurations a table can have?&lt;br /&gt;A table can have one of the following index configurations:&lt;br /&gt;&lt;br /&gt;No indexes&lt;br /&gt;A clustered index&lt;br /&gt;A clustered index and many nonclustered indexes&lt;br /&gt;A nonclustered index&lt;br /&gt;Many nonclustered indexes&lt;br /&gt;&lt;br /&gt;What is cursors?&lt;br /&gt;Cursor is a database object used by applications to manipulate data in a set on a row-by-row basis, instead of the typical SQL commands that operate on all the rows in the set at one time. &lt;br /&gt;&lt;br /&gt;In order to work with a cursor we need to perform some steps in the following order:&lt;br /&gt;&lt;br /&gt;Declare cursor&lt;br /&gt;Open cursor&lt;br /&gt;Fetch row from the cursor&lt;br /&gt;Process fetched row&lt;br /&gt;Close cursor&lt;br /&gt;Deallocate cursor&lt;br /&gt;&lt;br /&gt;What is the use of DBCC commands?&lt;br /&gt;DBCC stands for database consistency checker. We use these commands to check the consistency of the databases, i.e., maintenance, validation task and status checks.&lt;br /&gt;E.g. DBCC CHECKDB – Ensures that tables in the db and the indexes are correctly linked.&lt;br /&gt;DBCC CHECKALLOC – To check that all pages in a db are correctly allocated.&lt;br /&gt;DBCC CHECKFILEGROUP – Checks all tables file group for any damage.&lt;br /&gt;&lt;br /&gt;What is a Linked Server?&lt;br /&gt;Linked Servers is a concept in SQL Server by which we can add other SQL Server to a Group and query both the SQL Server dbs using T-SQL Statements. With a linked server, you can create very clean, easy to follow, SQL statements that allow remote data to be retrieved, joined and combined with local data.&lt;br /&gt;Storped Procedure sp_addlinkedserver, sp_addlinkedsrvlogin will be used add new Linked Server.&lt;br /&gt;&lt;br /&gt;What is Collation?&lt;br /&gt;Collation refers to a set of rules that determine how data is sorted and compared. Character data is sorted using rules that define the correct character sequence, with options for specifying case-sensitivity, accent marks, kana character types and character width.&lt;br /&gt;&lt;br /&gt;What are different type of Collation Sensitivity?&lt;br /&gt;Case sensitivity&lt;br /&gt;A and a, B and b, etc.&lt;br /&gt;&lt;br /&gt;Accent sensitivity&lt;br /&gt;a and á, o and ó, etc.&lt;br /&gt;&lt;br /&gt;Kana Sensitivity&lt;br /&gt;When Japanese kana characters Hiragana and Katakana are treated differently, it is called Kana sensitive.&lt;br /&gt;&lt;br /&gt;Width sensitivity&lt;br /&gt;When a single-byte character (half-width) and the same character when represented as a double-byte character (full-width) are treated differently then it is width sensitive.&lt;br /&gt;&lt;br /&gt;What’s the difference between a primary key and a unique key?&lt;br /&gt;Both primary key and unique enforce uniqueness of the column on which they are defined. But by default primary key creates a clustered index on the column, where are unique creates a nonclustered index by default. Another major difference is that, primary key doesn’t allow NULLs, but unique key allows one NULL only.&lt;br /&gt;&lt;br /&gt;How to implement one-to-one, one-to-many and many-to-many relationships while designing tables?&lt;br /&gt;One-to-One relationship can be implemented as a single table and rarely as two tables with primary and foreign key relationships.&lt;br /&gt;One-to-Many relationships are implemented by splitting the data into two tables with primary key and foreign key relationships.&lt;br /&gt;Many-to-Many relationships are implemented using a junction table with the keys from both the tables forming the composite primary key of the junction table.&lt;br /&gt;&lt;br /&gt;What is a NOLOCK?&lt;br /&gt;Using the NOLOCK query optimiser hint is generally considered good practice in order to improve concurrency on a busy system. When the NOLOCK hint is included in a SELECT statement, no locks are taken when data is read. The result is a Dirty Read, which means that another process could be updating the data at the exact time you are reading it. There are no guarantees that your query will retrieve the most recent data. The advantage to performance is that your reading of data will not block updates from taking place, and updates will not block your reading of data. SELECT statements take Shared (Read) locks. This means that multiple SELECT statements are allowed simultaneous access, but other processes are blocked from modifying the data. The updates will queue until all the reads have completed, and reads requested after the update will wait for the updates to complete. The result to your system is delay(blocking).&lt;br /&gt;&lt;br /&gt;What is difference between DELETE &amp; TRUNCATE commands?&lt;br /&gt;Delete command removes the rows from a table based on the condition that we provide with a WHERE clause. Truncate will actually remove all the rows from a table and there will be no data in the table after we run the truncate command.&lt;br /&gt;&lt;br /&gt;TRUNCATE&lt;br /&gt;TRUNCATE is faster and uses fewer system and transaction log resources than DELETE.&lt;br /&gt;TRUNCATE removes the data by deallocating the data pages used to store the table’s data, and only the page deallocations are recorded in the transaction log.&lt;br /&gt;TRUNCATE removes all rows from a table, but the table structure and its columns, constraints, indexes and so on remain. The counter used by an identity for new rows is reset to the seed for the column.&lt;br /&gt;You cannot use TRUNCATE TABLE on a table referenced by a FOREIGN KEY constraint.&lt;br /&gt;Because TRUNCATE TABLE is not logged, it cannot activate a trigger.&lt;br /&gt;TRUNCATE can not be Rolled back using logs.&lt;br /&gt;TRUNCATE is DDL Command.&lt;br /&gt;TRUNCATE Resets identity of the table.&lt;br /&gt;&lt;br /&gt;DELETE&lt;br /&gt;DELETE removes rows one at a time and records an entry in the transaction log for each deleted row.&lt;br /&gt;If you want to retain the identity counter, use DELETE instead. If you want to remove table definition and its data, use the DROP TABLE statement.&lt;br /&gt;DELETE Can be used with or without a WHERE clause&lt;br /&gt;DELETE Activates Triggers.&lt;br /&gt;DELETE Can be Rolled back using logs.&lt;br /&gt;DELETE is DML Command.&lt;br /&gt;DELETE does not reset identity of the table.&lt;br /&gt;&lt;br /&gt;Difference between Function and Stored Procedure?&lt;br /&gt;UDF can be used in the SQL statements anywhere in the WHERE/HAVING/SELECT section where as Stored procedures cannot be.&lt;br /&gt;UDFs that return tables can be treated as another rowset. This can be used in JOINs with other tables.&lt;br /&gt;Inline UDF’s can be though of as views that take parameters and can be used in JOINs and other Rowset operations.&lt;br /&gt;&lt;br /&gt;When is the use of UPDATE_STATISTICS command?&lt;br /&gt;This command is basically used when a large processing of data has occurred. If a large amount of deletions any modification or Bulk Copy into the tables has occurred, it has to update the indexes to take these changes into account. UPDATE_STATISTICS updates the indexes on these tables accordingly.&lt;br /&gt;&lt;br /&gt;What types of Joins are possible with Sql Server?&lt;br /&gt;Joins are used in queries to explain how different tables are related. Joins also let you select data from a table depending upon data from another table.&lt;br /&gt;Types of joins: INNER JOINs, OUTER JOINs, CROSS JOINs. OUTER JOINs are further classified as LEFT OUTER JOINS, RIGHT OUTER JOINS and FULL OUTER JOINS.&lt;br /&gt;&lt;br /&gt;What is the difference between a HAVING CLAUSE and a WHERE CLAUSE?&lt;br /&gt;Specifies a search condition for a group or an aggregate. HAVING can be used only with the SELECT statement. HAVING is typically used in a GROUP BY clause. When GROUP BY is not used, HAVING behaves like a WHERE clause. Having Clause is basically used only with the GROUP BY function in a query. WHERE Clause is applied to each row before they are part of the GROUP BY function in a query. HAVING criteria is applied after the the grouping of rows has occurred.&lt;br /&gt;&lt;br /&gt;What is sub-query? Explain properties of sub-query.&lt;br /&gt;Sub-queries are often referred to as sub-selects, as they allow a SELECT statement to be executed arbitrarily within the body of another SQL statement. A sub-query is executed by enclosing it in a set of parentheses. Sub-queries are generally used to return a single row as an atomic value, though they may be used to compare values against multiple rows with the IN keyword. &lt;br /&gt;&lt;br /&gt;A subquery is a SELECT statement that is nested within another T-SQL statement. A subquery SELECT statement if executed independently of the T-SQL statement, in which it is nested, will return a result set. Meaning a subquery SELECT statement can standalone and is not depended on the statement in which it is nested. A subquery SELECT statement can return any number of values, and can be found in, the column list of a SELECT statement, a FROM, GROUP BY, HAVING, and/or ORDER BY clauses of a T-SQL statement. A Subquery can also be used as a parameter to a function call. Basically a subquery can be used anywhere an expression can be used.&lt;br /&gt;&lt;br /&gt;Properties of Sub-Query&lt;br /&gt;A subquery must be enclosed in the parenthesis.&lt;br /&gt;A subquery must be put in the right hand of the comparison operator, and&lt;br /&gt;A subquery cannot contain a ORDER-BY clause.&lt;br /&gt;A query can contain more than one sub-queries.&lt;br /&gt;&lt;br /&gt;What are types of sub-queries?&lt;br /&gt;Single-row subquery, where the subquery returns only one row.&lt;br /&gt;Multiple-row subquery, where the subquery returns multiple rows,.and&lt;br /&gt;Multiple column subquery, where the subquery returns multiple columns.&lt;br /&gt;&lt;br /&gt;What is SQL Profiler?&lt;br /&gt;SQL Profiler is a graphical tool that allows system administrators to monitor events in an instance of Microsoft SQL Server. You can capture and save data about each event to a file or SQL Server table to analyze later. For example, you can monitor a production environment to see which stored procedures are hampering performance by executing too slowly. &lt;br /&gt;&lt;br /&gt;Use SQL Profiler to monitor only the events in which you are interested. If traces are becoming too large, you can filter them based on the information you want, so that only a subset of the event data is collected. Monitoring too many events adds overhead to the server and the monitoring process and can cause the trace file or trace table to grow very large, especially when the monitoring process takes place over a long period of time.&lt;br /&gt;&lt;br /&gt;What is User Defined Functions?&lt;br /&gt;User-Defined Functions allow to define its own T-SQL functions that can accept 0 or more parameters and return a single scalar data value or a table data type.&lt;br /&gt;&lt;br /&gt;What kind of User-Defined Functions can be created?&lt;br /&gt;There are three types of User-Defined functions in SQL Server 2000 and they are Scalar, Inline Table-Valued and Multi-statement Table-valued.&lt;br /&gt;&lt;br /&gt;Scalar User-Defined Function&lt;br /&gt;A Scalar user-defined function returns one of the scalar data types. Text, ntext, image and timestamp data types are not supported. These are the type of user-defined functions that most developers are used to in other programming languages. You pass in 0 to many parameters and you get a return value.&lt;br /&gt;&lt;br /&gt;Inline Table-Value User-Defined Function&lt;br /&gt;An Inline Table-Value user-defined function returns a table data type and is an exceptional alternative to a view as the user-defined function can pass parameters into a T-SQL select command and in essence provide us with a parameterized, non-updateable view of the underlying tables.&lt;br /&gt;&lt;br /&gt;Multi-statement Table-Value User-Defined Function&lt;br /&gt;A Multi-Statement Table-Value user-defined function returns a table and is also an exceptional alternative to a view as the function can support multiple T-SQL statements to build the final result where the view is limited to a single SELECT statement. Also, the ability to pass parameters into a T-SQL select command or a group of them gives us the capability to in essence create a parameterized, non-updateable view of the data in the underlying tables. Within the create function command you must define the table structure that is being returned. After creating this type of user-defined function, It can be used in the FROM clause of a T-SQL command unlike the behavior found when using a stored procedure which can also return record sets.&lt;br /&gt;&lt;br /&gt;Which TCP/IP port does SQL Server run on? How can it be changed?&lt;br /&gt;SQL Server runs on port 1433. It can be changed from the Network Utility TCP/IP properties –&gt; Port number.both on client and the server.&lt;br /&gt;&lt;br /&gt;What are the authentication modes in SQL Server? How can it be changed?&lt;br /&gt;Windows mode and mixed mode (SQL &amp; Windows). &lt;br /&gt;&lt;br /&gt;To change authentication mode in SQL Server click Start, Programs, Microsoft SQL Server and click SQL Enterprise Manager to run SQL Enterprise Manager from the Microsoft SQL Server program group. Select the server then from the Tools menu select SQL Server Configuration Properties, and choose the Security page.&lt;br /&gt;&lt;br /&gt;Where are SQL server users names and passwords are stored in sql server?&lt;br /&gt;They get stored in master db in the sysxlogins table.&lt;br /&gt;&lt;br /&gt;Which command using Query Analyzer will give you the version of SQL server and operating system? &lt;br /&gt;SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), &lt;br /&gt;What is SQL server agent?&lt;br /&gt;SQL Server agent plays an important role in the day-to-day tasks of a database administrator (DBA). It is often overlooked as one of the main tools for SQL Server management. Its purpose is to ease the implementation of tasks for the DBA, with its full-function scheduling engine, which allows you to schedule your own jobs and scripts.&lt;br /&gt;&lt;br /&gt;Can a stored procedure call itself or recursive stored procedure? How many level SP nesting possible?&lt;br /&gt;Yes. Because Transact-SQL supports recursion, you can write stored procedures that call themselves. Recursion can be defined as a method of problem solving wherein the solution is arrived at by repetitively applying it to subsets of the problem. A common application of recursive logic is to perform numeric computations that lend themselves to repetitive evaluation by the same processing steps. Stored procedures are nested when one stored procedure calls another or executes managed code by referencing a CLR routine, type, or aggregate. You can nest stored procedures and managed code references up to 32 levels.&lt;br /&gt;&lt;br /&gt;What is @@ERROR?&lt;br /&gt;The @@ERROR automatic variable returns the error code of the last Transact-SQL statement. If there was no error, @@ERROR returns zero. Because @@ERROR is reset after each Transact-SQL statement, it must be saved to a variable if it is needed to process it further after checking it.&lt;br /&gt;&lt;br /&gt;What is Raiseerror? &lt;br /&gt;Stored procedures report errors to client applications via the RAISERROR command. RAISERROR doesn’t change the flow of a procedure; it merely displays an error message, sets the @@ERROR automatic variable, and optionally writes the message to the SQL Server error log and the NT application event log.&lt;br /&gt;&lt;br /&gt;What is log shipping?&lt;br /&gt;Log shipping is the process of automating the backup of database and transaction log files on a production SQL server, and then restoring them onto a standby server. Enterprise Editions only supports log shipping. In log shipping the transactional log file from one server is automatically updated into the backup database on the other server. If one server fails, the other server will have the same db can be used this as the Disaster Recovery plan. The key feature of log shipping is that is will automatically backup transaction logs throughout the day and automatically restore them on the standby server at defined interval.&lt;br /&gt;&lt;br /&gt;What is the difference between a local and a global variable?&lt;br /&gt;A local temporary table exists only for the duration of a connection or, if defined inside a compound statement, for the duration of the compound statement. &lt;br /&gt;&lt;br /&gt;A global temporary table remains in the database permanently, but the rows exist only within a given connection. When connection are closed, the data in the global temporary table disappears. However, the table definition remains with the database for access when database is opened next time.&lt;br /&gt;What command do we use to rename a db? &lt;br /&gt;sp_renamedb ‘oldname’ , ‘newname’&lt;br /&gt;If someone is using db it will not accept sp_renmaedb. In that case first bring db to single user using sp_dboptions. Use sp_renamedb to rename database. Use sp_dboptions to bring database to multi user mode.&lt;br /&gt;&lt;br /&gt;What is sp_configure commands and set commands?&lt;br /&gt;Use sp_configure to display or change server-level settings. To change database-level settings, use ALTER DATABASE. To change settings that affect only the current user session, use the SET statement.&lt;br /&gt;&lt;br /&gt;What are the different types of replication? Explain.&lt;br /&gt;The SQL Server 2000-supported replication types are as follows:&lt;br /&gt;&lt;br /&gt;Transactional &lt;br /&gt;Snapshot &lt;br /&gt;Merge &lt;br /&gt;Snapshot replication distributes data exactly as it appears at a specific moment in time and does not monitor for updates to the data. Snapshot replication is best used as a method for replicating data that changes infrequently or where the most up-to-date values (low latency) are not a requirement. When synchronization occurs, the entire snapshot is generated and sent to Subscribers.&lt;br /&gt;&lt;br /&gt;Transactional replication, an initial snapshot of data is applied at Subscribers, and then when data modifications are made at the Publisher, the individual transactions are captured and propagated to Subscribers.&lt;br /&gt;&lt;br /&gt;Merge replication is the process of distributing data from Publisher to Subscribers, allowing the Publisher and Subscribers to make updates while connected or disconnected, and then merging the updates between sites when they are connected.&lt;br /&gt;&lt;br /&gt;What are the OS services that the SQL Server installation adds?&lt;br /&gt;MS SQL SERVER SERVICE, SQL AGENT SERVICE, DTC (Distribution transac co-ordinator)&lt;br /&gt;&lt;br /&gt;What are three SQL keywords used to change or set someone’s permissions?&lt;br /&gt;GRANT, DENY, and REVOKE.&lt;br /&gt;&lt;br /&gt;What does it mean to have quoted_identifier on? What are the implications of having it off?&lt;br /&gt;When SET QUOTED_IDENTIFIER is ON, identifiers can be delimited by double quotation marks, and literals must be delimited by single quotation marks. When SET QUOTED_IDENTIFIER is OFF, identifiers cannot be quoted and must follow all Transact-SQL rules for identifiers.&lt;br /&gt;&lt;br /&gt;What is the STUFF function and how does it differ from the REPLACE function? &lt;br /&gt;STUFF function to overwrite existing characters. Using this syntax, STUFF(string_expression, start, length, replacement_characters), string_expression is the string that will have characters substituted, start is the starting position, length is the number of characters in the string that are substituted, and replacement_characters are the new characters interjected into the string.&lt;br /&gt;REPLACE function to replace existing characters of all occurance. Using this syntax REPLACE(string_expression, search_string, replacement_string), where every incidence of search_string found in the string_expression will be replaced with replacement_string. &lt;br /&gt;&lt;br /&gt;Using query analyzer, name 3 ways to get an accurate count of the number of records in a table?&lt;br /&gt;SELECT *&lt;br /&gt;FROM table1&lt;br /&gt;SELECT COUNT(*)&lt;br /&gt;FROM table1&lt;br /&gt;SELECT rows&lt;br /&gt;FROM sysindexes&lt;br /&gt;WHERE id = OBJECT_ID(table1)&lt;br /&gt;AND indid &lt; 2&lt;br /&gt;How to rebuild Master Database?&lt;br /&gt;Shutdown Microsoft SQL Server 2000, and then run Rebuildm.exe. This is located in the Program Files\Microsoft SQL Server\80\Tools\Binn directory.&lt;br /&gt;In the Rebuild Master dialog box, click Browse.&lt;br /&gt;In the Browse for Folder dialog box, select the \Data folder on the SQL Server 2000 compact disc or in the shared network directory from which SQL Server 2000 was installed, and then click OK.&lt;br /&gt;Click Settings. In the Collation Settings dialog box, verify or change settings used for the master database and all other databases.&lt;br /&gt;Initially, the default collation settings are shown, but these may not match the collation selected during setup. You can select the same settings used during setup or select new collation settings. When done, click OK.&lt;br /&gt;In the Rebuild Master dialog box, click Rebuild to start the process.&lt;br /&gt;The Rebuild Master utility reinstalls the master database.&lt;br /&gt;To continue, you may need to stop a server that is running.&lt;br /&gt;Source: http://msdn2.microsoft.com/en-us/library/aa197950(SQL.80).aspx&lt;br /&gt;&lt;br /&gt;What is the basic functions for master, msdb, model, tempdb databases?&lt;br /&gt;The Master database holds information for all databases located on the SQL Server instance and is the glue that holds the engine together. Because SQL Server cannot start without a functioning master database, you must administer this database with care.&lt;br /&gt;The msdb database stores information regarding database backups, SQL Agent information, DTS packages, SQL Server jobs, and some replication information such as for log shipping.&lt;br /&gt;The tempdb holds temporary objects such as global and local temporary tables and stored procedures.&lt;br /&gt;The model is essentially a template database used in the creation of any new user database created in the instance.&lt;br /&gt;&lt;br /&gt;What are primary keys and foreign keys? &lt;br /&gt;Primary keys are the unique identifiers for each row. They must contain unique values and cannot be null. Due to their importance in relational databases, Primary keys are the most fundamental of all keys and constraints. A table can have only one Primary key.&lt;br /&gt;Foreign keys are both a method of ensuring data integrity and a manifestation of the relationship between tables.&lt;br /&gt;&lt;br /&gt;What is data integrity? Explain constraints?&lt;br /&gt;Data integrity is an important feature in SQL Server. When used properly, it ensures that data is accurate, correct, and valid. It also acts as a trap for otherwise undetectable bugs within applications.&lt;br /&gt;&lt;br /&gt;A PRIMARY KEY constraint is a unique identifier for a row within a database table. Every table should have a primary key constraint to uniquely identify each row and only one primary key constraint can be created for each table. The primary key constraints are used to enforce entity integrity. &lt;br /&gt;&lt;br /&gt;A UNIQUE constraint enforces the uniqueness of the values in a set of columns, so no duplicate values are entered. The unique key constraints are used to enforce entity integrity as the primary key constraints.&lt;br /&gt;&lt;br /&gt;A FOREIGN KEY constraint prevents any actions that would destroy links between tables with the corresponding data values. A foreign key in one table points to a primary key in another table. Foreign keys prevent actions that would leave rows with foreign key values when there are no primary keys with that value. The foreign key constraints are used to enforce referential integrity.&lt;br /&gt;&lt;br /&gt;A CHECK constraint is used to limit the values that can be placed in a column. The check constraints are used to enforce domain integrity.&lt;br /&gt;&lt;br /&gt;A NOT NULL constraint enforces that the column will not accept null values. The not null constraints are used to enforce domain integrity, as the check constraints.&lt;br /&gt;When is the use of UPDATE_STATISTICS command?&lt;br /&gt;This command is basically used when a large processing of data has occurred. If a large amount of deletions any modification or Bulk Copy into the tables has occurred, it has to update the indexes to take these changes into account. UPDATE_STATISTICS updates the indexes on these tables accordingly.&lt;br /&gt;&lt;br /&gt;Which TCP/IP port does SQL Server run on? How can it be changed?&lt;br /&gt;SQL Server runs on port 1433. It can be changed from the Network Utility TCP/IP properties �&gt; Port number.both on client and the server.&lt;br /&gt;&lt;br /&gt;What is Identity?&lt;br /&gt;Identity (or AutoNumber) is a column that automatically generates numeric values. A start and increment value can be set, but most DBA leave these at 1. A GUID column also generates numbers, the value of this cannot be controled. Identity/GUID columns do not need to be indexed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-8825777113503534686?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/8825777113503534686'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/8825777113503534686'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/06/sql-qustion-and-answers.html' title='SQL Qustion and Answers'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-2023829824207496365</id><published>2009-06-22T05:13:00.000-07:00</published><updated>2009-06-22T05:15:36.260-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Technical Question and Ans'/><title type='text'>XML Question &amp; Ans</title><content type='html'>Where should I use XML? &lt;br /&gt;Its goal is to enable generic SGML to be served, received, and processed on the Web in the way that is now possible with HTML. XML has been designed for ease of implementation and for interoperability with both SGML and HTML. &lt;br /&gt;Despite early attempts, browsers never allowed other SGML, only HTML (although there were plugins), and they allowed it (even encouraged it) to be corrupted or broken, which held development back for over a decade by making it impossible to program for it reliably. XML fixes that by making it compulsory to stick to the rules, and by making the rules much simpler than SGML. &lt;br /&gt;But XML is not just for Web pages: in fact it's very rarely used for Web pages on its own because browsers still don't provide reliable support for formatting and transforming it. Common uses for XML include: &lt;br /&gt;Information identification &lt;br /&gt;because you can define your own markup, you can define meaningful names for all your information items. Information storage &lt;br /&gt;because XML is portable and non-proprietary, it can be used to store textual information across any platform. Because it is backed by an international standard, it will remain accessible and processable as a data format. Information structure &lt;br /&gt;XML can therefore be used to store and identify any kind of (hierarchical) information structure, especially for long, deep, or complex document sets or data sources, making it ideal for an information-management back-end to serving the Web. This is its most common Web application, with a transformation system to serve it as HTML until such time as browsers are able to handle XML consistently. Publishing &lt;br /&gt;The original goal of XML as defined in the quotation at the start of this section. Combining the three previous topics (identity, storage, structure) means it is possible to get all the benefits of robust document management and control (with XML) and publish to the Web (as HTML) as well as to paper (as PDF) and to other formats (e.g. Braille, Audio, etc) from a single source document by using the appropriate style sheets. Messaging and data transfer &lt;br /&gt;XML is also very heavily used for enclosing or encapsulating information in order to pass it between different computing systems which would otherwise be unable to communicate. By providing a lingua franca for data identity and structure, it provides a common envelope for inter-process communication (messaging). Web services &lt;br /&gt;Building on all of these, as well as its use in browsers, machine-processable data can be exchanged between consenting systems, where before it was only comprehensible by humans (HTML). Weather services, e-commerce sites, blog newsfeeds, AJAX sites, and thousands of other data-exchange services use XML for data management and transmission, and the web browser for display and interaction.&lt;br /&gt;Why is XML such an important development?&lt;br /&gt; &lt;br /&gt;It removes two constraints which were holding back Web developments:&lt;br /&gt;1. dependence on a single, inflexible document type (HTML) which was being much abused for tasks it was never designed for;&lt;br /&gt;2. the complexity of full SGML, whose syntax allows many powerful but hard-to-program options.&lt;br /&gt;XML allows the flexible development of user-defined document types. It provides a robust, non-proprietary, persistent, and verifiable file format for the storage and transmission of text and data both on and off the Web; and it removes the more complex options of SGML, making it easier to program for.&lt;br /&gt;Describe the role that XSL can play when dynamically generating HTML pages from a relational database. &lt;br /&gt;Even if candidates have never participated in a project involving this type of architecture, they should recognize it as one of the common uses of XML. Querying a database and then formatting the result set so that it can be validated as an XML document allows developers to translate the data into an HTML table using XSLT rules. Consequently, the format of the resulting HTML table can be modified without changing the database query or application code since the document rendering logic is isolated to the XSLT rules.&lt;br /&gt;What is SGML? &lt;br /&gt;SGML is the Standard Generalized Markup Language (ISO 8879:1986), the international standard for defining descriptions of the structure of different types of electronic document. There is an SGML FAQ from David Megginson at http://math.albany.edu:8800/hm/sgml/cts-faq.htmlFAQ; and Robin Cover's SGML Web pages are at http://www.oasis-open.org/cover/general.html. For a little light relief, try Joe English's ‘Not the SGML FAQ’ at http://www.flightlab.com/~joe/sgml/faq-not.txtFAQ. &lt;br /&gt;SGML is very large, powerful, and complex. It has been in heavy industrial and commercial use for nearly two decades, and there is a significant body of expertise and software to go with it. &lt;br /&gt;XML is a lightweight cut-down version of SGML which keeps enough of its functionality to make it useful but removes all the optional features which made SGML too complex to program for in a Web environment. &lt;br /&gt;Aren't XML, SGML, and HTML all the same thing? &lt;br /&gt;Not quite; SGML is the mother tongue, and has been used for describing thousands of different document types in many fields of human activity, from transcriptions of ancient Irish manuscripts to the technical documentation for stealth bombers, and from patients' clinical records to musical notation. SGML is very large and complex, however, and probably overkill for most common office desktop applications. &lt;br /&gt;XML is an abbreviated version of SGML, to make it easier to use over the Web, easier for you to define your own document types, and easier for programmers to write programs to handle them. It omits all the complex and less-used options of SGML in return for the benefits of being easier to write applications for, easier to understand, and more suited to delivery and interoperability over the Web. But it is still SGML, and XML files may still be processed in the same way as any other SGML file (see the question on XML software). &lt;br /&gt;HTML is just one of many SGML or XML applications—the one most frequently used on the Web. &lt;br /&gt;Technical readers may find it more useful to think of XML as being SGML-- rather than HTML++. &lt;br /&gt;Who is responsible for XML? &lt;br /&gt;XML is a project of the World Wide Web Consortium (W3C), and the development of the specification is supervised by an XML Working Group. A Special Interest Group of co-opted contributors and experts from various fields contributed comments and reviews by email. &lt;br /&gt;XML is a public format: it is not a proprietary development of any company, although the membership of the WG and the SIG represented companies as well as research and academic institutions. The v1.0 specification was accepted by the W3C as a Recommendation on Feb 10, 1998. &lt;br /&gt;Why is XML such an important development? &lt;br /&gt;It removes two constraints which were holding back Web developments: &lt;br /&gt;1. dependence on a single, inflexible document type (HTML) which was being much abused for tasks it was never designed for;&lt;br /&gt;2. the complexity of full question A.4, SGML, whose syntax allows many powerful but hard-to-program options. &lt;br /&gt;XML allows the flexible development of user-defined document types. It provides a robust, non-proprietary, persistent, and verifiable file format for the storage and transmission of text and data both on and off the Web; and it removes the more complex options of SGML, making it easier to program for.&lt;br /&gt;&lt;br /&gt;Why should I use XML? &lt;br /&gt;Here are a few reasons for using XML (in no particular order). Not all of these will apply to your own requirements, and you may have additional reasons not mentioned here (if so, please let the editor of the FAQ know!). &lt;br /&gt;* XML can be used to describe and identify information accurately and unambiguously, in a way that computers can be programmed to ‘understand’ (well, at least manipulate as if they could understand).&lt;br /&gt;* XML allows documents which are all the same type to be created consistently and without structural errors, because it provides a standardised way of describing, controlling, or allowing/disallowing particular types of document structure. [Note that this has absolutely nothing whatever to do with formatting, appearance, or the actual text content of your documents, only the structure of them.]&lt;br /&gt;* XML provides a robust and durable format for information storage and transmission. Robust because it is based on a proven standard, and can thus be tested and verified; durable because it uses plain-text file formats which will outlast proprietary binary ones.&lt;br /&gt;* XML provides a common syntax for messaging systems for the exchange of information between applications. Previously, each messaging system had its own format and all were different, which made inter-system messaging unnecessarily messy, complex, and expensive. If everyone uses the same syntax it makes writing these systems much faster and more reliable.&lt;br /&gt;* XML is free. Not just free of charge (free as in beer) but free of legal encumbrances (free as in speech). It doesn't belong to anyone, so it can't be hijacked or pirated. And you don't have to pay a fee to use it (you can of course choose to use commercial software to deal with it, for lots of good reasons, but you don't pay for XML itself).&lt;br /&gt;* XML information can be manipulated programmatically (under machine control), so XML documents can be pieced together from disparate sources, or taken apart and re-used in different ways. They can be converted into almost any other format with no loss of information.&lt;br /&gt;* XML lets you separate form from content. Your XML file contains your document information (text, data) and identifies its structure: your formatting and other processing needs are identified separately in a stylesheet or processing system. The two are combined at output time to apply the required formatting to the text or data identified by its structure (location, position, rank, order, or whatever).&lt;br /&gt;Describe the differences between XML and HTML.&lt;br /&gt;It's amazing how many developers claim to be proficient programming with XML, yet do not understand the basic differences between XML and HTML. Anyone with a fundamental grasp of XML should be able describe some of the main differences outlined in the table below.&lt;br /&gt;Differences Between XML and HTML &lt;br /&gt;Table 1.&lt;br /&gt;XML HTML&lt;br /&gt;User definable tags Defined set of tags designed for web display&lt;br /&gt;Content driven Format driven&lt;br /&gt;End tags required for well formed documents End tags not required&lt;br /&gt;Quotes required around attributes values Quotes not required&lt;br /&gt;Slash required in empty tags Slash not required&lt;br /&gt; &lt;br /&gt;Describe the role that XSL can play when dynamically generating HTML pages from a relational database.&lt;br /&gt;Even if candidates have never participated in a project involving this type of architecture, they should recognize it as one of the common uses of XML. Querying a database and then formatting the result set so that it can be validated as an XML document allows developers to translate the data into an HTML table using XSLT rules. Consequently, the format of the resulting HTML table can be modified without changing the database query or application code since the document rendering logic is isolated to the XSLT rules.&lt;br /&gt;Give a few examples of types of applications that can benefit from using XML. &lt;br /&gt;There are literally thousands of applications that can benefit from XML technologies. The point of this question is not to have the candidate rattle off a laundry list of projects that they have worked on, but, rather, to allow the candidate to explain the rationale for choosing XML by citing a few real world examples. For instance, one appropriate answer is that XML allows content management systems to store documents independently of their format, which thereby reduces data redundancy. Another answer relates to B2B exchanges or supply chain management systems. In these instances, XML provides a mechanism for multiple companies to exchange data according to an agreed upon set of rules. A third common response involves wireless applications that require WML to render data on hand held devices.&lt;br /&gt;What is DOM and how does it relate to XML?&lt;br /&gt;The Document Object Model (DOM) is an interface specification maintained by the W3C DOM Workgroup that defines an application independent mechanism to access, parse, or update XML data. In simple terms it is a hierarchical model that allows developers to manipulate XML documents easily Any developer that has worked extensively with XML should be able to discuss the concept and use of DOM objects freely. Additionally, it is not unreasonable to expect advanced candidates to thoroughly understand its internal workings and be able to explain how DOM differs from an event-based interface like SAX.&lt;br /&gt;What is SOAP and how does it relate to XML?&lt;br /&gt;The Simple Object Access Protocol (SOAP) uses XML to define a protocol for the exchange of information in distributed computing environments. SOAP consists of three components: an envelope, a set of encoding rules, and a convention for representing remote procedure calls. Unless experience with SOAP is a direct requirement for the open position, knowing the specifics of the protocol, or how it can be used in conjunction with HTTP, is not as important as identifying it as a natural application of XML. &lt;br /&gt;Can you walk us through the steps necessary to parse XML documents?&lt;br /&gt;Superficially, this is a fairly basic question. However, the point is not to determine whether candidates understand the concept of a parser but rather have them walk through the process of parsing XML documents step-by-step. Determining whether a non-validating or validating parser is needed, choosing the appropriate parser, and handling errors are all important aspects to this process that should be included in the candidate's response.&lt;br /&gt;Give some examples of XML DTDs or schemas that you have worked with.&lt;br /&gt;Although XML does not require data to be validated against a DTD, many of the benefits of using the technology are derived from being able to validate XML documents against business or technical architecture rules. Polling for the list of DTDs that developers have worked with provides insight to their general exposure to the technology. The ideal candidate will have knowledge of several of the commonly used DTDs such as FpML, DocBook, HRML, and RDF, as well as experience designing a custom DTD for a particular project where no standard existed.&lt;br /&gt;Using XSLT, how would you extract a specific attribute from an element in an XML document?&lt;br /&gt;Successful candidates should recognize this as one of the most basic applications of XSLT. If they are not able to construct a reply similar to the example below, they should at least be able to identify the components necessary for this operation: xsl:template to match the appropriate XML element, xsl:value-of to select the attribute value, and the optional xsl:apply-templates to continue processing the document.&lt;br /&gt;Extract Attributes from XML Data &lt;br /&gt;Example 1.&lt;br /&gt;&lt;xsl:template match="element-name"&gt;&lt;br /&gt; Attribute Value:&lt;br /&gt;  &lt;xsl:value-of select="@attribute"/&gt;&lt;br /&gt;  &lt;xsl:apply-templates/&gt;&lt;br /&gt;&lt;/xsl:template&gt;&lt;br /&gt;&lt;br /&gt;When constructing an XML DTD, how do you create an external entity reference in an attribute value?&lt;br /&gt;Every interview session should have at least one trick question. Although possible when using SGML, XML DTDs don't support defining external entity references in attribute values. It's more important for the candidate to respond to this question in a logical way than than the candidate know the somewhat obscure answer. &lt;br /&gt;How would you build a search engine for large volumes of XML data?&lt;br /&gt;The way candidates answer this question may provide insight into their view of XML data. For those who view XML primarily as a way to denote structure for text files, a common answer is to build a full-text search and handle the data similarly to the way Internet portals handle HTML pages. Others consider XML as a standard way of transferring structured data between disparate systems. These candidates often describe some scheme of importing XML into a relational or object database and relying on the database's engine for searching. Lastly, candidates that have worked with vendors specializing in this area often say that the best way the handle this situation is to use a third party software package optimized for XML data.&lt;br /&gt;Obviously, some important areas of XML technologies were not included in this list -- namespaces, XPointer, XLink, and so on -- and should be added to the interviewer's set of questions if applicable to the particular position that the candidate is applying for. However, these questions in conjunction with others to assess soft skills (communication skills, ability to work on teams, leadership ability, etc.) will help determine how well candidates understand the fundamental principles of XML.&lt;br /&gt;What is Xpath?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is Xpath? &lt;br /&gt;XPath is used to navigate through elements and attributes in an XML document.&lt;br /&gt;&lt;br /&gt;What is XSL?&lt;br /&gt;&lt;br /&gt;XSLT - a language for transforming XML documents&lt;br /&gt;XSLT is used to transform an XML document into another XML document, or another type of document that is recognized by a browser, like HTML and XHTML. Normally XSLT does this by transforming each XML element into an (X)HTML element.&lt;br /&gt;&lt;br /&gt;XPath - a language for navigating in XML documents&lt;br /&gt;XSL-FO - a language for formatting XML documents&lt;br /&gt;&lt;br /&gt;How Schemas Differ from DTDs?&lt;br /&gt;The first, and probably most significant, difference between XML Schemas and XML DTDs is that XML Schemas use XML document syntax. While transforming the syntax to XML doesn’t automatically improve the quality of the description, it does make those descriptions far more extensible than they were in the original DTD syntax. Declarations can have richer and more complex internal structures than declarations in DTDs, and schema designers can take advantage of XML’s containment hierarchies to add extra information where appropriate — even sophisticated information like documentation. There are a few other benefits from this approach. XML Schemas can be stored along with other XML documents in XML-oriented data stores, referenced, and even styled, using tools like XLink, XPointer, and XSL.&lt;br /&gt;&lt;br /&gt;The largest addition XML Schemas provide to the functionality of the descriptions is a vastly improved data typing system. XML Schemas provide data-oriented data types in addition to the more document-oriented data types XML 1.0 DTDs support, making XML more suitable for data interchange applications. Built-in datatypes include strings, booleans, and time values, and the XML Schemas draft provides a mechanism for generating additional data types. Using that system, the draft provides support for all of the XML 1.0 data types (NMTOKENS, IDREFS, etc.) as well as data-specific types like decimal, integer, date, and time. Using XML Schemas, developers can build their own libraries of easily interchanged data types and use them inside schemas or across multiple schemas.&lt;br /&gt;&lt;br /&gt;The current draft of XML Schemas also uses a very different style for declaring elements and attributes to DTDs. In addition to declaring elements and attributes individually, developers can create models — archetypes — that can be applied to multiple elements and refined if necessary. This provides a lot of the functionality SOX had developed to support object-oriented concepts like inheritance. Archetype development and refinement will probably become the mark of the high-end schema developer, much as the effective use of parameter entities was the mark of the high-end DTD developer. Archetypes should be easier to model and use consistently, however.&lt;br /&gt;&lt;br /&gt;XML Schemas also support namespaces, a key feature of the W3C’s vision for the future of XML. While it probably wouldn’t be impossible to integrate DTDs and namespaces, the W3C has decided to move on, supporting namespaces in its newer developments and not retrofitting XML 1.0. In many cases, provided that namespace-prefixes don’t change or simply aren’t used, DTD’s can work just fine with namespaces, and should be able to interoperate with namespaces and schema processing that relies on namespaces. There will be a few cases, however, where namespaces may force developers to use the newer schemas rather than the older DTDs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-2023829824207496365?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/2023829824207496365'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/2023829824207496365'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/06/xml-question-ans.html' title='XML Question &amp; Ans'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-5975887419738731473</id><published>2009-06-12T04:36:00.001-07:00</published><updated>2009-06-12T06:02:36.698-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Validation'/><title type='text'>Validation - RegularExpression</title><content type='html'>Validation:&lt;br /&gt;.Net inbuilt validation control custmaization&lt;br /&gt;1)Create .cs class&lt;br /&gt;  #region LoadREVforLongText1&lt;br /&gt;    public RegularExpressionValidator LoadREVforLongText1(string controlName, string errorMsg, bool isValidationSummary, string valGroup)&lt;br /&gt;    {&lt;br /&gt;        RegularExpressionValidator revControl = new RegularExpressionValidator();&lt;br /&gt;        revControl.ValidationGroup = valGroup;&lt;br /&gt;        revControl.ControlToValidate = controlName;&lt;br /&gt;        revControl.ValidationExpression = @"(?!.*?\b\w{31,}).*";&lt;br /&gt;        revControl.ErrorMessage = "Please enter " + errorMsg + " words length max 30";&lt;br /&gt;&lt;br /&gt;        if (isValidationSummary == true)&lt;br /&gt;        {&lt;br /&gt;            revControl.Display = ValidatorDisplay.None;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        return revControl;&lt;br /&gt;    }&lt;br /&gt;    #endregion&lt;br /&gt;&lt;br /&gt;2)Create a instance for the class on .aspx.cs/.ascx.cs&lt;br /&gt;ValidationControls vc = new ValidationControls();&lt;br /&gt;  protected void RegisterValidationControls()&lt;br /&gt;    {&lt;br /&gt;       RegularExpressionValidator revFullName = vc.LoadREVforLongText1   ("txtFullName", "full name", true, "2");&lt;br /&gt;div_fullname.Controls.Add(revFullName);&lt;br /&gt;    }&lt;br /&gt;3)call the above method on the page load event.&lt;br /&gt;&lt;br /&gt;4)validating text should have div block. where the error message will display.&lt;br /&gt;&lt;br /&gt;5)Need's to put validation summary in design page. set the properties ValidationGroup="2" DisplayMode="List"&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Regular Expression:&lt;/strong&gt;&lt;br /&gt;for Phone no:&lt;br /&gt;   = @"^[\(\)\{\}\[\] a-zA-Z0-9''+,-]{0,100}$"&lt;br /&gt;for Email with hypen&lt;br /&gt;   = @"^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$";&lt;br /&gt;for Email without hypen&lt;br /&gt;   = @"^([0-9a-zA-Z]([.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$";&lt;br /&gt;for Long text without space&lt;br /&gt;  = @"(?!.*?\b\w{31,}).*";&lt;br /&gt;&lt;br /&gt;   #region is Valid word&lt;br /&gt;    public bool isValid(string strText, int maxchars)&lt;br /&gt;    {&lt;br /&gt;        if (strText.Trim().Length &gt; 0)&lt;br /&gt;        {&lt;br /&gt;            strText = strText.Trim();&lt;br /&gt;&lt;br /&gt;            string[] strLines = strText.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);&lt;br /&gt;            int cnt = 0;&lt;br /&gt;            for (int i = 0; i &lt; strLines.Length; i++)&lt;br /&gt;            {&lt;br /&gt;                string[] strWords = strLines[i].Split(' ');&lt;br /&gt;                cnt += strWords.Length;&lt;br /&gt;                for (int j = 0; j &lt; strWords.Length; j++)&lt;br /&gt;                {&lt;br /&gt;                    if (strWords[j].Length &gt; maxchars)&lt;br /&gt;                    {&lt;br /&gt;                        return false;&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        return true;&lt;br /&gt;    }&lt;br /&gt;    #endregion&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-5975887419738731473?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/5975887419738731473'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/5975887419738731473'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/06/validation-regularexpression.html' title='Validation - RegularExpression'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-5119743948320870440</id><published>2009-06-12T02:59:00.000-07:00</published><updated>2009-06-12T03:00:45.614-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>SilverLight</title><content type='html'>What is Silverlight?&lt;br /&gt;&lt;br /&gt;Silverlight is a new cross-browser, cross-platform implementation of the .NET Framework for building and delivering the next generation of media experiences and Rich Interactive Applications(RIA) for the web. It runs in all popular browsers, including Microsoft Internet Explorer, Mozilla Firefox, Apple Safari, Opera. The plugin required to run Silverlight is very small in size hence gets installed very quickly.&lt;br /&gt;&lt;br /&gt;It is combination of different technolgoies into a single development platform that allows you to select tools and the programming language you want to use. Silverlight integrates seamlessly with your existing Javascript and ASP.NET AJAX code to complement functionality which you have already created.&lt;br /&gt;&lt;br /&gt;Silverlight aims to compete with Adobe Flash and the presentation components of Ajax. It also competes with Sun Microsystems' JavaFX, which was launched a few days after Silverlight.&lt;br /&gt;&lt;br /&gt;Currently there are 2 major versions of Silverlight:&lt;br /&gt;&lt;br /&gt;Silverlight 1.0 and Silverlight 2.0( previously referred to as version 1.1). &lt;br /&gt;&lt;br /&gt;Silverlight 1.0 :&lt;br /&gt;&lt;br /&gt;Silverlight 1.0 consists of the core presentation framework, which is responsible for UI, interactivity and user input, basic UI controls, graphics and animation, media playback, DRM support, and DOM integration.&lt;br /&gt;&lt;br /&gt;Main features of Silverlight 1.0 :&lt;br /&gt;&lt;br /&gt;   1. Built-in codec support for playing VC-1 and WMV video, and MP3 and WMA audio within a browser.&lt;br /&gt;   2. Silverlight supports the ability to progressively download and play media content from any web-server.&lt;br /&gt;   3. Silverlight also optionally supports built-in media streaming.&lt;br /&gt;   4. Silverlight enables you to create rich UI and animations, and blend vector graphics with HTML to create compelling content experiences.&lt;br /&gt;   5. Silverlight makes it easy to build rich video player interactive experiences.&lt;br /&gt;&lt;br /&gt;Silverlight 2.0 :&lt;br /&gt;&lt;br /&gt;Silverlight 2.0 includes a version of the .NET Framework, with the full Common Language Runtime as .NET Framework 3.0; so it can execute any .NET language including VB.NET and C# code. Unlike the CLR included with .NET Framework, multiple instances of the CoreCLR included in Silverlight can be hosted in one process. With this, the XAML layout markup file (.xaml file) can be augmented by code-behind code, written in any .NET language, which contains the programming logic.&lt;br /&gt;&lt;br /&gt;This version ships with more than 30 UI controls(including TextBox, CheckBox, Slider, ScrollViewer, and Calendar controls), for two-way databinding support, automated layout management (by means of StackPanel, Grid etc) as well as data-manipulation controls, such as DataGrid and ListBox. UI controls are skinnable using a template-based approach.&lt;br /&gt;&lt;br /&gt;Main features of Silverlight 2.0 :&lt;br /&gt;&lt;br /&gt;   1. A built-in CLR engine that delivers a super high performance execution environment for the browser. Silverlight uses the same core CLR engine that we ship with the full .NET Framework.&lt;br /&gt;   2. Silverlight includes a rich framework library of built-in classes that you can use to develop browser-based applications.&lt;br /&gt;   3. Silverlight includes support for a WPF UI programming model. The Silverlight 1.1 Alpha enables you to program your UI with managed code/event handlers, and supports the ability to define and use encapsulated UI controls.&lt;br /&gt;   4. Silverlight provides a managed HTML DOM API that enables you to program the HTML of a browser using any .NET language.&lt;br /&gt;   5. Silverlight doesn't require ASP.NET to be used on the backend web-server (meaning you could use Silverlight with with PHP on Linux if you wanted to).&lt;br /&gt;   6. Silverlight 2 includes Deep Zoom, a technology derived from Microsoft Live Labs Seadragon. It allows users to zoom into, or out of, an image (or a collage of images), with smooth transitions, using the mouse wheel. The images can scale from 2 or 3 megapixels in resolution into the gigapixel range, but the user need not wait for it to be downloaded entirely; rather, Silverlight downloads only the parts in view, optimized for the zoom level being viewed.&lt;br /&gt;   7. Silverlight 2 also allows limited filesystem access to Silverlight applications. It can use the operating system's native file dialog box to browse to any file (to which the user has access).&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;How Silverlight would change the Web:&lt;br /&gt;&lt;br /&gt;   1. Highest Quality Video Experience : prepare to see some of the best quality videos you have seen in your life, all embedded in highly graphical websites. The same research and technology that was used for VC-1, the codec that powers BluRay and HD DVD, is used by Microsoft today with its streaming media technologies.&lt;br /&gt;   2. Cross-Platform, Cross-Browser : Finally build web applications that work on any browser, and on any operating system. At release, Silverlight will work with Mac as well as Windows!  The Mono project has also already promised support for Linux!.&lt;br /&gt;   3. Developers and Graphic Designers can play together! : Developers familiar with Visual Studio, Microsoft.net will be able to develop amazing Silverlight applications very quickly, and they will work on Mac's and Windows. Developers will finally be able to strictly focus on the back end of the application core, while leaving the visuals to the Graphic Design team using the power of XAML.&lt;br /&gt;   4. Cheaper : Silverlight is now the most inexpensive way to stream video files over the internet at the best quality possible. Licensing is dead simple, all you need is IIS in Windows Server, and you’re done.&lt;br /&gt;   5. Support for 3rd Party Languages : Using the power of the new Dynamic Language Runtime, developers will now be able to use Ruby, Python, and EcmaScript! This means a Ruby developer can develop Silverlight applications, and leverage the .net Framework!&lt;br /&gt;   6. Cross-Platform, Cross-Browser Remote Debugging : If you are in the need to debug an application running on a Mac, no problem! You can now set breakpoints, step into/over code, have immediate windows, and all that other good stuff that Visual Studio provides.&lt;br /&gt;   7. The best development environment on the planet : Visual Studio is an award winning development platform! As it continues to constantly evolve, so will Silverlight!&lt;br /&gt;   8. Silverlight offers copy protection : Have you noticed how easy it is to download YouTube videos to your computer, and save them for later viewing ? Silverlight will finally have the features enabling content providers complete control over their rich media content! Streaming television, new indie broadcast stations, all will now be possible!&lt;br /&gt;   9. Extreme Speed :There is a dramatic improvement in speed for AJAX-enabled websites that begin to use Silverlight, leveraging the Microsoft .net framework.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-5119743948320870440?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/5119743948320870440'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/5119743948320870440'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/06/silverlight.html' title='SilverLight'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-2189496968263964913</id><published>2009-06-11T04:38:00.000-07:00</published><updated>2009-06-12T02:07:44.774-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.Net GridView'/><title type='text'>Excel File Import to Gridview (HTML Format/normal)</title><content type='html'>Excel file directly read and fill the value into Gridview.&lt;br /&gt;below code read the file from application physicalpath/upload control posted file.&lt;br /&gt;&lt;br /&gt;DataSet ds = new DataSet();&lt;br /&gt;&lt;br /&gt; void BindtheGrid()&lt;br /&gt;    {  &lt;br /&gt;        string path = "C\\Projects\\LogicTest\\Report.xls";&lt;br /&gt;        string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" +&lt;br /&gt;        "Data Source=" + path + "Extended Properties='Excel 8.0;IMEX=1;'";&lt;br /&gt;        //You must use the $ after the object you reference in the spreadsheet&lt;br /&gt;        //OleDbDataAdapter myCommand = new OleDbDataAdapter("SELECT * FROM [Report$] ", strConn);&lt;br /&gt;        OleDbDataAdapter myCommand = new OleDbDataAdapter();&lt;br /&gt;        DataTable dt;&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;            myCommand.Fill(ds, "Report");&lt;br /&gt;            dt = ds.Tables["Report"];&lt;br /&gt;        }&lt;br /&gt;        catch (Exception ex)&lt;br /&gt;        {&lt;br /&gt;            //when the excel file could not read ie file is not in format &lt;br /&gt;             /* HttpPostedFile httpUploadedCSV = uploadgroup.PostedFile;          &lt;br /&gt;             StreamReader sr = new StreamReader(httpUploadedCSV.InputStream); if the file is posed by file control*/          &lt;br /&gt;&lt;br /&gt;            string filename = Server.MapPath("Report.xls"); // it is reading directly from the server location &lt;br /&gt;            StreamReader sr = default(StreamReader); &lt;br /&gt;            sr = File.OpenText(filename);&lt;br /&gt;             &lt;br /&gt;&lt;br /&gt;            string s = sr.ReadToEnd();&lt;br /&gt;&lt;br /&gt;            DataSet ds = ConvertHTMLTablesToDataSet(s);&lt;br /&gt;            //dt = ds.Tables[0];&lt;br /&gt;           GridView1.DataSource = ds;&lt;br /&gt;           GridView1.DataBind();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;strong&gt;Some time imported file may be HTML format it would have been stored. needs to read and get the proper dataset/datatable:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;protected DataSet ConvertHTMLTablesToDataSet(string HTML)&lt;br /&gt;    {&lt;br /&gt;        //' Declarations   &lt;br /&gt;       &lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;&lt;br /&gt;            &lt;a href="http://1.bp.blogspot.com/_yPsA-Y4pO1A/SjDv9QWRjSI/AAAAAAAAAGo/TX0e8FS85GQ/s1600-h/table.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 130px;" src="http://1.bp.blogspot.com/_yPsA-Y4pO1A/SjDv9QWRjSI/AAAAAAAAAGo/TX0e8FS85GQ/s320/table.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5346036593328229666" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;            MatchCollection Tables = Regex.Matches(HTML, TableExpression, RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnoreCase);&lt;br /&gt;&lt;br /&gt;            //      ' Get a match for all the tables in the HTML   &lt;br /&gt;&lt;br /&gt;            foreach (Match table in Tables)&lt;br /&gt;            {&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                //        ' Reset the current row counter and the header flag   &lt;br /&gt;                iCurrentRow = 0;&lt;br /&gt;                HeadersExist = false;&lt;br /&gt;&lt;br /&gt;                //' Add a new table to the DataSet   &lt;br /&gt;                dt = new DataTable();&lt;br /&gt;&lt;br /&gt;                //' Create the relevant amount of columns for this table (use the headers if they exist, otherwise use default names)   &lt;br /&gt;&lt;br /&gt;                if (table.Value.Contains("&lt;th"))&lt;br /&gt;                {&lt;br /&gt;                    //   ' Set the HeadersExist flag   &lt;br /&gt;                    HeadersExist = true;&lt;br /&gt;&lt;br /&gt;                    //' Get a match for all the rows in the table   &lt;br /&gt;                    MatchCollection Headers = Regex.Matches(table.Value, HeaderExpression, (RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnoreCase));&lt;br /&gt;&lt;br /&gt;                    //              ' Loop through each header element   &lt;br /&gt;                    foreach (Match Header in Headers)&lt;br /&gt;                    {&lt;br /&gt;                        dt.Columns.Add(Header.Groups[1].ToString());&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;                else&lt;br /&gt;                {&lt;br /&gt;                    for (int iColumns = 1; iColumns &lt; Regex.Matches(Regex.Matches(Regex.Matches(table.Value, TableExpression, RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnoreCase).ToString(), RowExpression, RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnoreCase).ToString(), ColumnExpression, RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnoreCase).Count; iColumns++)&lt;br /&gt;                    {&lt;br /&gt;                        dt.Columns.Add("Column " + iColumns);&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;                //' Get a match for all the rows in the table   &lt;br /&gt;                MatchCollection Rows = Regex.Matches(table.Value, RowExpression, RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnoreCase);&lt;br /&gt;&lt;br /&gt;                //' Loop through each row element   &lt;br /&gt;                foreach (Match Row in Rows)&lt;br /&gt;                {&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                    //                ' Only loop through the row if it isn't a header row&lt;br /&gt;&lt;br /&gt;                    if (!(iCurrentRow == 0 &amp; HeadersExist == true))&lt;br /&gt;                    {&lt;br /&gt;&lt;br /&gt;                        //                  ' Create a new row and reset the current column counter   &lt;br /&gt;                        dr = dt.NewRow();&lt;br /&gt;                        iCurrentColumn = 0;&lt;br /&gt;&lt;br /&gt;                        //               ' Get a match for all the columns in the row   &lt;br /&gt;                        MatchCollection Columns = Regex.Matches(Row.Value, ColumnExpression, RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnoreCase);&lt;br /&gt;&lt;br /&gt;                        //                 ' Loop through each column element   &lt;br /&gt;                        foreach (Match Column in Columns)&lt;br /&gt;                        {&lt;br /&gt;                            if (Column.Groups[1].ToString().Trim() == "&amp;nbsp;")&lt;br /&gt;                            {&lt;br /&gt;                                dr[iCurrentColumn] = "";&lt;br /&gt;                            }&lt;br /&gt;                            else&lt;br /&gt;                            {&lt;br /&gt;                                dr[iCurrentColumn] = Column.Groups[1].ToString().Trim();&lt;br /&gt;                            }&lt;br /&gt;                            //                    ' Increase the current column    &lt;br /&gt;                            iCurrentColumn += 1;&lt;br /&gt;                        }&lt;br /&gt;&lt;br /&gt;                        //                ' Add the DataRow to the DataTable   &lt;br /&gt;                        dt.Rows.Add(dr);&lt;br /&gt;&lt;br /&gt;                    }&lt;br /&gt;&lt;br /&gt;                    //            ' Increase the current row counter   &lt;br /&gt;                    iCurrentRow += 1;&lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                //' Add the DataTable to the DataSet   &lt;br /&gt;                ds.Tables.Add(dt);&lt;br /&gt;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;        catch (Exception e)&lt;br /&gt;        {&lt;br /&gt;            //lblerr.Text = "File is not in the Expected Format. Save the File as 'Excel 97-2003 Workbook' Format, then try Import.";&lt;br /&gt;            if (ds.Tables.Count == 0)&lt;br /&gt;            {&lt;br /&gt;                DataTable dt = new DataTable();&lt;br /&gt;                ds.Tables.Add(dt);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        return ds;&lt;br /&gt;    }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-2189496968263964913?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/2189496968263964913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/2189496968263964913'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/06/excel-file-import-to-gridview-html.html' title='Excel File Import to Gridview (HTML Format/normal)'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_yPsA-Y4pO1A/SjDv9QWRjSI/AAAAAAAAAGo/TX0e8FS85GQ/s72-c/table.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-7254764851797783335</id><published>2009-06-09T03:48:00.000-07:00</published><updated>2009-06-12T02:15:14.025-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.Net GridView'/><title type='text'>GridView Export into excel &amp; Generate XML Dataset Values</title><content type='html'>DAL - Data Access Layer &lt;br /&gt;&lt;br /&gt; static SqlConnection GetConnectionObject()&lt;br /&gt;    {&lt;br /&gt;        SqlConnection con = new SqlConnection();&lt;br /&gt;        string connectionstring;&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;            connectionstring = ConfigurationManager.ConnectionStrings["logictest"].ConnectionString; ;&lt;br /&gt;            con.ConnectionString = connectionstring;&lt;br /&gt;&lt;br /&gt;            return con;&lt;br /&gt;        }&lt;br /&gt;        catch (Exception ex)&lt;br /&gt;        {&lt;br /&gt;            throw ex;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;public static DataSet ExecuteSQLReturnDataSet(string strSQL)&lt;br /&gt;    {&lt;br /&gt;        DataSet ds = new DataSet("DataSet");&lt;br /&gt;        SqlConnection con = GetConnectionObject();&lt;br /&gt;        SqlDataAdapter da = new SqlDataAdapter(strSQL, con);&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;            da.Fill(ds);&lt;br /&gt;            return ds;&lt;br /&gt;        }&lt;br /&gt;        catch (Exception ex)&lt;br /&gt;        {&lt;br /&gt;            throw ex;&lt;br /&gt;        }&lt;br /&gt;        finally&lt;br /&gt;        {&lt;br /&gt;            con.Close();&lt;br /&gt;            con.Dispose();&lt;br /&gt;            da.Dispose();&lt;br /&gt;            ds.Dispose();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;GridView Export into excel:&lt;/strong&gt;&lt;br /&gt;Method to GeneratetheReport:&lt;br /&gt;&lt;br /&gt; public void ReportGeneration(DataSet dset, string filename)&lt;br /&gt;    {&lt;br /&gt;       &lt;br /&gt;        GridView gv = new GridView();&lt;br /&gt;        gv.DataSource = dset;&lt;br /&gt;        gv.DataBind(); //Read the grid value however the report format may be excel/pdf&lt;br /&gt;        HttpContext.Current.Response.Clear();&lt;br /&gt;        HttpContext.Current.Response.OutputStream.Write(new byte[] { 0xef, 0xbb, 0xbf }, 0, 3);&lt;br /&gt;        HttpContext.Current.Response.Buffer = true;&lt;br /&gt;        HttpContext.Current.Response.AddHeader("content-disposition", "attachment;filename=" + filename + "");&lt;br /&gt;        HttpContext.Current.Response.ContentType = "application/ms-excel";&lt;br /&gt;        StringWriter oStringWriter = new StringWriter();&lt;br /&gt;        HtmlTextWriter oHtmlTextWriter = new HtmlTextWriter(oStringWriter);&lt;br /&gt;        gv.RenderControl(oHtmlTextWriter);&lt;br /&gt;        HttpContext.Current.Response.Write(oStringWriter.ToString());&lt;br /&gt;        HttpContext.Current.Response.End();&lt;br /&gt;        HttpContext.Current.Response.Flush();&lt;br /&gt;        HttpContext.Current.ApplicationInstance.CompleteRequest();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;On btnclic/load event call the below method&lt;br /&gt;&lt;br /&gt;  void BindGridView()&lt;br /&gt;    {&lt;br /&gt;        DataSet ds = new DataSet();&lt;br /&gt;        ds = ExecuteSQLReturnDataSet("select * from tablename");&lt;br /&gt;        grd.DataSource = ds;&lt;br /&gt;        grd.DataBind();&lt;br /&gt;        if (ds.Tables[0].Rows.Count &gt; 0)&lt;br /&gt;        {&lt;br /&gt;            ReportGeneration(ds, "Report.xls");&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;strong&gt;Generate XML Dataset Values:&lt;/strong&gt;&lt;br /&gt; public void XMLGenarate()&lt;br /&gt;    {&lt;br /&gt;        string XMLFileName = "C:/Projects/XMLGenerate" + DateTime.Now.ToString("dd-mm-yyyy") +"";   // can set it in web.config&lt;br /&gt;        DataSet ds = new DataSet();&lt;br /&gt;        ds = ExecuteSQLReturnDataSet("select * from tableName"); // can pass it as a parameter of(string) / from Data Access Layer which has coding standard.&lt;br /&gt;        FileStream fs = null;&lt;br /&gt;        if (ds.Tables[0].Rows.Count &gt; 0)&lt;br /&gt;        {&lt;br /&gt;            fs = new FileStream(XMLFileName + ".xml", FileMode.OpenOrCreate, FileAccess.Write);&lt;br /&gt;            ds.WriteXml(fs);&lt;br /&gt;            fs.Close();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;on btnclick/load event call the above method.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-7254764851797783335?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/7254764851797783335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/7254764851797783335'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/06/gridview-export-into-excel-generate-xml.html' title='GridView Export into excel &amp; Generate XML Dataset Values'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-3921792154896866268</id><published>2009-06-09T00:38:00.000-07:00</published><updated>2009-06-12T01:36:17.819-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><title type='text'>Using the FOR XML Clause to Return Query Results as XML</title><content type='html'>SQL Server lets you retrieve data as XML by supporting the FOR XML clause, which can be included as part of your query. You can use the FOR XML clause in the main (outer) query as well as in subqueries. The clause supports numerous options that let you define the format of the XML data.&lt;br /&gt;&lt;br /&gt;When you include the FOR XML clause in your query, you must specify one of the four supported modes—RAW, AUTO, EXPLICIT, or PATH. The options available to each mode vary according to that mode; however, many of the options are shared among the modes. In this article, I explain how to use each of these modes to retrieve data as XML and provide examples that demonstrate how they use the various options. &lt;br /&gt;&lt;br /&gt;The RAW Mode&lt;br /&gt;&lt;br /&gt;The RAW mode generates a single XML element for each row in the result set returned by the query.&lt;br /&gt;&lt;br /&gt;To use the FOR XML clause in RAW mode, you simply append the clause and RAW keyword to your SELECT statement, as shown in the following example:&lt;br /&gt;&lt;br /&gt;it return row's in a form of xml.&lt;br /&gt;&lt;br /&gt;SELECT e.EmployeeID, c.FirstName, c.MiddleName, c.LastName&lt;br /&gt;FROM HumanResources.Employee e INNER JOIN Person.Contact c&lt;br /&gt;ON c.ContactID = e.ContactID&lt;br /&gt;WHERE c.FirstName = 'Rob'&lt;br /&gt;FOR XML RAW;&lt;br /&gt;&lt;br /&gt;row's get the id basix (ie name)&lt;br /&gt;&lt;br /&gt;SELECT e.EmployeeID, c.FirstName, c.MiddleName, c.LastName&lt;br /&gt;FROM HumanResources.Employee e INNER JOIN Person.Contact c&lt;br /&gt;ON c.ContactID = e.ContactID&lt;br /&gt;WHERE c.FirstName = 'Rob'&lt;br /&gt;FOR XML RAW ('Employee');&lt;br /&gt;&lt;br /&gt;can specify only roots/ elements to&lt;br /&gt;&lt;br /&gt;SELECT e.EmployeeID, c.FirstName, c.MiddleName, c.LastName&lt;br /&gt;FROM HumanResources.Employee e INNER JOIN Person.Contact c&lt;br /&gt;ON c.ContactID = e.ContactID&lt;br /&gt;WHERE c.FirstName = 'Rob'&lt;br /&gt;FOR XML RAW ('Employee'), ROOT ('Employees'), ELEMENTS;&lt;br /&gt;&lt;br /&gt;no elements are created for a column whose value is null. However, you can override this behavior by adding the XSINIL keyword to the ELEMENTS option:&lt;br /&gt;&lt;br /&gt;SELECT e.EmployeeID, c.FirstName, c.MiddleName, c.LastName&lt;br /&gt;FROM HumanResources.Employee e INNER JOIN Person.Contact c&lt;br /&gt;ON c.ContactID = e.ContactID&lt;br /&gt;WHERE c.FirstName = 'Rob'&lt;br /&gt;FOR XML RAW ('Employee'), ROOT ('Employees'), ELEMENTS XSINIL;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-3921792154896866268?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/3921792154896866268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/3921792154896866268'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/06/using-for-xml-clause-to-return-query.html' title='Using the FOR XML Clause to Return Query Results as XML'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-3765078160480870549</id><published>2009-05-26T02:01:00.000-07:00</published><updated>2009-05-26T02:16:24.594-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>Image Resize (on fly thumbnail image generation)</title><content type='html'>1)web.config&lt;br /&gt; &lt;a href="http://4.bp.blogspot.com/_yPsA-Y4pO1A/Shuyo8QDv6I/AAAAAAAAAGY/RFv3zeqBbyU/s1600-h/webconfig.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 86px;" src="http://4.bp.blogspot.com/_yPsA-Y4pO1A/Shuyo8QDv6I/AAAAAAAAAGY/RFv3zeqBbyU/s320/webconfig.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5340058199615848354" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2)Create Folder called images (on application physical path)&lt;br /&gt;&lt;br /&gt;3)Create .cs&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Data;&lt;br /&gt;using System.Configuration;&lt;br /&gt;using System.Web;&lt;br /&gt;using System.Web.Security;&lt;br /&gt;using System.Web.UI;&lt;br /&gt;using System.Web.UI.WebControls;&lt;br /&gt;using System.Web.UI.WebControls.WebParts;&lt;br /&gt;using System.Web.UI.HtmlControls;&lt;br /&gt;using System.Drawing;&lt;br /&gt;using System.Drawing.Drawing2D;&lt;br /&gt;using System.Drawing.Imaging;&lt;br /&gt;using System.IO;&lt;br /&gt;&lt;br /&gt;/// &lt;summary&gt;&lt;br /&gt;/// Summary description for Lib&lt;br /&gt;/// &lt;/summary&gt;&lt;br /&gt;public class Lib&lt;br /&gt;{&lt;br /&gt; public Lib()&lt;br /&gt; {&lt;br /&gt;  //&lt;br /&gt;  // TODO: Add constructor logic here&lt;br /&gt;  //&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    #region Thumbnail Functions&lt;br /&gt;    public bool ThumbnailCallback()&lt;br /&gt;    {&lt;br /&gt;        return false;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    private float DeterminePercentageForResize(int height, int width)&lt;br /&gt;    {&lt;br /&gt;        int highestValue;&lt;br /&gt;        if (height &gt; width)&lt;br /&gt;            highestValue = height;&lt;br /&gt;        else&lt;br /&gt;            highestValue = width;&lt;br /&gt;&lt;br /&gt;        float percent = (float)int.Parse(ConfigurationManager.AppSettings["ThumbSize"].ToString()) / (float)highestValue;&lt;br /&gt;&lt;br /&gt;        if (percent &gt; 1 &amp;&amp; percent != 0)&lt;br /&gt;            throw new Exception("Percent cannot be greater than 1 or equal to zero");&lt;br /&gt;        else&lt;br /&gt;            return percent;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    private static System.Drawing.Image FixedSize(System.Drawing.Image imgPhoto, int Width, int Height)&lt;br /&gt;    {&lt;br /&gt;        int sourceWidth = imgPhoto.Width;&lt;br /&gt;        int sourceHeight = imgPhoto.Height;&lt;br /&gt;        int sourceX = 0;&lt;br /&gt;        int sourceY = 0;&lt;br /&gt;        int destX = 0;&lt;br /&gt;        int destY = 0;&lt;br /&gt;&lt;br /&gt;        float nPercent = 0;&lt;br /&gt;        float nPercentW = 0;&lt;br /&gt;        float nPercentH = 0;&lt;br /&gt;&lt;br /&gt;        nPercentW = ((float)Width / (float)sourceWidth);&lt;br /&gt;        nPercentH = ((float)Height / (float)sourceHeight);&lt;br /&gt;        if (nPercentH &lt; nPercentW)&lt;br /&gt;        {&lt;br /&gt;            nPercent = nPercentH;&lt;br /&gt;            destX = System.Convert.ToInt16((Width -&lt;br /&gt;                          (sourceWidth * nPercent)) / 2);&lt;br /&gt;        }&lt;br /&gt;        else&lt;br /&gt;        {&lt;br /&gt;            nPercent = nPercentW;&lt;br /&gt;            destY = System.Convert.ToInt16((Height -&lt;br /&gt;                          (sourceHeight * nPercent)) / 2);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        int destWidth = (int)(sourceWidth * nPercent);&lt;br /&gt;        int destHeight = (int)(sourceHeight * nPercent);&lt;br /&gt;&lt;br /&gt;        Bitmap bmPhoto = new Bitmap(Width, Height,&lt;br /&gt;                          PixelFormat.Format24bppRgb);&lt;br /&gt;        bmPhoto.SetResolution(imgPhoto.HorizontalResolution,&lt;br /&gt;                         imgPhoto.VerticalResolution);&lt;br /&gt;&lt;br /&gt;        Graphics grPhoto = Graphics.FromImage(bmPhoto);&lt;br /&gt;        grPhoto.Clear(Color.White);&lt;br /&gt;        grPhoto.InterpolationMode =&lt;br /&gt;                InterpolationMode.HighQualityBicubic;&lt;br /&gt;&lt;br /&gt;        grPhoto.DrawImage(imgPhoto,&lt;br /&gt;            new Rectangle(0, 0, destWidth, destHeight),&lt;br /&gt;            new Rectangle(0, 0, sourceWidth, sourceHeight),&lt;br /&gt;            GraphicsUnit.Pixel);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        grPhoto.Dispose();&lt;br /&gt;        return bmPhoto;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public bool SaveAsThumbnail(string largeimage)&lt;br /&gt;    {&lt;br /&gt;        bool status = false;&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;            string strPathPrefix = ConfigurationManager.AppSettings["UploadPrefix"].ToString();&lt;br /&gt;            string strPath = ConfigurationManager.AppSettings["UploadLocation"].ToString();&lt;br /&gt;&lt;br /&gt;            string strFilename = System.IO.Path.GetFileNameWithoutExtension(HttpContext.Current.Server.MapPath(strPathPrefix + strPath + largeimage));&lt;br /&gt;            string strThumbnail = strFilename + "_small.jpg";&lt;br /&gt;&lt;br /&gt;            int intThumbnailSize = int.Parse(ConfigurationManager.AppSettings["ThumbSize"].ToString());&lt;br /&gt;            int intWidth, intHeight;&lt;br /&gt;            Bitmap photo;&lt;br /&gt;&lt;br /&gt;            try&lt;br /&gt;            {&lt;br /&gt;                photo = new Bitmap(HttpContext.Current.Server.MapPath(strPathPrefix + strPath + largeimage));&lt;br /&gt;            }&lt;br /&gt;            catch (ArgumentException)&lt;br /&gt;            {&lt;br /&gt;                throw new HttpException(404, "Photo not found.");&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            if (photo.Width &gt; intThumbnailSize)&lt;br /&gt;            {&lt;br /&gt;                if (photo.Width &gt; photo.Height)&lt;br /&gt;                {&lt;br /&gt;                    intWidth = intThumbnailSize;&lt;br /&gt;                    intHeight = photo.Height * intThumbnailSize / photo.Width;&lt;br /&gt;                }&lt;br /&gt;                else&lt;br /&gt;                {&lt;br /&gt;                    intWidth = photo.Width * intThumbnailSize / photo.Height;&lt;br /&gt;                    intHeight = intThumbnailSize;&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            else&lt;br /&gt;            {&lt;br /&gt;                intWidth = photo.Width;&lt;br /&gt;                intHeight = photo.Height;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            System.Drawing.Image imgPhotoVert = System.Drawing.Image.FromFile(HttpContext.Current.Server.MapPath(strPathPrefix + strPath + largeimage));&lt;br /&gt;            System.Drawing.Image imgPhoto = null;&lt;br /&gt;&lt;br /&gt;            imgPhoto = FixedSize(imgPhotoVert, intWidth, intHeight);&lt;br /&gt;            imgPhoto.Save(HttpContext.Current.Server.MapPath(strPathPrefix + strPath + strThumbnail), ImageFormat.Jpeg);&lt;br /&gt;            imgPhoto.Dispose();&lt;br /&gt;            imgPhotoVert.Dispose();&lt;br /&gt;            photo.Dispose();&lt;br /&gt;            status = true;&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;        catch (Exception ex)&lt;br /&gt;        {&lt;br /&gt;            //AppLogger.LogError("SaveAsThumbnail(): " + ex.Message, AppLogger.Severity.Error);&lt;br /&gt;            ex.Message.ToString();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        return status;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public bool SaveAsImage(string largeimage, int ResizeImageSize, string FileNameRef)&lt;br /&gt;    {&lt;br /&gt;        bool status = false;&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;            string strPathPrefix = ConfigurationManager.AppSettings["UploadPrefix"].ToString();&lt;br /&gt;            string strPath = ConfigurationManager.AppSettings["UploadLocation"].ToString();&lt;br /&gt;&lt;br /&gt;            string strFilename = System.IO.Path.GetFileNameWithoutExtension(HttpContext.Current.Server.MapPath(strPathPrefix + strPath + largeimage));&lt;br /&gt;            string strThumbnail = strFilename + "_" + FileNameRef + ".jpg";&lt;br /&gt;&lt;br /&gt;            int intThumbnailSize = ResizeImageSize;&lt;br /&gt;            int intWidth, intHeight;&lt;br /&gt;            Bitmap photo;&lt;br /&gt;&lt;br /&gt;            try&lt;br /&gt;            {&lt;br /&gt;                photo = new Bitmap(HttpContext.Current.Server.MapPath(strPathPrefix + strPath + largeimage));&lt;br /&gt;            }&lt;br /&gt;            catch (ArgumentException)&lt;br /&gt;            {&lt;br /&gt;                throw new HttpException(404, "Photo not found.");&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            if (photo.Width &gt; intThumbnailSize)&lt;br /&gt;            {&lt;br /&gt;                if (photo.Width &gt; photo.Height)&lt;br /&gt;                {&lt;br /&gt;                    intWidth = intThumbnailSize;&lt;br /&gt;                    intHeight = photo.Height * intThumbnailSize / photo.Width;&lt;br /&gt;                }&lt;br /&gt;                else&lt;br /&gt;                {&lt;br /&gt;                    intWidth = photo.Width * intThumbnailSize / photo.Height;&lt;br /&gt;                    intHeight = intThumbnailSize;&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            else&lt;br /&gt;            {&lt;br /&gt;                intWidth = photo.Width;&lt;br /&gt;                intHeight = photo.Height;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            System.Drawing.Image imgPhotoVert = System.Drawing.Image.FromFile(HttpContext.Current.Server.MapPath(strPathPrefix + strPath + largeimage));&lt;br /&gt;            System.Drawing.Image imgPhoto = null;&lt;br /&gt;&lt;br /&gt;            imgPhoto = FixedSize(imgPhotoVert, intWidth, intHeight);&lt;br /&gt;            imgPhoto.Save(HttpContext.Current.Server.MapPath(strPathPrefix + strPath + strThumbnail), ImageFormat.Jpeg);&lt;br /&gt;            imgPhoto.Dispose();&lt;br /&gt;            imgPhotoVert.Dispose();&lt;br /&gt;            photo.Dispose();&lt;br /&gt;            status = true;&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;        catch (Exception ex)&lt;br /&gt;        {&lt;br /&gt;            //AppLogger.LogError("SaveAsImage(): " + ex.Message, AppLogger.Severity.Error);&lt;br /&gt;            ex.&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        return status;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    #endregion&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;4).aspx/ascx&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_yPsA-Y4pO1A/ShuzLlwVjfI/AAAAAAAAAGg/2G6a5Qgx-Bw/s1600-h/im.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 103px;" src="http://1.bp.blogspot.com/_yPsA-Y4pO1A/ShuzLlwVjfI/AAAAAAAAAGg/2G6a5Qgx-Bw/s320/im.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5340058794872638962" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;5).aspx.cs/.ascx.cs&lt;br /&gt; on btn_click event &lt;br /&gt;        string strpPath = ConfigurationManager.AppSettings["UploadLocation"].ToString();&lt;br /&gt;        string strpPathPrefix = ConfigurationManager.AppSettings["UploadPrefix"].ToString();&lt;br /&gt;        string extenstion = DateTime.Now.ToString("ddMMyy-HHmm");&lt;br /&gt;        string filepath = "", strResizeFilename = "", strFullFilename = "";&lt;br /&gt;        bool ResizeImage = false;&lt;br /&gt;&lt;br /&gt;        Lib objlib = new Lib();&lt;br /&gt;&lt;br /&gt;        if (fPhotUpload.FileName != "")&lt;br /&gt;        {&lt;br /&gt;            if (fPhotUpload.HasFile)&lt;br /&gt;            {&lt;br /&gt;&lt;br /&gt;                if (fPhotUpload.HasFile)&lt;br /&gt;                {&lt;br /&gt;                    filepath = extenstion + fPhotUpload.FileName.Replace(" ", "_");&lt;br /&gt;                    strFullFilename = Server.MapPath(strpPathPrefix + strpPath) + filepath;&lt;br /&gt;                    fPhotUpload.SaveAs(strFullFilename);&lt;br /&gt;                    ResizeImage = objlib.SaveAsImage(filepath, Convert.ToInt16(ConfigurationManager.AppSettings["LargeThumbSize"]), "large");&lt;br /&gt;                }&lt;br /&gt;                if (ResizeImage == true)&lt;br /&gt;                {&lt;br /&gt;&lt;br /&gt;                    strResizeFilename = System.IO.Path.GetFileNameWithoutExtension(filepath);&lt;br /&gt;                    hdnbigimage.Value = strResizeFilename + "_large.jpg";&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                    ResizeImage = false;&lt;br /&gt;                    ResizeImage = objlib.SaveAsImage(filepath, Convert.ToInt16(ConfigurationManager.AppSettings["ThumbSize"]), "small");&lt;br /&gt;&lt;br /&gt;                    if (ResizeImage == true)&lt;br /&gt;                    {&lt;br /&gt;                        strResizeFilename = "";&lt;br /&gt;                        strResizeFilename = System.IO.Path.GetFileNameWithoutExtension(filepath);&lt;br /&gt;                        hdnsmallimage.Value = strResizeFilename + "_small.jpg";&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;                else&lt;br /&gt;                {&lt;br /&gt;                    lblMsg.Text = "Image path cannot be found";&lt;br /&gt;                    return;&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-3765078160480870549?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/3765078160480870549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/3765078160480870549'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/05/image-resize-on-fly-thumbnail-image.html' title='Image Resize (on fly thumbnail image generation)'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_yPsA-Y4pO1A/Shuyo8QDv6I/AAAAAAAAAGY/RFv3zeqBbyU/s72-c/webconfig.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-2318599946865673736</id><published>2009-05-22T01:39:00.000-07:00</published><updated>2009-06-12T01:31:53.164-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.Net Crystal Report'/><title type='text'>Crystal Reports</title><content type='html'>CRYSTAL REPORT STEPS TO GENERATE:&lt;br /&gt;&lt;br /&gt;1) "Add New Item" dialog box, select "Crystal Report" as the template, provide the name "SampleRpt01.rpt" and click on the "Add" button&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_yPsA-Y4pO1A/ShZk_yEkFQI/AAAAAAAAAFo/a4pmfz6--TA/s1600-h/cry1.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 210px;" src="http://4.bp.blogspot.com/_yPsA-Y4pO1A/ShZk_yEkFQI/AAAAAAAAAFo/a4pmfz6--TA/s320/cry1.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5338565455229752578" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2) Crystal Reports Gallery&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_yPsA-Y4pO1A/ShZlQW0RklI/AAAAAAAAAFw/qPtdbSJcK7g/s1600-h/cry2.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://3.bp.blogspot.com/_yPsA-Y4pO1A/ShZlQW0RklI/AAAAAAAAAFw/qPtdbSJcK7g/s320/cry2.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5338565739971449426" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3)Connect with DB.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_yPsA-Y4pO1A/ShZmBSquhdI/AAAAAAAAAF4/SgqT2gPGha4/s1600-h/cry3.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 246px;" src="http://4.bp.blogspot.com/_yPsA-Y4pO1A/ShZmBSquhdI/AAAAAAAAAF4/SgqT2gPGha4/s320/cry3.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5338566580671251922" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_yPsA-Y4pO1A/ShZmSlR0x-I/AAAAAAAAAGA/YjL_CpXXYg0/s1600-h/cry4.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 246px;" src="http://3.bp.blogspot.com/_yPsA-Y4pO1A/ShZmSlR0x-I/AAAAAAAAAGA/YjL_CpXXYg0/s320/cry4.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5338566877724854242" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Once the report gets added, you should be able to see the Visual Studio layout with "Field Explorer," the new "Crystal Reports" menu and an "Embedded Crystal Report Designer" with two modes ("Main Report" and "Main Report Preview" at the bottom) as shown below.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_yPsA-Y4pO1A/ShZmdSviroI/AAAAAAAAAGI/Lr04xMrzZBg/s1600-h/cry5.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://4.bp.blogspot.com/_yPsA-Y4pO1A/ShZmdSviroI/AAAAAAAAAGI/Lr04xMrzZBg/s320/cry5.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5338567061727784578" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The "Field Explorer" can be used to drag and drop the columns onto the report, add new, add new tables to the report, add new formula oriented columns, running totals, and so on. &lt;br /&gt;&lt;br /&gt;The report designer is initially divided into five sections (Report Header, Report Footer, Page Header, Page Footer and Details). Report Header gets displayed only on the first page. Report Footer gets displayed only on the last page. Page Header gets displayed on top of every page. Page Footer gets displayed at the bottom of every page. The Detail section is the body of the report where all of the rows get displayed.&lt;br /&gt;&lt;br /&gt;Using the formatting toolbar, properties windows and tools in toolbox, we can format the report in the required manner. Try playing with formatting the report (and preview it simultaneously without executing the project).&lt;br /&gt;&lt;br /&gt;Displaying Crystal Report on the ASP.NET 2.0 web page&lt;br /&gt;&lt;br /&gt;To display the report on the web page, we need to work with Crystal Report Viewer control. The following are the steps required to attach the Crystal Report to the ASP.NET 2.0 web page:&lt;br /&gt;&lt;br /&gt;Using the ToolBox, drag and drop the CrystalReportViewer control.&lt;br /&gt;&lt;br /&gt;Using the Smart tag of the CrystalReportViewer control, select "New Report Source." &lt;br /&gt;&lt;br /&gt;This leads you to a new dialog box, "Crystal Report Source." Every CrystalReportViewer gets associated with the CrystalReportSource control. You can directly drag and drop the CrystalReportSource control from the toolbox as well and assign the same in a smart tag. Provide the details and click OK.&lt;br /&gt;&lt;br /&gt;The moment you hit OK, you should be previewing the report. Just hit F5 to execute your web site. Once the web page gets displayed, provide logon information for the report and click on "Logon." &lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_yPsA-Y4pO1A/ShZpxMtaqoI/AAAAAAAAAGQ/F0xQdUHVyGc/s1600-h/cry6.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 50px;" src="http://3.bp.blogspot.com/_yPsA-Y4pO1A/ShZpxMtaqoI/AAAAAAAAAGQ/F0xQdUHVyGc/s320/cry6.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5338570702240524930" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;using CrystalDecisions.CrystalReports.Engine;&lt;br /&gt;using CrystalDecisions.Shared;&lt;br /&gt;using System.Data.SqlClient;&lt;br /&gt;&lt;br /&gt;protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;{ &lt;br /&gt;    ConnectionInfo ConnInfo = new ConnectionInfo(); &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;    { &lt;br /&gt;        ConnInfo.ServerName = ".sqlexpress"; &lt;br /&gt;        &lt;br /&gt;        ConnInfo.DatabaseName = "Northwind"; &lt;br /&gt;        &lt;br /&gt;        ConnInfo.UserID = "sa"; &lt;br /&gt;        &lt;br /&gt;            &lt;br /&gt;        ConnInfo.Password = "eXpress2005"; &lt;br /&gt;    } &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;    foreach (TableLogOnInfo cnInfo in this.CrystalReportViewer1.LogOnInfo) &lt;br /&gt;   {         &lt;br /&gt;            &lt;br /&gt;        cnInfo.ConnectionInfo = ConnInfo; &lt;br /&gt;   } &lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;//&lt;br /&gt;/*      &lt;br /&gt; Directly bind the report to the viewr control on Page Load event&lt;br /&gt;&lt;br /&gt; CrystalDecisions.CrystalReports.Engine.ReportDocument rd =&lt;br /&gt; new CrystalDecisions.CrystalReports.Engine.ReportDocument();&lt;br /&gt;&lt;br /&gt; rd.Load(Server.MapPath("CrystalReport.rpt"));&lt;br /&gt;        rd.SetDataSource(ds);&lt;br /&gt;        CrystalReportViewer1.ReportSource = rd;&lt;br /&gt;        CrystalReportViewer1.DataBind();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;*/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-2318599946865673736?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/2318599946865673736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/2318599946865673736'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/05/crystal-reports.html' title='Crystal Reports'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_yPsA-Y4pO1A/ShZk_yEkFQI/AAAAAAAAAFo/a4pmfz6--TA/s72-c/cry1.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-4260019666957741355</id><published>2009-05-22T00:16:00.000-07:00</published><updated>2009-06-12T02:16:32.484-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.Net GridView'/><title type='text'>Pagination Custamization</title><content type='html'>Pagination Custamization:&lt;br /&gt;&lt;br /&gt;1).aspx/.ascx Design View&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_yPsA-Y4pO1A/ShZUcGeknFI/AAAAAAAAAFY/4vpS-K7qxWU/s1600-h/test.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 230px;" src="http://1.bp.blogspot.com/_yPsA-Y4pO1A/ShZUcGeknFI/AAAAAAAAAFY/4vpS-K7qxWU/s320/test.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5338547250046213202" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_yPsA-Y4pO1A/ShZUqgGidDI/AAAAAAAAAFg/yanIQ9DoXg4/s1600-h/test1.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 148px;" src="http://1.bp.blogspot.com/_yPsA-Y4pO1A/ShZUqgGidDI/AAAAAAAAAFg/yanIQ9DoXg4/s320/test1.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5338547497442898994" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2).aspx.cs/.ascx.cs&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; private int intCurrentselectPage;&lt;br /&gt;&lt;br /&gt; #region CurrentselectPage&lt;br /&gt;        public int CurrentSelectPage&lt;br /&gt;        {&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                return intCurrentselectPage;&lt;br /&gt;            }&lt;br /&gt;            set&lt;br /&gt;            {&lt;br /&gt;                intCurrentselectPage = value;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;#endregion&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; protected void grdNewsList_DataBound(object sender, EventArgs e)&lt;br /&gt;        {&lt;br /&gt;            if (grdNewsList.Rows.Count &gt; 0)&lt;br /&gt;            {&lt;br /&gt;                GridViewRow gNavFooter = grdNewsList.BottomPagerRow;&lt;br /&gt;                LinkButton lbP = gNavFooter.FindControl("lbPrev") as LinkButton;&lt;br /&gt;                LinkButton lbN = gNavFooter.FindControl("lbNext") as LinkButton;&lt;br /&gt;                try&lt;br /&gt;                {&lt;br /&gt;                    if (grdNewsList.PageIndex == 0)&lt;br /&gt;                    {&lt;br /&gt;                        lbP.Enabled = false;&lt;br /&gt;                    }&lt;br /&gt;&lt;br /&gt;                    int iStartIndex = 0;&lt;br /&gt;                    int iCurrentPage = CurrentSelectPage + 1;&lt;br /&gt;&lt;br /&gt;                    int iCalc = (iCurrentPage / 5) + ((iCurrentPage % 5) &gt;= 1 ? 1 : (iCurrentPage % 5));&lt;br /&gt;&lt;br /&gt;                    if (iCalc &gt; 1)&lt;br /&gt;                    {&lt;br /&gt;                        iStartIndex = (((iCalc * 5) - 5) + 1);&lt;br /&gt;                    }&lt;br /&gt;                    else&lt;br /&gt;                    {&lt;br /&gt;                        iStartIndex = 1;&lt;br /&gt;                    }&lt;br /&gt;&lt;br /&gt;                    for (int i = 1; i &lt;= 5; i++)&lt;br /&gt;                    {&lt;br /&gt;                        LinkButton lb = gNavFooter.FindControl("lb" + i.ToString()) as LinkButton;&lt;br /&gt;&lt;br /&gt;                        lb.Text = iStartIndex.ToString();&lt;br /&gt;                        lb.CommandArgument = iStartIndex.ToString();&lt;br /&gt;                        if (iStartIndex &gt; grdNewsList.PageCount)&lt;br /&gt;                        {&lt;br /&gt;                            lb.Visible = false;&lt;br /&gt;                        }&lt;br /&gt;                        if (iStartIndex == grdNewsList.PageIndex + 1)&lt;br /&gt;                        {&lt;br /&gt;                            lb.Enabled = false;&lt;br /&gt;                        }&lt;br /&gt;                        iStartIndex++;&lt;br /&gt;                    }&lt;br /&gt;&lt;br /&gt;                    if (grdNewsList.PageIndex == grdNewsList.PageCount - 1)&lt;br /&gt;                    {&lt;br /&gt;                        lbN.Enabled = false;&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;                catch (Exception ex)&lt;br /&gt;                {&lt;br /&gt;                    throw (ex);&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   protected void grdNewsList_PageIndexChanging(object sender, GridViewPageEventArgs e)&lt;br /&gt;        {&lt;br /&gt;            CurrentSelectPage = e.NewPageIndex;&lt;br /&gt;            grdNewsList.PageIndex = e.NewPageIndex;&lt;br /&gt;            DisplayFromListPublishedNews(); // Bind the Method again.&lt;br /&gt;        }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-4260019666957741355?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/4260019666957741355'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/4260019666957741355'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/05/pagination-custamization.html' title='Pagination Custamization'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_yPsA-Y4pO1A/ShZUcGeknFI/AAAAAAAAAFY/4vpS-K7qxWU/s72-c/test.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-4542195003627276290</id><published>2009-05-21T22:25:00.000-07:00</published><updated>2009-06-12T01:34:16.557-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Log File .Net'/><title type='text'>Error Log</title><content type='html'>XML Format.&lt;br /&gt;&lt;br /&gt;1)Create a .cs file.&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Data;&lt;br /&gt;using System.Configuration;&lt;br /&gt;using System.Web;&lt;br /&gt;using System.Web.Security;&lt;br /&gt;using System.Web.UI;&lt;br /&gt;using System.Web.UI.WebControls;&lt;br /&gt;using System.Web.UI.WebControls.WebParts;&lt;br /&gt;using System.Web.UI.HtmlControls;&lt;br /&gt;using System.Xml;&lt;br /&gt;using System.IO;&lt;br /&gt;using System.Text;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/// &lt;summary&gt;&lt;br /&gt;/// Summary description for AppLogger&lt;br /&gt;/// &lt;/summary&gt;&lt;br /&gt;public static class AppLogger&lt;br /&gt;{&lt;br /&gt;    // Fields&lt;br /&gt;    private static XmlDocument LogDoc;&lt;br /&gt;    private static XmlElement LogElement;&lt;br /&gt;    private static XmlNode LogNode;&lt;br /&gt;&lt;br /&gt;    // Methods&lt;br /&gt;    static AppLogger()&lt;br /&gt;    {&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;            LogDoc = new XmlDocument();&lt;br /&gt;            string path = HttpContext.Current.Server.MapPath(ConfigurationManager.AppSettings["ErrorFolder"] +"\\"+ DateTime.Now.ToString("dd-MM-yyyy") + ".xml");&lt;br /&gt;         &lt;br /&gt;            if (!File.Exists(path))&lt;br /&gt;            {&lt;br /&gt;                XmlTextWriter writer = new XmlTextWriter(path, Encoding.Unicode);&lt;br /&gt;                writer.WriteStartDocument(true);&lt;br /&gt;                writer.WriteStartElement("LOGGER");&lt;br /&gt;                writer.WriteEndElement();&lt;br /&gt;                writer.Close();&lt;br /&gt;            }&lt;br /&gt;            try&lt;br /&gt;            {&lt;br /&gt;                LogDoc.Load(path);&lt;br /&gt;            }&lt;br /&gt;            catch&lt;br /&gt;            {&lt;br /&gt;                 &lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        catch&lt;br /&gt;        {&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public static void LogError(string Message, Severity severity)&lt;br /&gt;    {&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;            if(Message!="Thread was being aborted.")&lt;br /&gt;           {&lt;br /&gt;//in the web config specify the path(where to store log file like (&lt;add key="ErrorFolder" value="/logs"/&gt;)).&lt;br /&gt;            string path = HttpContext.Current.Server.MapPath(ConfigurationManager.AppSettings["ErrorFolder"] + "\\" + DateTime.Now.ToString("dd-MM-yyyy") + ".xml");&lt;br /&gt;         &lt;br /&gt;         &lt;br /&gt;            if (!File.Exists(path))&lt;br /&gt;            {&lt;br /&gt;                XmlTextWriter writer = new XmlTextWriter(path, Encoding.Unicode);&lt;br /&gt;                writer.WriteStartDocument(true);&lt;br /&gt;                writer.WriteStartElement("LOGGER");&lt;br /&gt;                writer.WriteEndElement();&lt;br /&gt;                writer.Close();&lt;br /&gt;                LogDoc = new XmlDocument();&lt;br /&gt;                LogDoc.Load(path);&lt;br /&gt;            }&lt;br /&gt;            LogNode = LogDoc.DocumentElement;&lt;br /&gt;            LogElement = LogDoc.CreateElement("ELOG");&lt;br /&gt;            Message = Message.Replace("&amp;", "&amp;amp;");&lt;br /&gt;            Message = Message.Replace("&lt;", "&amp;lt;");&lt;br /&gt;            Message = Message.Replace("&gt;", "&amp;gt;");&lt;br /&gt;            LogElement.InnerXml = "&lt;TIME&gt;" + DateTime.Now.ToLongTimeString() + "&lt;/TIME&gt;&lt;SEVERITY&gt;" + severity.ToString() + "&lt;/SEVERITY&gt;&lt;DESC&gt;" + Message + "&lt;/DESC&gt;";&lt;br /&gt;            LogNode.AppendChild(LogElement);&lt;br /&gt;           &lt;br /&gt;            LogDoc.Save(path);&lt;br /&gt;        }&lt;br /&gt;      }&lt;br /&gt;        catch&lt;br /&gt;        {&lt;br /&gt;        }&lt;br /&gt;    &lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    // Nested Types&lt;br /&gt;    public enum Severity&lt;br /&gt;    {&lt;br /&gt;        Error = 2,&lt;br /&gt;        Failure = 3,&lt;br /&gt;        Informational = 1&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;on the aspx/ascx in a catch block write below lines&lt;br /&gt; &lt;br /&gt;2) AppLogger.LogError("User Edit Profile, Sending Mail() " + ex.Message, AppLogger.Severity.Error);&lt;br /&gt;&lt;br /&gt;TXT format&lt;br /&gt;1)Create .cs file &lt;br /&gt;&lt;br /&gt;  public static void ErrorLogFile(string strErrorMessage)&lt;br /&gt;    {&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;            string strPath = "~/LogFile/ErrorDetails/" + DateTime.Today.ToString("dd-mm-yy") + ".txt";&lt;br /&gt;            if (!File.Exists(System.Web.HttpContext.Current.Server.MapPath(strPath)))&lt;br /&gt;            {&lt;br /&gt;                File.Create(System.Web.HttpContext.Current.Server.MapPath(strPath)).Close();&lt;br /&gt;            }&lt;br /&gt;            using (StreamWriter sWriter = File.AppendText(System.Web.HttpContext.Current.Server.MapPath(strPath)))&lt;br /&gt;            {&lt;br /&gt;                sWriter.WriteLine("\r\nLog Entry : ");&lt;br /&gt;                sWriter.WriteLine("{0}", DateTime.Now.ToString(CultureInfo.InvariantCulture));&lt;br /&gt;                string strError = "Error in: " + System.Web.HttpContext.Current.Request.Url.ToString() +&lt;br /&gt;                              ". Error Message:" + strErrorMessage;&lt;br /&gt;                sWriter.WriteLine(strError);&lt;br /&gt;                sWriter.WriteLine("__________________________");&lt;br /&gt;                sWriter.Flush();&lt;br /&gt;                sWriter.Close();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        catch (Exception ex)&lt;br /&gt;        {&lt;br /&gt;            ErrorLogFile(ex.Message);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;2)call this file catch block&lt;br /&gt; clsLogFile.ErrorLogFile(ex.Message);&lt;br /&gt;&lt;br /&gt;The same way we can track the mail sent details from the server.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-4542195003627276290?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/4542195003627276290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/4542195003627276290'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/05/error-log.html' title='Error Log'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-1701084959893454583</id><published>2009-05-21T22:21:00.000-07:00</published><updated>2009-05-21T22:24:19.786-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Optimization</title><content type='html'># Try to restrict the queries result set by using the WHERE clause.&lt;br /&gt;This can results in good performance benefits, because SQL Server will return to client only particular rows, not all rows from the table(s). This can reduce network traffic and boost the overall performance of the query.&lt;br /&gt;&lt;br /&gt;# Try to restrict the queries result set by returning only the particular columns from the table, not all table's columns.&lt;br /&gt;This can results in good performance benefits, because SQL Server will return to client only particular columns, not all table's columns. This can reduce network traffic and boost the overall performance of the query.&lt;br /&gt;&lt;br /&gt;# Use views and stored procedures instead of heavy-duty queries.&lt;br /&gt;This can reduce network traffic, because your client will send to server only stored procedure or view name (perhaps with some parameters) instead of large heavy-duty queries text. This can be used to facilitate permission management also, because you can restrict user access to table columns they should not see.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# Try to avoid using SQL Server cursors, whenever possible.&lt;br /&gt;SQL Server cursors can result in some performance degradation in comparison with select statements. Try to use correlated subquery or derived tables, if you need to perform row-by-row operations.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# If you need to return the total table's row count, you can use alternative way instead of SELECT COUNT(*) statement.&lt;br /&gt;Because SELECT COUNT(*) statement make a full table scan to return the total table's row count, it can take very many time for the large table. There is another way to determine the total row count in a table. You can use sysindexes system table, in this case. There is ROWS column in the sysindexes table. This column contains the total row count for each table in your database. So, you can use the following select statement instead of SELECT COUNT(*): SELECT rows FROM sysindexes WHERE id = OBJECT_ID('table_name') AND indid &lt; 2 So, you can improve the speed of such queries in several times.&lt;br /&gt;See this article for more details:&lt;br /&gt;Alternative way to get the table's row count.&lt;br /&gt;&lt;br /&gt;# Try to use constraints instead of triggers, whenever possible.&lt;br /&gt;Constraints are much more efficient than triggers and can boost performance. So, you should use constraints instead of triggers, whenever possible.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# Use table variables instead of temporary tables.&lt;br /&gt;Table variables require less locking and logging resources than temporary tables, so table variables should be used whenever possible. The table variables are available in SQL Server 2000 only.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# Try to avoid the HAVING clause, whenever possible.&lt;br /&gt;The HAVING clause is used to restrict the result set returned by the GROUP BY clause. When you use GROUP BY with the HAVING clause, the GROUP BY clause divides the rows into sets of grouped rows and aggregates their values, and then the HAVING clause eliminates undesired aggregated groups. In many cases, you can write your select statement so, that it will contain only WHERE and GROUP BY clauses without HAVING clause. This can improve the performance of your query.&lt;br /&gt;&lt;br /&gt;# Try to avoid using the DISTINCT clause, whenever possible.&lt;br /&gt;Because using the DISTINCT clause will result in some performance degradation, you should use this clause only when it is necessary.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# Include SET NOCOUNT ON statement into your stored procedures to stop the message indicating the number of rows affected by a T-SQL statement.&lt;br /&gt;This can reduce network traffic, because your client will not receive the message indicating the number of rows affected by a T-SQL statement.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# Use the select statements with TOP keyword or the SET ROWCOUNT statement, if you need to return only the first n rows.&lt;br /&gt;This can improve performance of your queries, because the smaller result set will be returned. This can also reduce the traffic between the server and the clients.&lt;br /&gt;&lt;br /&gt;# Use the FAST number_rows table hint if you need to quickly return 'number_rows' rows.&lt;br /&gt;You can quickly get the n rows and can work with them, when the query continues execution and produces its full result set.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# Try to use UNION ALL statement instead of UNION, whenever possible.&lt;br /&gt;The UNION ALL statement is much faster than UNION, because UNION ALL statement does not look for duplicate rows, and UNION statement does look for duplicate rows, whether or not they exist.&lt;br /&gt;&lt;br /&gt;# Do not use optimizer hints in your queries.&lt;br /&gt;Because SQL Server query optimizer is very clever, it is very unlikely that you can optimize your query by using optimizer hints, more often, this will hurt performance.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-1701084959893454583?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/1701084959893454583'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/1701084959893454583'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/05/optimization.html' title='Optimization'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5661587522794049577.post-2819161963496427052</id><published>2009-05-21T04:23:00.000-07:00</published><updated>2009-05-21T04:45:45.923-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>Localization</title><content type='html'>To specify the culture (language basis to load the text) follow the below steps:&lt;br /&gt;&lt;br /&gt;Default Folder which it's get creat by vs.net&lt;br /&gt;&lt;br /&gt;App_GlobalResources&lt;br /&gt;&lt;br /&gt;1)Create a resource file (Contactus.resx) it is common for English. based on the langeuage needs to specify the culture text name like (Contactus.it.resx- for itally,Contactus.de.resx - for detuch)&lt;br /&gt;how ever the label's specify&lt;br /&gt;2)&lt;br /&gt;void Loadtext()&lt;br /&gt;{&lt;br /&gt; lblfname.Text = Resources.Contactus.lblfname;&lt;br /&gt; lblsurname.Text = Resources.Contactus.lblsname;&lt;br /&gt; lblemail.Text = Resources.Contactus.lblemail;&lt;br /&gt; lblGender.Text = Resources.Contactus.lblgender;&lt;br /&gt; lblphone.Text = Resources.Contactus.lblphone;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;3) Call the above method on your page load event. based on the culture it's read from the App_GlobalResources.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5661587522794049577-2819161963496427052?l=angeltechworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/2819161963496427052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5661587522794049577/posts/default/2819161963496427052'/><link rel='alternate' type='text/html' href='http://angeltechworld.blogspot.com/2009/05/localization.html' title='Localization'/><author><name>Meera</name><uri>http://www.blogger.com/profile/00383340225793617425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_yPsA-Y4pO1A/S83Y5n4WyDI/AAAAAAAAAXM/PnrvsbdgESI/S220/Picture+007.jpg'/></author></entry></feed>
