<?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-6593678539754314140</id><updated>2011-11-23T21:55:24.252-08:00</updated><category term='3-TierIntroduction'/><category term='Abstract class'/><category term='Class and structure'/><category term='AutoEventWireup.'/><category term='C# for All Interviews.'/><category term='Cache'/><category term='New series of Microsoft Webcasts'/><category term='Asp'/><category term='Access Modifiers'/><category term='Asp.net'/><category term='Application Domains'/><category term='assembly'/><category term='Ado.net'/><title type='text'>GET-YOUR-SOLUTION</title><subtitle type='html'>ASP.NET, SQL, CSS, JAVASCRIPT, WEB SERVICES,MOSS2007,SHAREPOINT SERVER,FAQs,</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>53</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-4305204793716826494</id><published>2009-09-10T22:26:00.001-07:00</published><updated>2009-09-10T22:26:43.267-07:00</updated><title type='text'>.Net-Insert Excel Data into Database</title><content type='html'>// Connection String to Excel Workbook&lt;br /&gt;string excelConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Empinfo.xls;Extended Properties=""Excel 8.0;HDR=YES;""";&lt;br /&gt;// Create Connection to Excel Workbook&lt;br /&gt;using (OleDbConnection connection = new OleDbConnection(excelConnectionString))&lt;br /&gt;{&lt;br /&gt;OleDbCommand command = new OleDbCommand("Select * FROM [Sheet1$]", connection);&lt;br /&gt;connection.Open();&lt;br /&gt;// Create DbDataReader to Data Worksheet&lt;br /&gt;using (OleDbDataReader dr = command.ExecuteReader())&lt;br /&gt;{&lt;br /&gt;// SQL Server Connection String&lt;br /&gt;string sqlConnectionString = "Data Source=SCSHYD-067\\SQLEXPRESS;Initial Catalog=test;Integrated Security=True";&lt;br /&gt;// Bulk Copy to SQL Server&lt;br /&gt;using (SqlBulkCopy bulkCopy = new SqlBulkCopy(sqlConnectionString))&lt;br /&gt;{&lt;br /&gt;bulkCopy.DestinationTableName = "INA_EIS_EMOF_EMEM_OFFL";&lt;br /&gt;bulkCopy.WriteToServer(dr);&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/6593678539754314140-4305204793716826494?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/4305204793716826494/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=4305204793716826494' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/4305204793716826494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/4305204793716826494'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2009/09/net-insert-excel-data-into-database.html' title='.Net-Insert Excel Data into Database'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-5562898978619217016</id><published>2009-09-10T21:41:00.000-07:00</published><updated>2009-09-10T21:43:30.684-07:00</updated><title type='text'>SQl-Insert Excel Data into Database</title><content type='html'>/****** Object: StoredProcedure [dbo].[fs_prog_rt_InsertTransaction] Script Date: 09/10/2009 19:47:29 ******/&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;-- =============================================&lt;br /&gt;-- Author: &lt;author,,name&gt;&lt;br /&gt;-- Create date: &lt;create&gt;&lt;br /&gt;-- Description: &lt;description,,&gt;&lt;br /&gt;-- =============================================&lt;br /&gt;CREATE PROCEDURE [dbo].[fs_prog_rt_InsertTransaction]&lt;br /&gt;@xmlData XML,&lt;br /&gt;@ErrorMessage varchar(500) OUTPUT&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt;BEGIN TRY&lt;br /&gt;SET NOCOUNT ON;&lt;br /&gt;&lt;br /&gt;DECLARE @SubId VARCHAR(20)&lt;br /&gt;DECLARE @EntryType VARCHAR(50)&lt;br /&gt;DECLARE @ContainerCode VARCHAR(20)&lt;br /&gt;DECLARE @EquipmentId VARCHAR(20)&lt;br /&gt;DECLARE @ProcessCode VARCHAR(20)&lt;br /&gt;DECLARE @TestTypeCode VARCHAR(20)&lt;br /&gt;DECLARE @CreatedByUserId VARCHAR(50)&lt;br /&gt;DECLARE @CreatedTime VARCHAR(50)&lt;br /&gt;DECLARE @idoc INT&lt;br /&gt;DECLARE @LogId INT&lt;br /&gt;DECLARE @return_Value INT&lt;br /&gt;DECLARE @ValidationErrorMessage VARCHAR(500)&lt;br /&gt;&lt;br /&gt;EXEC sp_xml_preparedocument @idoc OUTPUT, @xmlData&lt;br /&gt;&lt;br /&gt;SELECT * into #temp_table FROM OPENXML (@idoc,'/NewDataSet/RT_Transaction',0)&lt;br /&gt;WITH (LogId int 'LogId',&lt;br /&gt;SubId varchar(50) 'SubId',&lt;br /&gt;EntryType Varchar(50) 'EntryType',&lt;br /&gt;ContainerCode varchar(50) 'ContainerCode',&lt;br /&gt;CreatedByUserId varchar(10) 'CreatedByUserId',&lt;br /&gt;ProcessCode varchar(100) 'ProcessCode',&lt;br /&gt;EquipmentId varchar(50) 'EquipmentId',&lt;br /&gt;TestTypeCode varchar(50) 'TestTypeCode',&lt;br /&gt;CreatedTime varchar(100) 'CreatedTime')&lt;br /&gt;&lt;br /&gt;EXEC sp_xml_removedocument @idoc&lt;br /&gt;&lt;br /&gt;CREATE TABLE #temp_Errortable (&lt;br /&gt;LogId int,&lt;br /&gt;SubId varchar(50),EntryType Varchar(50),ContainerCode varchar(50),CreatedByUserId varchar(10),ProcessCode varchar(100),EquipmentId varchar(50),TestTypeCode varchar(50),CreatedTime varchar(100),ErrorMessage Varchar(250))&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SELECT TOP 1 @LogId = [LOGID] FROM #temp_table&lt;br /&gt;&lt;br /&gt;WHILE (ISNULL(@LogId,0) &lt;&gt; 0)&lt;br /&gt;BEGIN&lt;br /&gt;SELECT&lt;br /&gt;@SubId = SubID,&lt;br /&gt;@EntryType = EntryType,&lt;br /&gt;@ContainerCode = ContainerCode,&lt;br /&gt;@EquipmentId = EquipmentId,&lt;br /&gt;@ProcessCode = ProcessCode,&lt;br /&gt;@TestTypeCode = TestTypeCode,&lt;br /&gt;@CreatedByUserId = CreatedByUserId,&lt;br /&gt;@CreatedTime = CreatedTime&lt;br /&gt;FROM #temp_table WHERE [LOGID] = @LogId&lt;br /&gt;&lt;br /&gt;IF (@EntryType = 'Cart/Box')&lt;br /&gt;BEGIN&lt;br /&gt;EXEC @return_Value = dbo.RT_ValidateAndInsertCart @SubId,@EntryType,@ContainerCode,@CreatedByUserId,@ValidationErrorMessage OUTPUT,@ErrorMessage OUTPUT&lt;br /&gt;END&lt;br /&gt;ELSE&lt;br /&gt;BEGIN&lt;br /&gt;EXEC @return_Value = dbo.RT_ValidateAndInsertEquipment @SubId,@EntryType,@EquipmentId,@TestTypeCode,@ProcessCode,@CreatedByUserId,@ValidationErrorMessage OUTPUT,@ErrorMessage OUTPUT&lt;br /&gt;END&lt;br /&gt;IF (@ValidationErrorMessage &lt;&gt; '')&lt;br /&gt;BEGIN&lt;br /&gt;-- INSERT INTO #temp_Errortable SELECT LogId,SubId,EntryType,ContainerCode,CreatedByUserId,ProcessCode,EquipmentId,TestTypeCode,CreatedTime,@ValidationErrorMessage AS ErrorMessage FROM #temp_table Where LogId=@LogId&lt;br /&gt;INSERT INTO #temp_Errortable Values(@LogId,@SubId,@EntryType,@ContainerCode,@CreatedByUserId,@ProcessCode,@EquipmentId,@TestTypeCode,@CreatedTime,@ValidationErrorMessage)&lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;DELETE #temp_table WHERE [LOGID] = @LogId&lt;br /&gt;set @LogId = 0&lt;br /&gt;SELECT TOP 1 @LogId=[LOGID] FROM #temp_table&lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;DROP TABLE #temp_table&lt;br /&gt;&lt;br /&gt;Select * From #temp_Errortable&lt;br /&gt;DROP TABLE #temp_Errortable&lt;br /&gt;SET NOCOUNT OFF&lt;br /&gt;END TRY&lt;br /&gt;BEGIN CATCH&lt;br /&gt;BEGIN&lt;br /&gt;SELECT @ErrorMessage=ERROR_MESSAGE()&lt;br /&gt;END&lt;br /&gt;END CATCH&lt;br /&gt;END&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-5562898978619217016?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/5562898978619217016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=5562898978619217016' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/5562898978619217016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/5562898978619217016'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2009/09/sql-inser-excel-data-into-database.html' title='SQl-Insert Excel Data into Database'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-4730355192349056164</id><published>2009-09-07T04:29:00.000-07:00</published><updated>2009-09-07T04:30:17.644-07:00</updated><title type='text'>String Array</title><content type='html'>&lt;span style="color:#cc33cc;"&gt;strEmployeeName="Tester(Test)";&lt;br /&gt;/// &lt;summary&gt;&lt;br /&gt;/// It will return Full name and FQN&lt;br /&gt;/// &lt;/summary&gt;&lt;br /&gt;/// &lt;param name="strEmployeeName"&gt;&lt;/param&gt;&lt;br /&gt;/// &lt;returns&gt;&lt;/returns&gt;&lt;br /&gt;public string[] SplitEmployeeNameFQN(string strEmployeeName)&lt;br /&gt;{&lt;br /&gt;string[] strInputValue = strEmployeeName.Split(';');&lt;br /&gt;string[] arrReturn = new string[2];&lt;br /&gt;//string employeeName = string.Empty;&lt;br /&gt;string strFQN = string.Empty;&lt;br /&gt;for (int i = 0; i &lt; strInputValue.Length; i++)&lt;br /&gt;{&lt;br /&gt;if (!(strInputValue[i] == ""))&lt;br /&gt;{&lt;br /&gt;int startIndex = strInputValue[i].IndexOf("(");&lt;br /&gt;strFQN = strInputValue[i].Substring(startIndex + 1);&lt;br /&gt;strFQN = strFQN.Replace(")", "");&lt;br /&gt;arrReturn[0] += strFQN.Trim() + ";";&lt;br /&gt;arrReturn[1] += strInputValue[i].Remove(startIndex).Trim() + ";";&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;return arrReturn;&lt;br /&gt;} &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-4730355192349056164?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/4730355192349056164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=4730355192349056164' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/4730355192349056164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/4730355192349056164'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2009/09/string-array.html' title='String Array'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-7576221765464820550</id><published>2009-08-24T22:31:00.001-07:00</published><updated>2009-08-24T22:31:38.919-07:00</updated><title type='text'>SQL Search</title><content type='html'>CREATE PROCEDURE [dbo].[GetSparePartsECRETS]    &lt;br /&gt;(  &lt;br /&gt;  @pnEcretsNum      INT    = NULL  &lt;br /&gt;    ,@pnvcEcretsTitle  NVARCHAR(100) = NULL  &lt;br /&gt; ,@pnvcOriginatorID NVARCHAR(50)  = NULL  &lt;br /&gt;)   &lt;br /&gt;AS    &lt;br /&gt;  &lt;br /&gt;BEGIN    &lt;br /&gt;     &lt;br /&gt; /*SET NOCOUNT TO ON AND NO LONGER DISPLAY THE COUNT MESSAGE*/    &lt;br /&gt; SET NOCOUNT ON    &lt;br /&gt;    &lt;br /&gt; /*START THE TRY BLOCK*/    &lt;br /&gt; BEGIN TRY    &lt;br /&gt;  IF @pnEcretsNum = ''  SET @pnEcretsNum = NULL  &lt;br /&gt;  IF @pnvcEcretsTitle = ''  SET @pnvcEcretsTitle = NULL  &lt;br /&gt;  IF @pnvcOriginatorID = ''  SET @pnvcOriginatorID = NULL  &lt;br /&gt;  &lt;br /&gt;  SELECT   &lt;br /&gt;   TBLE.ECRETSID,  &lt;br /&gt;   TBLE.[Title],  &lt;br /&gt;   [TBEI].[FirstName] +' '+COALESCE([TBEI].[LastName],'') AS Originator     &lt;br /&gt;            FROM dbo.tblECRETS  TBLE,  &lt;br /&gt;     dbo.TblEmployeeInfo TBEI  &lt;br /&gt;   WHERE   (TBLE.ECRETSID = @pnEcretsNum OR @pnEcretsNum IS NULL)  &lt;br /&gt;    AND (TBLE.Title   =  @pnvcEcretsTitle OR @pnvcEcretsTitle IS NULL)  &lt;br /&gt;    AND (TBLE.OriginatorID = @pnvcOriginatorID OR @pnvcOriginatorID IS NULL)  &lt;br /&gt;    AND TBLE.OriginatorID = TBEI.FQN  &lt;br /&gt;     &lt;br /&gt; END TRY   &lt;br /&gt; BEGIN CATCH    &lt;br /&gt;  IF @@ERROR != 0    &lt;br /&gt;   BEGIN    &lt;br /&gt;    SELECT    &lt;br /&gt;    ERROR_NUMBER() AS ErrorNumber    &lt;br /&gt;    ,ERROR_MESSAGE() AS ErrorMessage    &lt;br /&gt;   END    &lt;br /&gt; END CATCH    &lt;br /&gt;    &lt;br /&gt; /*Reset SET NOCOUNT to OFF*/    &lt;br /&gt; SET NOCOUNT OFF    &lt;br /&gt;END&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-7576221765464820550?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/7576221765464820550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=7576221765464820550' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/7576221765464820550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/7576221765464820550'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2009/08/sql-search.html' title='SQL Search'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-5860992585397578209</id><published>2009-07-23T00:50:00.001-07:00</published><updated>2009-07-23T00:50:44.119-07:00</updated><title type='text'>Web Services</title><content type='html'>1. Which attribute is used in order that the method can be used as WebService ? &lt;br /&gt; WebMethod attribute has to be specified in order that the method and property can be treated as WebService.&lt;br /&gt;2. Do webservice have state ? &lt;br /&gt;Twist :- How can we maintain State in Webservices ?&lt;br /&gt; Webservices as such do not have any mechanism by which they can maintain state.&lt;br /&gt;3. How to Authentication for Web Services&lt;br /&gt; using SOAP headers&lt;br /&gt;4. HOW TO: Pass Current Credentials to an ASP.NET Web Service&lt;br /&gt; myProxy.Credentials = System.Net.CredentialCache.DefaultCredentials&lt;br /&gt;OR&lt;br /&gt; localhost.MyWebService myService = new localhost.MyWebService();&lt;br /&gt; System.Net.CredentialCache myCredentials = new System.Net.CredentialCache();&lt;br /&gt; NetworkCredential netCred = new NetworkCredential("UserName", "Password");&lt;br /&gt; myCredentials.Add(new Uri(myService.Url), "Basic", netCred);&lt;br /&gt; myService.Credentials = myCredentials;&lt;br /&gt;---------&lt;br /&gt;  DataSet dsPartDetails = new DataSet();&lt;br /&gt;            Item[] arrPartDetails = null;&lt;br /&gt;            arrPartDetails = objSrchPartsCommonMethods.GetPartService(vendorPartNum, manPartNum);&lt;br /&gt;            dsPartDetails = objSrchPartsCommonMethods.ConvertArrayToDataSet(arrPartDetails);&lt;br /&gt;----------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; public FirstSolarMasterDataServices.Item[] GetPartService(string partNumber, string manPartNum)&lt;br /&gt;    {&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;            FirstSolarMasterDataServices.MasterData objFirstSolarERPWebService = new FirstSolarMasterDataServices.MasterData();&lt;br /&gt;            FirstSolarMasterDataServices.Item[] arrParts;&lt;br /&gt;&lt;br /&gt;            objFirstSolarERPWebService = ImpersonateDevUser();&lt;br /&gt;&lt;br /&gt;            //Calling Web services menthods&lt;br /&gt;            arrParts = objFirstSolarERPWebService.GetItems(ConfigurationManager.AppSettings["CompanyId"].ToString(), "", partNumber, "","",manPartNum);&lt;br /&gt;            return arrParts;&lt;br /&gt;        }&lt;br /&gt;        catch&lt;br /&gt;        {&lt;br /&gt;            throw;&lt;br /&gt;        }&lt;br /&gt;        //code used at Onsite&lt;br /&gt;        //comment this  code at ODC&lt;br /&gt;&lt;br /&gt;        //finally&lt;br /&gt;        //{&lt;br /&gt;        //    if (m_Ctx != null)&lt;br /&gt;        //    {&lt;br /&gt;        //        m_Ctx.Undo();&lt;br /&gt;        //    }&lt;br /&gt;        //}&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt; private FirstSolarMasterDataServices.MasterData ImpersonateDevUser()&lt;br /&gt;    {&lt;br /&gt;        FirstSolarMasterDataServices.MasterData objFirstSolarErpModifyWebService = new FirstSolarMasterDataServices.MasterData();&lt;br /&gt;&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;            //code used at ODC&lt;br /&gt;            //comment this  code at Onsite&lt;br /&gt;            //*************************************&lt;br /&gt;           &lt;br /&gt;            NetworkCredential nwCredentials = new NetworkCredential();&lt;br /&gt;&lt;br /&gt;            nwCredentials.UserName = ConfigurationManager.AppSettings["NWUserName"].ToString();&lt;br /&gt;            nwCredentials.Password = ConfigurationManager.AppSettings["NWPassword"].ToString();&lt;br /&gt;            nwCredentials.Domain = ConfigurationManager.AppSettings["NWDomain"].ToString();&lt;br /&gt;&lt;br /&gt;            //Assignign credentials to web services&lt;br /&gt;            objFirstSolarErpModifyWebService.Credentials = new NetworkCredential(nwCredentials.UserName, nwCredentials.Password, nwCredentials.Domain);&lt;br /&gt;&lt;br /&gt;            //*************************************&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            //code used at Onsite&lt;br /&gt;            //comment this  code at ODC&lt;br /&gt;            //*************************************&lt;br /&gt;&lt;br /&gt;            //m_Ctx = WindowsIdentity.GetCurrent().Impersonate();&lt;br /&gt;            //RevertToSelf();&lt;br /&gt;&lt;br /&gt;            //objFirstSolarERPModifyWebService.Url = ModifyWebService;&lt;br /&gt;&lt;br /&gt;            // //We have to authenticate ourselves with the web service.&lt;br /&gt;            //objFirstSolarERPModifyWebService.PreAuthenticate = true;&lt;br /&gt;            //objFirstSolarERPModifyWebService.Credentials = System.Net.CredentialCache.DefaultCredentials;           &lt;br /&gt;&lt;br /&gt;            //*************************************&lt;br /&gt;        }&lt;br /&gt;        catch&lt;br /&gt;        {&lt;br /&gt;            throw;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        return objFirstSolarErpModifyWebService;&lt;br /&gt;    }&lt;br /&gt;------------------&lt;br /&gt;Covert Arrat to Dataset&lt;br /&gt;---&lt;br /&gt; public DataSet ConvertArrayToDataSet(Object[] objArray)&lt;br /&gt;    {&lt;br /&gt;        XmlTextReader reader;&lt;br /&gt;        DataSet arrayDataSet = new DataSet();&lt;br /&gt;        MemoryStream memStream = new MemoryStream();&lt;br /&gt;        XmlTextWriter writer = new XmlTextWriter(memStream, System.Text.Encoding.UTF8);&lt;br /&gt;        XmlSerializer serializer = new XmlSerializer(objArray.GetType());&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;            serializer.Serialize(writer, objArray);&lt;br /&gt;            memStream.Position = 0;&lt;br /&gt;            reader = new XmlTextReader(memStream);&lt;br /&gt;            arrayDataSet.ReadXml(reader);&lt;br /&gt;&lt;br /&gt;            return arrayDataSet;&lt;br /&gt;        }&lt;br /&gt;        catch (Exception ex)&lt;br /&gt;        {&lt;br /&gt;            throw;&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/6593678539754314140-5860992585397578209?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/5860992585397578209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=5860992585397578209' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/5860992585397578209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/5860992585397578209'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2009/07/web-services.html' title='Web Services'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-6882874013179385086</id><published>2009-07-21T05:18:00.001-07:00</published><updated>2009-07-21T05:18:52.643-07:00</updated><title type='text'>Use Data View</title><content type='html'>protected void BindEmployee()&lt;br /&gt;    {&lt;br /&gt;        ConnectDB objConnectDB = null;&lt;br /&gt;        SqlConnection objSqlConnection = null;&lt;br /&gt;        SqlCommand objSqlCommand = null;&lt;br /&gt;        SqlDataAdapter objSqlDataAdapter = null;&lt;br /&gt;        DataSet objDataSet = null;&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;            objConnectDB = new ConnectDB();&lt;br /&gt;            objSqlConnection = objConnectDB.getConnection();&lt;br /&gt;            objDataSet = new DataSet();&lt;br /&gt;            //string strSQL = "SELECT GUID,FirstName+' '+coalesce(LastName,'') as FullName from TblEmployeeInfo where active=1 order by FirstName+' '+coalesce(LastName,'')";&lt;br /&gt;            string strSQL = "SELECT GUID, FirstName+' '+coalesce(LastName,'') as FullName, REPLACE(FirstName+' '+coalesce(LastName,''),'''','\\''') as FullNameRead from TblEmployeeInfo where active=1 order by FirstName+' '+coalesce(LastName,'')";&lt;br /&gt;&lt;br /&gt;            objSqlCommand = new SqlCommand(strSQL, objSqlConnection);&lt;br /&gt;            objSqlDataAdapter = new SqlDataAdapter(objSqlCommand);&lt;br /&gt;&lt;br /&gt;            objSqlDataAdapter.Fill(objDataSet);&lt;br /&gt;&lt;br /&gt;            if (txtFilter.Text == "")&lt;br /&gt;            {&lt;br /&gt;                grdvwEmployee.DataSource = objDataSet.Tables[0];&lt;br /&gt;            }&lt;br /&gt;            else&lt;br /&gt;            {&lt;br /&gt;                //DataView dv = new DataView(objDataSet.Tables[0], "FullName like '%" + txtFilter.Text.Trim() + "%'", "", DataViewRowState.CurrentRows);&lt;br /&gt;                DataView dv = new DataView(objDataSet.Tables[0], "FullName like '%" + txtFilter.Text.Trim().Replace("'", "") + "%'", "", DataViewRowState.CurrentRows);&lt;br /&gt;                grdvwEmployee.DataSource = dv;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            &lt;br /&gt;            grdvwEmployee.DataBind();&lt;br /&gt;&lt;br /&gt;         &lt;br /&gt;        }&lt;br /&gt;        catch (Exception ex)&lt;br /&gt;        {&lt;br /&gt;            lblMsg.Text = "Error: " + ex.Message;&lt;br /&gt;        }&lt;br /&gt;        finally&lt;br /&gt;        {&lt;br /&gt;            objSqlCommand.Dispose();&lt;br /&gt;            objSqlDataAdapter.Dispose();&lt;br /&gt;            objDataSet.Dispose();&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/6593678539754314140-6882874013179385086?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/6882874013179385086/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=6882874013179385086' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/6882874013179385086'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/6882874013179385086'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2009/07/use-data-view.html' title='Use Data View'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-6295862112678359870</id><published>2009-07-20T03:12:00.000-07:00</published><updated>2009-07-20T03:13:47.139-07:00</updated><title type='text'>Get Selected result with Comma separate</title><content type='html'>CREATE TABLE dbo.tblItems&lt;br /&gt;(&lt;br /&gt;ItemID int NOT NULL IDENTITY (1, 1),&lt;br /&gt;ItemName nvarchar(50) NOT NULL&lt;br /&gt;) ON [PRIMARY]&lt;br /&gt;GO&lt;br /&gt;ALTER TABLE dbo.tblItems ADD CONSTRAINT&lt;br /&gt;PK_Table_1 PRIMARY KEY CLUSTERED&lt;br /&gt;( ItemID )&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Insert into dbo.tblItems (ItemName) Values ('Item1')&lt;br /&gt;Insert into dbo.tblItems (ItemName) Values ('Item2')&lt;br /&gt;Insert into dbo.tblItems (ItemName) Values ('Item3')&lt;br /&gt;Insert into dbo.tblItems (ItemName) Values ('Item4')&lt;br /&gt;Go&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Declare @m_ItemsList nvarchar(2000)&lt;br /&gt;Select @m_ItemsList=''&lt;br /&gt;Select @m_ItemsList=@m_ItemsList+ItemName+',' from tblItems&lt;br /&gt;Select Left(@m_ItemsList,Len(@m_ItemsList)-1)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-6295862112678359870?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/6295862112678359870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=6295862112678359870' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/6295862112678359870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/6295862112678359870'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2009/07/get-selected-result-with-comma-separate.html' title='Get Selected result with Comma separate'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-352845006484229547</id><published>2009-07-14T22:51:00.000-07:00</published><updated>2009-07-14T22:52:37.456-07:00</updated><title type='text'>Gridview- Text Box Changed</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/_aJqM3rm8fBs/Sl1umyq7sjI/AAAAAAAAAD4/rNc4NlsIkYg/s1600-h/Grid_TextBox.JPG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 162px;" src="http://2.bp.blogspot.com/_aJqM3rm8fBs/Sl1umyq7sjI/AAAAAAAAAD4/rNc4NlsIkYg/s320/Grid_TextBox.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5358560744356688434" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-352845006484229547?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/352845006484229547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=352845006484229547' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/352845006484229547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/352845006484229547'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2009/07/gridview-text-box-changed.html' title='Gridview- Text Box Changed'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_aJqM3rm8fBs/Sl1umyq7sjI/AAAAAAAAAD4/rNc4NlsIkYg/s72-c/Grid_TextBox.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-7950690205607290591</id><published>2009-07-13T07:39:00.000-07:00</published><updated>2009-07-13T07:44:29.736-07:00</updated><title type='text'>Javascript with DIV for tool tip</title><content type='html'>&lt;a href="http://4.bp.blogspot.com/_aJqM3rm8fBs/SltIRqloEdI/AAAAAAAAADw/GwtvRyfHGNQ/s1600-h/JS-DIV.JPG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 207px;" src="http://4.bp.blogspot.com/_aJqM3rm8fBs/SltIRqloEdI/AAAAAAAAADw/GwtvRyfHGNQ/s320/JS-DIV.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5357955650014417362" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-7950690205607290591?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/7950690205607290591/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=7950690205607290591' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/7950690205607290591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/7950690205607290591'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2009/07/javascript-with-div-for-tool-tip_13.html' title='Javascript with DIV for tool tip'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_aJqM3rm8fBs/SltIRqloEdI/AAAAAAAAADw/GwtvRyfHGNQ/s72-c/JS-DIV.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-7622977261924496407</id><published>2009-07-13T07:33:00.001-07:00</published><updated>2009-07-13T07:33:38.360-07:00</updated><title type='text'>Javascript with DIV for tool tip</title><content type='html'>&lt;style&gt;&lt;br /&gt;    .tip &lt;br /&gt;{&lt;br /&gt; text-align:left;&lt;br /&gt; font:11px Arial; &lt;br /&gt; color:Black;&lt;br /&gt; border: Solid 1px Black; &lt;br /&gt; width:292px; &lt;br /&gt; padding:1px;&lt;br /&gt;    position:absolute;    &lt;br /&gt;    background-color:#FFFFE1;&lt;br /&gt;    &lt;br /&gt;}&lt;br /&gt;    &lt;/style&gt;&lt;br /&gt;&lt;table&gt;&lt;br /&gt;                &lt;tr&gt;&lt;br /&gt;                    &lt;td&gt;&lt;br /&gt;                        &lt;span onmouseout="dvLedgerTooltip.style.visibility='hidden'" onmouseover="dvLedgerTooltip.style.visibility='visible'"&lt;br /&gt;                            style="cursor: hand; ime-mode: active; color: Red"&gt;[?]&lt;/span&gt;&lt;br /&gt;                        &lt;div id="dvLedgerTooltip" style="visibility: hidden; width: 400px; position: absolute;&lt;br /&gt;                            height: 40px; z-index: 100;"&gt;&lt;br /&gt;                            &lt;asp:Label ID="lblLedger" runat="server" CssClass="tip"&gt;When the Purchase Requisition type is Expense, please select the applicable ledger code from the drop down list.  When the Purchase Requisition type is Capital or Both, please select ledger code 13105 – Construction In Progress from the drop down list.&lt;/asp:Label&gt;&lt;br /&gt;                        &lt;/div&gt;&lt;br /&gt;                    &lt;/td&gt;&lt;br /&gt;                &lt;/tr&gt;&lt;br /&gt;            &lt;br /&gt;                &lt;tr&gt;&lt;br /&gt;                    &lt;td class="label" colspan="2"&gt;&lt;br /&gt;                        &lt;span class="astrict"&gt;*&lt;/span&gt;Part Type:&lt;/td&gt;&lt;br /&gt;                    &lt;td class="label"&gt;&lt;br /&gt;                        &lt;span style="color: #ff0000"&gt;*&lt;span style="color: #000000"&gt;Preventative Maintenance&lt;br /&gt;                            Part&lt;/span&gt;&lt;/span&gt;:&lt;br /&gt;                        &lt;asp:Image ID="Image3" runat="server" ImageUrl="~/Images/Question.jpg" onmouseout="Div3.style.visibility='hidden'"&lt;br /&gt;                            onmouseover="Div3.style.visibility='visible'" /&gt;&lt;br /&gt;                        &lt;div id="Div3" style="visibility: hidden; width: 400px; position: absolute; height: 40px;&lt;br /&gt;                            z-index: 100;"&gt;&lt;br /&gt;                            &lt;asp:Label ID="Label3" runat="server" CssClass="tip"&gt;Indicates if the part is a preventative maintenance part that requires replacement on a regular basis (two or more times per year).&lt;/asp:Label&gt;&lt;br /&gt;                        &lt;/div&gt;&lt;br /&gt;                    &lt;/td&gt;&lt;br /&gt;                &lt;/tr&gt;&lt;br /&gt;            &lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-7622977261924496407?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/7622977261924496407/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=7622977261924496407' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/7622977261924496407'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/7622977261924496407'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2009/07/javascript-with-div-for-tool-tip.html' title='Javascript with DIV for tool tip'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-6130592361378171616</id><published>2009-07-12T22:55:00.000-07:00</published><updated>2009-07-23T01:22:38.831-07:00</updated><title type='text'>Dot Net FAQs</title><content type='html'>ExecuteNonQuery-returns number of rows effected&lt;br /&gt;ExecuteReader-It will return SQLDatareader(Set of records)&lt;br /&gt;ExecuteScalar-It will return last inserted row value.&lt;br /&gt;&lt;br /&gt;GAC- C:\WINDOWS\assembly&lt;br /&gt;ILDASM.EXE- C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin&lt;br /&gt;Q)IS there any way to restrict the Developer to delete a assembly? How can i do? pros and cons?&lt;br /&gt;Ans.Yes,By placing the assembly in to GAC.&lt;br /&gt;&lt;br /&gt;System.GC.AddMemoryPressure(200024);&lt;br /&gt;System.GC.RemoveMemoryPressure(200024);&lt;br /&gt;This statements will be usefull while uploading large files from .Net to server &lt;br /&gt;System.GC.Collect()- forces garbage collector to run&lt;br /&gt;&lt;br /&gt;1) What are situations when you register .NET assembly in GAC ?&lt;br /&gt;&lt;br /&gt;2) What’s the difference between Cache object and application object ?&lt;br /&gt;&lt;br /&gt;The main difference between the Cache and Application objects is that the Cache object&lt;br /&gt;provides cache-specific features, such as dependencies and expiration policies.&lt;br /&gt;&lt;br /&gt;3) When we use Cache object and when we use application object?&lt;br /&gt;&lt;br /&gt;4) How can get access to cache object ?&lt;br /&gt;&lt;br /&gt;You can get a reference&lt;br /&gt;to the Cache object by using the Cache property of the HttpContext class &lt;br /&gt;&lt;br /&gt;5) Where do you specify session state mode in ASP.NET ?&lt;br /&gt;&lt;br /&gt;6)What are benefits and limitations of using Cookies?&lt;br /&gt;&lt;br /&gt;7)How u define the cookie in ASP.Net?&lt;br /&gt;Request.Cookies.Add(New HttpCookie(“name”, “user1”))&lt;br /&gt;&lt;br /&gt;8)How cross page posting can be achieved in ASP.Net?&lt;br /&gt;&lt;asp:Button ID="Button1" runat="server"&lt;br /&gt;PostBackUrl="~/nextpage.aspx" Text="Post to nextpage" /&gt;&lt;br /&gt;&lt;br /&gt;9)How delegates used for event handling?&lt;br /&gt;&lt;br /&gt;10)Can you prevent a class from overriding ?&lt;br /&gt;&lt;br /&gt;11)What is the significance of Finalize method in .NET?&lt;br /&gt;&lt;br /&gt;12)When we required System.StringBuilder classes?&lt;br /&gt;&lt;br /&gt;13)How can we skip some set of code from the Page PostBack?&lt;br /&gt;&lt;br /&gt;14)Where is ViewState information stored ?&lt;br /&gt;In HTML Hidden Fields.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;15)How can you enable automatic paging in DataGrid ?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;16)What is the method to customize columns in DataGrid?&lt;br /&gt;Use the template column.&lt;br /&gt;&lt;br /&gt;17)What are major events in GLOBAL.ASAX file ?What order they are triggered ?&lt;br /&gt;&lt;br /&gt;18)where do we enable tracing ?&lt;br /&gt;&lt;%@ Page Trace="true" %&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;19) How to kill a session in asp.net?&lt;br /&gt;&lt;br /&gt;Session.abandon&lt;br /&gt;&lt;br /&gt;20) How can I track event in checkbox which is one of the columns of a datagrid ?&lt;br /&gt;&lt;br /&gt;21) What is difference between Constant and readonly properties?&lt;br /&gt;&lt;br /&gt;    get accessor in property implemantation.&lt;br /&gt;    &lt;br /&gt;22) Is structure can be inherited?&lt;br /&gt;&lt;br /&gt;23) what is difference between static variable and private variable?&lt;br /&gt;&lt;br /&gt;24) What is use of virtual method in a base class?&lt;br /&gt;&lt;br /&gt;25) When we require interface? when we require abstract?&lt;br /&gt;&lt;br /&gt;26) what is use of out parameter in c#?&lt;br /&gt;&lt;br /&gt;27) what is the scope of extern variable?&lt;br /&gt;&lt;br /&gt;28) what is use of static constructor?&lt;br /&gt;&lt;br /&gt;29) What is the difference between is and as?&lt;br /&gt;The AS operator is used to perform certain type of conversion between compatible reference types.&lt;br /&gt;IS checks if object is compatiable with a given type.&lt;br /&gt;&lt;br /&gt;30) What is  scope of access modifers like internal,protected?&lt;br /&gt;&lt;br /&gt;31) what is the use of partial classes?&lt;br /&gt;&lt;br /&gt;32) What is the use of “OverRides” and “Overridable” keywords ?&lt;br /&gt;Overridable is used in parent class to indicate that a method can be overridden. Overrides&lt;br /&gt;is used in the child class to indicate that you are overriding a method&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;33)In what instances you will declare a constructor to be private?&lt;br /&gt;When we create a private constructor, we can not create object of the class directly from&lt;br /&gt;a client. So you will use private constructors when you do not want instances of the class&lt;br /&gt;to be created by any external client. Example UTILITY functions in project will have no&lt;br /&gt;instance and be used with out creating instance, as creating instances of the class would&lt;br /&gt;be waste of memory.&lt;br /&gt;&lt;br /&gt;34)Can two catch blocks be executed?&lt;br /&gt;No, once the proper catch section is executed the control goes finally to block. So there&lt;br /&gt;will not be any scenarios in which multiple catch blocks will be executed.&lt;br /&gt;&lt;br /&gt;35)What is impersonation in ASP.NET ?&lt;br /&gt;By default, ASP.NET executes in the security context of a restricted user account on the&lt;br /&gt;local machine. Sometimes you need to access network resources such as a file on a shared&lt;br /&gt;drive, which requires additional permissions. One way to overcome this restriction is to&lt;br /&gt;use impersonation. With impersonation, ASP.NET can execute the request using the&lt;br /&gt;identity of the client who is making the request, or ASP.NET can impersonate a specific&lt;br /&gt;account you specify in web.config.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;36)Can you explain in brief how the ASP.NET authentication process works?&lt;br /&gt;ASP.NET does not run by itself, it runs inside the process of IIS. So there are two&lt;br /&gt;authentication layers which exist in ASP.NET system. First authentication happens at&lt;br /&gt;the IIS level and then at the ASP.NET level depending on the WEB.CONFIG file.&lt;br /&gt;Below is how the whole process works:-&lt;br /&gt;v IIS first checks to make sure the incoming request comes from an IP address&lt;br /&gt;that is allowed access to the domain. If not it denies the request.&lt;br /&gt;v Next IIS performs its own user authentication if it is configured to do so. By&lt;br /&gt;default IIS allows anonymous access, so requests are automatically&lt;br /&gt;authenticated, but you can change this default on a per – application basis&lt;br /&gt;with in IIS.&lt;br /&gt;v If the request is passed to ASP.net with an authenticated user, ASP.net checks&lt;br /&gt;to see whether impersonation is enabled. If impersonation is enabled, ASP.net&lt;br /&gt;acts as though it were the authenticated user. If not ASP.net acts with its own&lt;br /&gt;configured account.&lt;br /&gt;v Finally the identity from step 3 is used to request resources from the operating&lt;br /&gt;system. If ASP.net authentication can obtain all the necessary resources it&lt;br /&gt;grants the users request otherwise it is denied. Resources can include much&lt;br /&gt;more than just the ASP.net page itself you can also use .Net’s code access&lt;br /&gt;security features to extend this authorization step to disk files, Registry keys&lt;br /&gt;and other resources.&lt;br /&gt;&lt;br /&gt;37)How can we check if all the validation control are valid&lt;br /&gt;and proper ?&lt;br /&gt;Using the Page.IsValid() property you can check whether all the validation are done&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;38)What are the two fundamental objects in ADO.NET ?&lt;br /&gt;Datareader and Dataset are the two fundamental objects in ADO.NET.&lt;br /&gt;&lt;br /&gt;39)What is the use of command objects ?&lt;br /&gt;They are used to connect connection object to Datareader or dataset. Following are the&lt;br /&gt;methods provided by command object :-&lt;br /&gt;v ExecuteNonQuery :- Executes the command defined in the CommandText&lt;br /&gt;property against the connection defined in the Connection property for a query&lt;br /&gt;that does not return any row (an UPDATE, DELETE or INSERT). Returns&lt;br /&gt;an Integer indicating the number of rows affected by the query.&lt;br /&gt;v ExecuteReader :- Executes the command defined in the CommandText property&lt;br /&gt;against the connection defined in the Connection property. Returns a "reader"&lt;br /&gt;object that is connected to the resulting rowset within the database, allowing&lt;br /&gt;the rows to be retrieved.&lt;br /&gt;v ExecuteScalar :- Executes the command defined in the CommandText property&lt;br /&gt;against the connection defined in the Connection property. Returns only&lt;br /&gt;single value (effectively the first column of the first row of the resulting rowset)&lt;br /&gt;any other returned columns and rows are discarded. It is fast and efficient&lt;br /&gt;when only a "singleton" value is required&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is the difference between a HAVING CLAUSE and a WHERE CLAUSE?&lt;br /&gt;You can use Having Clause with the GROUP BY function in a query and WHERE&lt;br /&gt;Clause is applied to each row before they are part of the GROUP BY function in a query.&lt;br /&gt;&lt;br /&gt;(B) What is the difference between UNION and UNION ALL SQL syntax ?&lt;br /&gt;UNION SQL syntax is used to select information from two tables. But it selects only&lt;br /&gt;distinct records from both the table, while UNION ALL selects all records from both the&lt;br /&gt;tables.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When listing product information you might want to draw the user's eye to products that &lt;br /&gt;are out of stock. one way to accomplish this would be to change the back ground colour of those&lt;br /&gt;rows with unit in stock value of 0.&lt;br /&gt;&lt;br /&gt;The gridview offers a onRowDataBound event that fires once for each row after the row has been creted &lt;br /&gt;and bound to corresponding record of data from the data source control.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-6130592361378171616?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/6130592361378171616/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=6130592361378171616' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/6130592361378171616'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/6130592361378171616'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2009/07/dot-net-faqs.html' title='Dot Net FAQs'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-5751727351335268749</id><published>2009-07-12T22:54:00.000-07:00</published><updated>2009-07-12T22:55:02.836-07:00</updated><title type='text'>FAQ</title><content type='html'>1.architecture of .net&lt;br /&gt;2.What is IL and CLR&lt;br /&gt;3.Collections -Arrary, array list , hash array&lt;br /&gt;4.How can we handile exception in .Net and SQL server--&lt;br /&gt;5.Tell me simple steps to bind a grid using sql connection&lt;br /&gt;6.State management-&lt;br /&gt;7.Diff b/w Session and application memory&lt;br /&gt;8.How to swap 2 values with out using temp&lt;br /&gt;9.Overriding and Overloading&lt;br /&gt;10. Dataset and reader...&lt;br /&gt;11. Can we run all versions of .Net applications in same server.&lt;br /&gt;12.One array size is 100, i have entered 99 records(Numbers from 1 to 100) in that array, how can i find missed value.&lt;br /&gt;13.I have 2 arrays with diff size, i want to dispaly matched records and unmatched recores.&lt;br /&gt;14..Net is plat form independent.&lt;br /&gt;15. Tell me what are the namespaces we use to work with ajax. (Ans: System.Web.Extensions, System.Web.Extensions.Design)&lt;br /&gt;16.  Can my application can have more that 1 .config files...YES&lt;br /&gt;17.Can i have more that one DLL with same name in my system. Ans)Yes in GAC it is possible&lt;br /&gt;18.Diff b/w EXE and DLL&lt;br /&gt;19.How can we improve asp.net application erformance.&lt;br /&gt;22. architecture of u r current application. how can u support u r architecture is sutable for u r aplication.&lt;br /&gt;23.how can we call webservices.&lt;br /&gt;&lt;br /&gt;Tell u have a knowledge on workflows.....which u have..&lt;br /&gt;1.what is workflow.&lt;br /&gt;2.what is the use of workflows&lt;br /&gt;&lt;br /&gt;Diff b/w function and SP in SQL&lt;br /&gt;New features in sql 2005 that 2000&lt;br /&gt;what is index in sql and advantages, diss adva?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How to get inserted row identity value from Database in SP?&lt;br /&gt;Ans)&lt;br /&gt;If you are using SQL Server 7.0, simply change the line in the stored procedure from ... &lt;br /&gt; &lt;br /&gt;SELECT NEWID = SCOPE_IDENTITY() &lt;br /&gt; &lt;br /&gt;... to ... &lt;br /&gt; &lt;br /&gt;SELECT NEWID = @@IDENTITY&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-5751727351335268749?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/5751727351335268749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=5751727351335268749' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/5751727351335268749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/5751727351335268749'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2009/07/faq.html' title='FAQ'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-4377581846168699689</id><published>2009-05-28T07:07:00.000-07:00</published><updated>2009-05-28T07:19:30.047-07:00</updated><title type='text'>SQL</title><content type='html'>ALTER TABLE Table_1 ALTER COLUMN test1 nchar(20)&lt;br /&gt;------------------------------&lt;br /&gt;Declare @NewInt&lt;br /&gt; intexec DebugA 5,@NewInt OUTPUT&lt;br /&gt;Select @NewInt&lt;br /&gt;-------------------&lt;br /&gt;CREATE TABLE tt (EntryID uniqueidentifier DEFAULT NewID())&lt;br /&gt;select EntryID from ttt&lt;br /&gt;CREATE TABLE ttt (EntryID uniqueidentifier DEFAULT NewSequentialID())&lt;br /&gt;INSERT INTO tt DEFAULT VALUES&lt;br /&gt;-------------------------------------------------&lt;br /&gt;--Table structure&lt;br /&gt;&lt;br /&gt;CREATE TABLE dbo.GUIDTable2&lt;br /&gt;(&lt;br /&gt;GUIDCol uniqueidentifier NOT NULL PRIMARY KEY DEFAULT (NEWID()),&lt;br /&gt;OtherColumn varchar(25) NOT NULL&lt;br /&gt;)&lt;br /&gt;GO&lt;br /&gt;INSERT INTO dbo.GUIDTable2 (OtherColumn) VALUES ('Performance tuning')&lt;br /&gt;select * from GUIDTable2&lt;br /&gt;------------------------------------------------&lt;br /&gt;Auto Increment&lt;br /&gt;-----------------&lt;br /&gt;Create TABLE tbl_Processes&lt;br /&gt;(&lt;br /&gt;ProcessID int IDENTITY(1,1),&lt;br /&gt;ProcessName nvarchar (100),&lt;br /&gt;Active bit,&lt;br /&gt;CONSTRAINT pk_PersonID PRIMARY KEY (ProcessID)&lt;br /&gt;)&lt;br /&gt;-----------------------------------------------------&lt;br /&gt;&lt;br /&gt;Create TABLE new_employees&lt;br /&gt;(&lt;br /&gt;id_num int IDENTITY(1,1),&lt;br /&gt;fname varchar (20)&lt;br /&gt;)&lt;br /&gt;--------------------------------&lt;br /&gt;CREATE TABLE Persons&lt;br /&gt;(&lt;br /&gt;P_Id int NOT NULL PRIMARY KEY,&lt;br /&gt;LastName varchar(255) NOT NULL,&lt;br /&gt;FirstName varchar(255),&lt;br /&gt;Address varchar(255),&lt;br /&gt;City varchar(255)&lt;br /&gt;)&lt;br /&gt;----------------------------&lt;br /&gt;CREATE TABLE Persons&lt;br /&gt;(&lt;br /&gt;P_Id int NOT NULL,&lt;br /&gt;LastName varchar(255) NOT NULL,&lt;br /&gt;FirstName varchar(255),&lt;br /&gt;Address varchar(255),&lt;br /&gt;City varchar(255),&lt;br /&gt;CONSTRAINT pk_PersonID PRIMARY KEY (P_Id,LastName)&lt;br /&gt;)&lt;br /&gt;----------------------------------------------&lt;br /&gt;CREATE TABLE Customer&lt;br /&gt;(SID integer PRIMARY KEY,&lt;br /&gt;Last_Name varchar(30),&lt;br /&gt;First_Name varchar(30));&lt;br /&gt;&lt;br /&gt;-----------------------------------&lt;br /&gt;CREATE TABLE ORDERS&lt;br /&gt;(Order_ID integer primary key,&lt;br /&gt;Order_Date datetime,&lt;br /&gt;Customer_SID integer references CUSTOMER(SID),&lt;br /&gt;Amount double);&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------&lt;br /&gt;&lt;br /&gt;SELECT *&lt;br /&gt;FROM TableName E1&lt;br /&gt;WHERE (N =&lt;br /&gt;(SELECT COUNT(DISTINCT (E2.sal))&lt;br /&gt;FROM TableName E2&lt;br /&gt;WHERE E2.sal &gt;= E1.sal))&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;sp_helptext GetUniqueAppID-------We can view the sp&lt;br /&gt;---------------------------------&lt;br /&gt;SQL Server Installation&lt;br /&gt;-----------------------&lt;br /&gt;http://www.functionx.com/sqlserver/Lesson01.htm&lt;br /&gt;http://www.exforsys.com/tutorials/sql-server-2005/getting-started-with-sql-server-2005/1.html&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;http://www.ss64.com/sql/&lt;br /&gt;&lt;br /&gt;Copying a Database from SQL Server 2005 to SQL Server 2008 using the Copy Database Wizard&lt;br /&gt;&lt;br /&gt;http://www.packtpub.com/article/copying-database-sql-2008-copy-database-wizard&lt;br /&gt;&lt;br /&gt;http://blog.sqlauthority.com/&lt;br /&gt;&lt;br /&gt;Reporting Services:&lt;br /&gt;--------------------&lt;br /&gt;http://msdn.microsoft.com/en-us/magazine/cc188691.aspx&lt;br /&gt;&lt;br /&gt;http://www.microsoft.com/technet/prodtechnol/sql/2005/2005ssrs.mspx&lt;br /&gt;&lt;br /&gt;http://www.simple-talk.com/sql/learn-sql-server/beginning-sql-server-2005-reporting-services-part-1/&lt;br /&gt;&lt;br /&gt;http://www.dotnetheaven.com/UploadFile/ursbgiri/106012007065515AM/1.aspx&lt;br /&gt;&lt;br /&gt;Reporting&lt;br /&gt;------------&lt;br /&gt;http://www.codeproject.com/KB/database/MergeReplication.aspx&lt;br /&gt;http://www.codeproject.com/KB/reporting-services/RecursiveData.aspx&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;GOOD:&lt;br /&gt;=====&lt;br /&gt;SELECT max( mark ) FROM `student`&lt;br /&gt;--------------------&lt;br /&gt;SELECT * FROM Product where Product_price = (&lt;br /&gt;SELECT MAX(Product_price)FROM Product WHERE Product_price &lt; (SELECT MAX(Product_price) FROM Product) ) -------------------- SELECT * FROM Product E1 WHERE(3 =(SELECT COUNT(DISTINCT (E2.Product_price))FROM Product E2 WHERE E2.Product_price &gt;= E1.Product_price))&lt;br /&gt;----------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Renaming a Column&lt;br /&gt;------------------&lt;br /&gt;sp_rename 'TableName.ColumnName', 'NewColumnName', 'COLUMN'&lt;br /&gt;&lt;br /&gt;Deleting a Column&lt;br /&gt;-----------------&lt;br /&gt;ALTER TABLE TableName&lt;br /&gt;DROP COLUMN ColumnName&lt;br /&gt;&lt;br /&gt;DATE TIME&lt;br /&gt;---------&lt;br /&gt;http://www.sqljunkies.ddj.com/Article/6676BEAE-1967-402D-9578-9A1C7FD826E5.scuk&lt;br /&gt;&lt;br /&gt;Retrieve Current Date Time in SQL Server&lt;br /&gt;----------------------------------------&lt;br /&gt;SELECT {fn NOW()}&lt;br /&gt;GO&lt;br /&gt;SELECT GETDATE()&lt;br /&gt;GO&lt;br /&gt;SELECT CURRENT_TIMESTAMP&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SELECT CONVERT(VARCHAR(10),GETDATE(),111)&lt;br /&gt;--------------------------------&lt;br /&gt;DateTime dtDOB = Convert.ToDateTime(Request.Form["TextBox1"].ToString());&lt;br /&gt;DateTime dtNow = DateTime.Now;&lt;br /&gt;//TimeSpan k=dtNow.Subtract(dtDOB);&lt;br /&gt;&lt;br /&gt;if ((dtNow.Subtract(dtDOB).TotalDays / 365) &lt; 18)&lt;br /&gt;{&lt;br /&gt;Response.Write("Sorry");&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;Response.Write("Success");&lt;br /&gt;}&lt;br /&gt;-------------------------------------------------&lt;br /&gt;CREATE TABLE MyTable&lt;br /&gt;(&lt;br /&gt;ID TINYINT NOT NULL IDENTITY (1, 1),&lt;br /&gt;FirstCol TINYINT NOT NULL,&lt;br /&gt;SecondCol TINYINT NOT NULL,&lt;br /&gt;ThirdCol TINYINT NOT NULL,&lt;br /&gt;ComputedCol AS (FirstCol+SecondCol)*ThirdCol&lt;br /&gt;) ON [PRIMARY]&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;INSERT INTO MyTable&lt;br /&gt;([FirstCol],[SecondCol] ,[ThirdCol]) values (1,2,3)&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;SELECT *&lt;br /&gt;FROM MyTable&lt;br /&gt;GO&lt;br /&gt;----------------------------------------------------\\&lt;br /&gt;&lt;br /&gt;http://publib.boulder.ibm.com/infocenter/rbhelp/v6r3/index.jsp?topic=/com.ibm.redbrick.doc6.3/sqlrg/sqlrg67.htm&lt;br /&gt;-----------------------------------------------------------------------------------------&lt;br /&gt;CREATE PROCEDURE [dbo].[VALIDATEUSER]&lt;br /&gt;@UserName VARCHAR(100),&lt;br /&gt;@Password VARCHAR(100),&lt;br /&gt;@Result INT OUT&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt;DECLARE @Cnt AS INT&lt;br /&gt;&lt;br /&gt;SELECT @Cnt = COUNT(*) FROM USERS WHERE USERNAME=@UserName AND PASSWORD=@Password&lt;br /&gt;IF(@Cnt=0)&lt;br /&gt;BEGIN&lt;br /&gt;&lt;br /&gt;SELECT @Cnt = COUNT(*) FROM USERS WHERE USERNAME=@UserName&lt;br /&gt;IF(@Cnt=0)&lt;br /&gt;BEGIN&lt;br /&gt;SET @Result = -1&lt;br /&gt;END&lt;br /&gt;ELSE&lt;br /&gt;BEGIN&lt;br /&gt;SET @Result = 0&lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;END&lt;br /&gt;ELSE&lt;br /&gt;BEGIN&lt;br /&gt;SELECT @Result=USERID FROM USERS WHERE USERNAME=@UserName AND PASSWORD=@Password&lt;br /&gt;END&lt;br /&gt;END&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-4377581846168699689?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/4377581846168699689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=4377581846168699689' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/4377581846168699689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/4377581846168699689'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2009/05/alter-column.html' title='SQL'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-4618530427369803945</id><published>2009-05-28T06:07:00.000-07:00</published><updated>2009-05-28T07:01:19.270-07:00</updated><title type='text'>Upload Document To MOSS 2007</title><content type='html'>&lt;span style="color:#009900;"&gt;&lt;br /&gt;SPSite siteCollection = null;&lt;br /&gt;SPWeb topLevelSite = null;&lt;br /&gt;string strDocLibraryLink = System.Configuration.ConfigurationManager.AppSettings["SPDocumentLibrary"].ToString();&lt;br /&gt;//"http://#/Corporate/DealDesk/Documents/";&lt;br /&gt;siteCollection = new SPSite(strDocLibraryLink);&lt;br /&gt;topLevelSite = siteCollection.AllWebs[ConfigurationManager.AppSettings["TopLevelSite"].ToString()];&lt;br /&gt;// siteCollection.AllWebs["Corporate/DealDesk"]; &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#009900;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;topLevelSite.AllowUnsafeUpdates = true;&lt;br /&gt;SPList list = topLevelSite.Lists["Documents"];&lt;br /&gt;//foreach (SPListItem item in list.Items)&lt;br /&gt;//{&lt;br /&gt;// if (Convert.ToString(item["ID"]).Equals(strUARID))&lt;br /&gt;// {&lt;br /&gt;SPFolder objFolder = topLevelSite.GetFolder("documents");&lt;br /&gt;byte[] bufDoc = null;&lt;br /&gt;string strFileName = Path.GetFileName(filename.FileName);&lt;br /&gt;strMossFileName = strFileName;&lt;br /&gt;int nLen = filename.ContentLength;&lt;br /&gt;bufDoc = new byte[nLen];&lt;br /&gt;Stream oStream = filename.InputStream;&lt;br /&gt;oStream.Read(bufDoc, 0, nLen);&lt;br /&gt;// SPFile file = objFolder.Files.Add(strFileName, bufDoc, true);&lt;br /&gt;System.GC.AddMemoryPressure(200024);&lt;br /&gt;SPFile file = objFolder.Files.Add(strFileName, oStream, true);&lt;br /&gt;Response.Write("File Name:" + file);&lt;br /&gt;Response.Write("File ID:" + file.Item["ID"].ToString());&lt;br /&gt;//strFileName = file;&lt;br /&gt;file.Update();&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#009900;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;Note: In K2 we should not upload document, tr .net only we have upload and then in k2 we have update Metadata only tr file name as a identity.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-4618530427369803945?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/4618530427369803945/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=4618530427369803945' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/4618530427369803945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/4618530427369803945'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2009/05/document-upload-to-moss-2007.html' title='Upload Document To MOSS 2007'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-7532388166067043916</id><published>2008-04-28T05:05:00.000-07:00</published><updated>2008-04-28T05:06:13.106-07:00</updated><title type='text'>Bind Data with dataset</title><content type='html'>&lt;span style="font-family:arial;color:#663366;"&gt;&lt;strong&gt;SqlConnection con=new SqlConnection("user id=sa;password=;database=northwind;data source=compaq12");&lt;br /&gt;SqlDataAdapter da=new SqlDataAdapter("select * from orders order by "+ str,con);&lt;br /&gt;DataSet ds=new DataSet();&lt;br /&gt;da.Fill(ds,"orders");&lt;br /&gt;DataGrid1.DataSource=ds.Tables["orders"];&lt;br /&gt;DataGrid1.DataBind();&lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-7532388166067043916?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/7532388166067043916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=7532388166067043916' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/7532388166067043916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/7532388166067043916'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2008/04/bind-data-with-dataset.html' title='Bind Data with dataset'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-8664881540018505389</id><published>2008-04-28T04:56:00.000-07:00</published><updated>2008-04-28T04:57:54.207-07:00</updated><title type='text'>Bind data with datareader</title><content type='html'>&lt;span style="font-family:arial;color:#cc66cc;"&gt;&lt;strong&gt;void Page_Load(Object sender, EventArgs e)&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;color:#cc66cc;"&gt;&lt;strong&gt;{  &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;color:#cc66cc;"&gt;&lt;strong&gt;SqlConnection myConnection; &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;color:#cc66cc;"&gt;&lt;strong&gt;SqlCommand myCommand; &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;color:#cc66cc;"&gt;&lt;strong&gt;SqlDataReader myDataReader;   &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;color:#cc66cc;"&gt;&lt;strong&gt;myConnection = new SqlConnection(ConfigurationSettings.AppSettings["strConn"]); myConnection.Open();&lt;br /&gt; //prepare sql statements &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;color:#cc66cc;"&gt;&lt;strong&gt;myCommand = new SqlCommand("SELECT TOP 10 * FROM EMPLOYEE", myConnection); &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;color:#cc66cc;"&gt;&lt;strong&gt;myDataReader = myCommand.ExecuteReader();    &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;color:#cc66cc;"&gt;&lt;strong&gt;while (myDataReader.Read())&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;color:#cc66cc;"&gt;&lt;strong&gt; {     &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;color:#cc66cc;"&gt;&lt;strong&gt;Response.Write(myDataReader["fname"]);  &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;color:#cc66cc;"&gt;&lt;strong&gt;  //Spacing  &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;color:#cc66cc;"&gt;&lt;strong&gt;Response.Write("   ");   &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;color:#cc66cc;"&gt;&lt;strong&gt; Response.Write(myDataReader["minit"]);   &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;color:#cc66cc;"&gt;&lt;strong&gt; //Spacing  &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;color:#cc66cc;"&gt;&lt;strong&gt;Response.Write("   ");    &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;color:#cc66cc;"&gt;&lt;strong&gt;Response.Write(myDataReader["lname"]);   &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;color:#cc66cc;"&gt;&lt;strong&gt; //New Line &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;color:#cc66cc;"&gt;&lt;strong&gt; Response.Write("&lt;br /&gt;"); &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;color:#cc66cc;"&gt;&lt;strong&gt;  }  &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;color:#cc66cc;"&gt;&lt;strong&gt; //cleanup objects&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;color:#cc66cc;"&gt;&lt;strong&gt; myDataReader.Close(); &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;color:#cc66cc;"&gt;&lt;strong&gt;myConnection.Close();  &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;color:#cc66cc;"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-8664881540018505389?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/8664881540018505389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=8664881540018505389' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/8664881540018505389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/8664881540018505389'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2008/04/bind-data-with-datareader.html' title='Bind data with datareader'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-5658501836426773733</id><published>2008-04-28T04:48:00.000-07:00</published><updated>2008-04-28T04:50:46.549-07:00</updated><title type='text'>DATABASE Tuning</title><content type='html'>&lt;span style="font-family:arial;font-size:130%;color:#996633;"&gt;&lt;strong&gt;1) Return Multiple Resultsets &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#996633;"&gt;&lt;strong&gt;2) Connection Pooling and Object Pooling &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#996633;"&gt;&lt;strong&gt;3) Use SqlDataReader Instead of Dataset wherever it is possible &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#996633;"&gt;&lt;strong&gt;4) Keep Your Datasets Lean &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#996633;"&gt;&lt;strong&gt;5) Avoid Inefficient queries &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#996633;"&gt;&lt;strong&gt;6) Unnecessary round trips &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#996633;"&gt;&lt;strong&gt;7) Too many open connections &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#996633;"&gt;&lt;strong&gt;8) Avoid Transaction misuse &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#996633;"&gt;&lt;strong&gt;9) Avoid Over Normalized tables &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#996633;"&gt;&lt;strong&gt;10) Reduce Serialization &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#996633;"&gt;&lt;strong&gt;11) Do Not Use CommandBuilder at Run Time &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#996633;"&gt;&lt;strong&gt;12) Use Stored Procedures Whenever Possible &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#996633;"&gt;&lt;strong&gt;13) Avoid Auto-Generated Commands &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#996633;"&gt;&lt;strong&gt;14) Use Sequential Access as Often as Possible &lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-5658501836426773733?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/5658501836426773733/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=5658501836426773733' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/5658501836426773733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/5658501836426773733'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2008/04/database-tuning.html' title='DATABASE Tuning'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-881250597771996547</id><published>2008-04-28T04:17:00.000-07:00</published><updated>2008-04-28T04:27:05.000-07:00</updated><title type='text'>Asp.Net Web applications Performance tuning</title><content type='html'>&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;1) Turn off Tracing unless until required &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;trace enabled="false" &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;2) Turn off Session State, if not required &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;&lt;@%Page EnableSessionState="false"%&gt; &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;3) Disable View State of a Page if possible &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;4) Set debug=false in web.config &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;5) Avoid Response.Redirect &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;5. A) To reduce CLR Exceptions count, Use Response.Redirect (".aspx", false) instead of response.redirect (".aspx"). &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;6) Use the String builder to concatenate string &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;7) Avoid throwing exceptions &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;8) Use Finally Method to kill resources &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;9) Use Client Side Scripts for validations &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;10) Avoid unnecessary round trips to the server &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;11) Use Page.ISPostBack &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;12) Include Return Statements with in the Function/Method &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;13) Use Foreach loop instead of For loop for String Iteration &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;14) Avoid Unnecessary Indirection &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;15) Use "ArrayLists" in place of arrays &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;16) Always check Page.IsValid when using Validator Controls &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;17) Use Paging &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;18) Store your content by using caching &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;19) Use low cost authentication &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;20) Minimize the number of web server controls &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;21) Avoid using unmanaged code &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;22) Avoid making frequent calls across processes &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;23) Cleaning Up Style Sheets and Script Files &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;24) Design with ValueTypes &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;25) Minimize assemblies &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;26) Encode Using ASCII When You Don't Need UTF &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;27) Avoid Recursive Functions / Nested Loops &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;28) Minimize the Use of Format () &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;29) Place StyleSheets into the Header &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;30) Put Scripts to the end of Document &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;31) Make JavaScript and CSS External &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#663366;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-881250597771996547?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/881250597771996547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=881250597771996547' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/881250597771996547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/881250597771996547'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2008/04/aspnet-web-applications-performance.html' title='Asp.Net Web applications Performance tuning'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-3817321555340958537</id><published>2008-04-22T03:25:00.000-07:00</published><updated>2008-04-22T03:33:43.778-07:00</updated><title type='text'>i am successfully storing images into database by converting images into bytes.</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;SqlCommand cmdSelect=new SqlCommand("select Picture from tblImgData where &lt;/strong&gt;&lt;a href="mailto:ID=@ID" value="this.editID.Text'"&gt;&lt;strong&gt;ID=@ID",this.sqlConnection1);&lt;br /&gt;cmdSelect.Parameters.Add("@ID",SqlDbType.Int,4);&lt;br /&gt;cmdSelect.Parameters["@ID"].Value=this.editID.Text&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;;&lt;br /&gt;this.sqlConnection1.Open();byte[] barrImg=(byte[])cmdSelect.ExecuteScalar();&lt;br /&gt;string strfn=Convert.ToString(DateTime.Now.ToFileTime());&lt;br /&gt;FileStream fs=new FileStream(strfn,FileMode.CreateNew,FileAccess.Write);&lt;br /&gt;fs.Write(barrImg,0,barrImg.Length);&lt;br /&gt;fs.Flush();&lt;br /&gt;fs.Close();&lt;br /&gt;pictureBox1.Image=Image.ఫ్రం&lt;br /&gt;File(strfn);&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;strong&gt;---------------------&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;a href="http://www.odetocode.com/Articles/172.aspx"&gt;&lt;strong&gt;http://www.odetocode.com/Articles/172.aspx&lt;/strong&gt;&lt;/a&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;--------------------- &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;strong&gt;Dim myConnection As SqlConnection = New SqlConnection(ConfigurationSettings.AppSettings("ConnectionString"))&lt;br /&gt;Dim myCommand As SqlCommand = New SqlCommand("sp_das_person_real_images_sel", myConnection)&lt;br /&gt;myCommand.CommandType = CommandType.StoredProcedure&lt;br /&gt;Try&lt;br /&gt;myConnection.Open()&lt;br /&gt;DG_Persons.DataSource = myCommand.ExecuteReader(CommandBehavior.CloseConnection)&lt;br /&gt;DG_Persons.DataBind()&lt;br /&gt;Catch&lt;br /&gt;SQLexc As SqlException&lt;br /&gt;Response.Write("Error occured while Generating Data. Error is " &amp;amp; SQLexc.ToString())&lt;br /&gt;End Try&lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-3817321555340958537?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/3817321555340958537/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=3817321555340958537' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/3817321555340958537'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/3817321555340958537'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2008/04/i-am-successfully-storing-images-into.html' title='i am successfully storing images into database by converting images into bytes.'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-4369495372323824749</id><published>2008-04-22T02:39:00.000-07:00</published><updated>2008-04-22T02:43:00.401-07:00</updated><title type='text'>javascript</title><content type='html'>&lt;strong&gt;&lt;span style="color:#000066;"&gt;How to hide a button:&lt;br /&gt;-----------------------&lt;br /&gt;function hide()&lt;br /&gt;{&lt;br /&gt;document.form1.check.style.visibility = 'hidden';&lt;br /&gt;return;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;----------------------&lt;br /&gt;&lt;br /&gt;Call the above function in button Onclick="hide();"&lt;/span&gt;&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-4369495372323824749?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/4369495372323824749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=4369495372323824749' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/4369495372323824749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/4369495372323824749'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2008/04/javascript.html' title='javascript'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-826236127917868534</id><published>2008-04-22T02:23:00.000-07:00</published><updated>2008-04-22T02:26:02.944-07:00</updated><title type='text'>Chat Programm in ASP.NET</title><content type='html'>&lt;a href="http://www.codeproject.com/KB/applications/SimpleChat.aspx"&gt;&lt;span style="font-family:arial;color:#666666;"&gt;&lt;strong&gt;http://www.codeproject.com/KB/applications/SimpleChat.aspx&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.codeproject.com/KB/applications/AliAspNetChat.aspx"&gt;&lt;span style="font-family:arial;color:#666666;"&gt;&lt;strong&gt;http://www.codeproject.com/KB/applications/AliAspNetChat.aspx&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://forums.devarticles.com/net-development-43/simple-chat-page-in-asp-net-using-c-7566.html"&gt;&lt;span style="font-family:arial;color:#666666;"&gt;&lt;strong&gt;http://forums.devarticles.com/net-development-43/simple-chat-page-in-asp-net-using-c-7566.html&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.codeproject.com/KB/aspnet/Ajax_Chat.aspx"&gt;&lt;span style="font-family:arial;color:#666666;"&gt;&lt;strong&gt;http://www.codeproject.com/KB/aspnet/Ajax_Chat.aspx&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ffff99;"&gt;REF .codeproject&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-826236127917868534?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/826236127917868534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=826236127917868534' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/826236127917868534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/826236127917868534'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2008/04/chat-programm-in-aspnet.html' title='Chat Programm in ASP.NET'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-1486550899808432198</id><published>2008-04-22T02:17:00.000-07:00</published><updated>2008-04-22T02:21:35.678-07:00</updated><title type='text'>How to open filedialog in web applications</title><content type='html'>&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;&lt;span style="color:#663366;"&gt;call below function when u need to open dialog box&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#cc0000;"&gt;DisplayDownloadDialog("MyDown.doc")&lt;br /&gt;&lt;/span&gt;----------------------------------------------------------&lt;br /&gt;Sub &lt;span style="color:#ff6600;"&gt;DisplayDownloadDialog(ByVal PathVirtual As String)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Dim strPhysicalPath As String&lt;br /&gt;Dim objFileInfo As System.IO.FileInfo&lt;br /&gt;Try&lt;br /&gt;strPhysicalPath = Server.MapPath(PathVirtual)&lt;br /&gt;'exit if file does not exist&lt;br /&gt;If Not System.IO.File.Exists(strPhysicalPath) Then Exit Sub&lt;br /&gt;objFileInfo = New System.IO.FileInfo(strPhysicalPath)&lt;br /&gt;Response.Clear()&lt;br /&gt;'Add Headers to enable dialog display&lt;br /&gt;Response.AddHeader("Content-Disposition", "attachment; filename=" &amp;amp; objFileInfo.Name)&lt;br /&gt;Response.AddHeader("Content-Length", objFileInfo.Length.ToString())&lt;br /&gt;&lt;br /&gt;Response.ContentType = "application/octet-stream"&lt;br /&gt;Response.WriteFile(objFileInfo.FullName)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Catch&lt;br /&gt;'on exception take no action&lt;br /&gt;'you can implement differently&lt;br /&gt;Finally&lt;br /&gt;&lt;br /&gt;Response.End()&lt;br /&gt;&lt;br /&gt;End Try&lt;br /&gt;End Sub&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-1486550899808432198?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/1486550899808432198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=1486550899808432198' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/1486550899808432198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/1486550899808432198'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2008/04/how-to-open-filedialog-in-web.html' title='How to open filedialog in web applications'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-6697590654583625015</id><published>2008-04-22T01:19:00.000-07:00</published><updated>2008-11-06T19:15:51.078-08:00</updated><title type='text'>How to Restore database back-up(.bak) file</title><content type='html'>&lt;a href="http://www.blogger.com/post-edit.g?blogID=6593678539754314140&amp;amp;postID=6697590654583625015#"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;STEP-1&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_aJqM3rm8fBs/SA2gFGY9VqI/AAAAAAAAAA8/N_LWNRIgexI/s1600-h/1.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5191981954903135906" style="CURSOR: hand" alt="" src="http://1.bp.blogspot.com/_aJqM3rm8fBs/SA2gFGY9VqI/AAAAAAAAAA8/N_LWNRIgexI/s320/2.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;STEP-2&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://4.bp.blogspot.com/_aJqM3rm8fBs/SA2hI2Y9VtI/AAAAAAAAABU/4TNd9kPc2ec/s1600-h/2.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5191983118839273170" style="CURSOR: hand" alt="" src="http://4.bp.blogspot.com/_aJqM3rm8fBs/SA2hI2Y9VtI/AAAAAAAAABU/4TNd9kPc2ec/s320/2.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;STEP-3&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://2.bp.blogspot.com/_aJqM3rm8fBs/SA2jaWY9VyI/AAAAAAAAAB8/jVbx-fFgnAo/s1600-h/3.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5191985618510239522" style="CURSOR: hand" alt="" src="http://2.bp.blogspot.com/_aJqM3rm8fBs/SA2jaWY9VyI/AAAAAAAAAB8/jVbx-fFgnAo/s320/3.JPG" border="0" /&gt;&lt;/a&gt; &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;STEP-4&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://4.bp.blogspot.com/_aJqM3rm8fBs/SA2h02Y9VvI/AAAAAAAAABk/g5AlRxTLdJs/s1600-h/4.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5191983874753517298" style="CURSOR: hand" alt="" src="http://4.bp.blogspot.com/_aJqM3rm8fBs/SA2h02Y9VvI/AAAAAAAAABk/g5AlRxTLdJs/s320/4.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=6593678539754314140&amp;amp;postID=6697590654583625015#"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;STEP-5&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://4.bp.blogspot.com/_aJqM3rm8fBs/SA2h02Y9VvI/AAAAAAAAABk/g5AlRxTLdJs/s1600-h/4.JPG"&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_aJqM3rm8fBs/SA2joGY9VzI/AAAAAAAAACE/tTLkObCCIOo/s1600-h/5.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5191985854733440818" style="CURSOR: hand" alt="" src="http://1.bp.blogspot.com/_aJqM3rm8fBs/SA2joGY9VzI/AAAAAAAAACE/tTLkObCCIOo/s320/5.JPG" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;STEP-6&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://4.bp.blogspot.com/_aJqM3rm8fBs/SA2nr2Y9V0I/AAAAAAAAACM/Z7VuKptyswk/s1600-h/6.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5191990317204461378" style="CURSOR: hand" alt="" src="http://4.bp.blogspot.com/_aJqM3rm8fBs/SA2nr2Y9V0I/AAAAAAAAACM/Z7VuKptyswk/s320/6.JPG" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-6697590654583625015?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/6697590654583625015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=6697590654583625015' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/6697590654583625015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/6697590654583625015'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2008/04/how-to-testore-database-back-upbak-file.html' title='How to Restore database back-up(.bak) file'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_aJqM3rm8fBs/SA2gFGY9VqI/AAAAAAAAAA8/N_LWNRIgexI/s72-c/2.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-1238970248508590126</id><published>2008-04-22T01:03:00.000-07:00</published><updated>2008-04-22T01:09:19.125-07:00</updated><title type='text'>NEWS</title><content type='html'>&lt;a href="http://www.eenadu.net/"&gt;&lt;span style="font-family:arial;font-size:180%;color:#009900;"&gt;&lt;strong&gt;http://www.eenadu.net/&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:180%;color:#009900;"&gt;&lt;strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;a href="http://www.sakshi.com/"&gt;&lt;span style="font-family:arial;font-size:180%;color:#009900;"&gt;&lt;strong&gt;http://www.sakshi.com/&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;a href="http://www.sakshi.com/"&gt;&lt;/a&gt;&lt;span style="font-size:180%;color:#009900;"&gt;&lt;strong&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;a href="http://www.andhrajyothy.com/"&gt;&lt;span style="font-family:arial;font-size:180%;color:#009900;"&gt;&lt;strong&gt;http://www.andhrajyothy.com/&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:180%;color:#009900;"&gt;&lt;strong&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;a href="http://www.greatandhra.com/"&gt;&lt;span style="font-family:arial;font-size:180%;color:#009900;"&gt;&lt;strong&gt;http://www.greatandhra.com&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.vaarttha.com/"&gt;&lt;span style="font-size:180%;color:#009900;"&gt;&lt;strong&gt;http://www.vaarttha.com/&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-1238970248508590126?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/1238970248508590126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=1238970248508590126' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/1238970248508590126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/1238970248508590126'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2008/04/news.html' title='NEWS'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-8724651652378961885</id><published>2008-04-22T00:47:00.000-07:00</published><updated>2008-04-22T00:56:33.140-07:00</updated><title type='text'>Cursors</title><content type='html'>&lt;strong&gt;&lt;span style="font-family:arial;font-size:130%;color:#660000;"&gt;Static cursors &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;font-size:130%;color:#660000;"&gt;Dynamic cursors &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;font-size:130%;color:#660000;"&gt;Forward-only cursors &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;&lt;span style="font-size:130%;color:#660000;"&gt;Keyset-driven cursors&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;&lt;span style="color:#cc33cc;"&gt;Static cursors:&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#6666cc;"&gt;A static cursor always displays the result set as it was when the cursor was opened.       Static cursors are always read-only.&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="color:#cc66cc;"&gt;Dynamic Cursors:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#6666cc;"&gt;Dynamic cursors are the opposite of static cursors. Dynamic cursors reflect all changes made to the rows in their result set when scrolling through the cursor.&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="color:#cc66cc;"&gt;Forward-only Cursors:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#6666cc;"&gt;A forward-only cursor does not support scrolling; it supports only fetching the rows serially from the start to the end of the cursor.&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="color:#cc66cc;"&gt;Keyset-driven Cursors:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#6666cc;"&gt;The keyset is the set of the key values from all the rows that qualified for the SELECT statement at the time the cursor was opened&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-8724651652378961885?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/8724651652378961885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=8724651652378961885' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/8724651652378961885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/8724651652378961885'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2008/04/cursors.html' title='Cursors'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-3007325275302704362</id><published>2008-04-16T23:40:00.000-07:00</published><updated>2008-04-22T04:53:19.462-07:00</updated><title type='text'>SQL KEYS</title><content type='html'>&lt;span style="font-family:arial;font-size:130%;color:#00cccc;"&gt;&lt;strong&gt;&lt;span style="color:#6633ff;"&gt;Get Day from DATE:&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:130%;color:#ff0000;"&gt;&lt;strong&gt;SELECT DAY(GETDATE())&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#00cccc;"&gt;&lt;strong&gt;&lt;span style="color:#6633ff;"&gt;How to get the version of SQL Server&lt;/span&gt; &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#00cccc;"&gt;&lt;strong&gt;SELECT @@VERSION AS 'SQL Server Version'&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;&lt;span style="color:#cc9933;"&gt;---------------------------------------------------------------------------&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;&lt;span style="color:#cc9933;"&gt;Be aware that there are often subtle syntax variations between different database systems. Also other key properties (for example 'clustered') will vary between database systems. Therefore please treat this part of the SQL crib sheet as a guide only.&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;&lt;span style="color:#cc9933;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc66cc;"&gt;Create a primary key on a table:&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#999900;"&gt;Alter Table TheTable Add Primary Key (field1, field2)&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc66cc;"&gt;To add an index on a field:&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;&lt;span style="color:#999900;"&gt;alter table TableName Add Index (field1)&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc66cc;"&gt;To remove a primary key:&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#999900;"&gt;&lt;strong&gt;alter table drop primary key&lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-3007325275302704362?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/3007325275302704362/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=3007325275302704362' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/3007325275302704362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/3007325275302704362'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2008/04/sql-keys.html' title='SQL KEYS'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-2731387693235647859</id><published>2008-04-16T23:33:00.000-07:00</published><updated>2008-04-16T23:37:55.813-07:00</updated><title type='text'>Simple SQL Statements</title><content type='html'>&lt;a name="Select"&gt;&lt;span style="font-family:arial;font-size:130%;color:#cc6600;"&gt;&lt;strong&gt;TOP&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;SELECT TOP 1 sal FROM (SELECT TOP 2 sal  FROM jobs ORDER BY sal  DESC)&lt;br /&gt;AS E ORDER BY sal ASC&lt;br /&gt;N th salary&lt;br /&gt;select * from emp e where n=(select count(distinct sal) from emp where e.sal&lt;=sal)&lt;br /&gt;&lt;br /&gt;Select * from jobs where min_lvl in (select min_lvl from jobs group by min_lvl having count (*) &gt; 1)&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff6600;"&gt;General Concepts&lt;/span&gt;&lt;br /&gt;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;  Entity Integrity&lt;br /&gt;  Domain Integrity&lt;br /&gt;  Referential integrity&lt;br /&gt;  User-Defined IntegrityEntity Integrity ensures that there are no duplicate rows in a table.Domain Integrity enforces valid entries for a given column by restricting the type, the format, or the range of possible values.Referential integrity ensures that rows cannot be deleted, which are used by other records (for example, corresponding data values between tables will be vital).User-Defined Integrity enforces some specific business rules that do not fall into entity, domain, or referential integrity categories.Each of these categories of the data integrity can be enforced by the appropriate constraints. Microsoft SQL Server supports the following constraints:&lt;br /&gt;  PRIMARY KEY&lt;br /&gt;  UNIQUE&lt;br /&gt;  FOREIGN KEY&lt;br /&gt;  CHECK&lt;br /&gt;  NOT NULLA 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;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&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.A FOREIGN KEY constraint prevents any actions that would destroy link 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.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.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.You can create constraints when the table is created, as part of the table definition by using the CREATE TABLE statement.&lt;br /&gt;Examples&lt;br /&gt;&lt;span style="color:#cc9933;"&gt;The following example creates a check_sale CHECK constraint on an employee table&lt;/span&gt;:&lt;br /&gt;CREATE TABLE employee(   EmployeeId INT NOT NULL,   LName VARCHAR(30) NOT NULL,   FName VARCHAR(30) NOT NULL,   Address VARCHAR(100) NOT NULL,   HireDate DATETIME NOT NULL,   Salary MONEY NOT NULL CONSTRAINT check_sale CHECK (salary &gt; 0))&lt;br /&gt;You can add constraints to an existing table by using the ALTER TABLE statement. The following example adds a pk_employee primary key constraint on an employee table:&lt;br /&gt;ALTER TABLE employee ADD CONSTRAINT pk_employee PRIMARY KEY (EmployeeId)&lt;br /&gt;You can add the primary or unique key constraint into an existing table only when there are no duplicate rows in the table. You can drop constraints in an existing table by using the ALTER TABLE statement. The following example drops the pk_employee primary key constraint in the employee table:&lt;br /&gt;ALTER TABLE employee DROP CONSTRAINT pk_employee&lt;br /&gt;Sometimes you need to perform some actions that require the FOREIGN KEY or CHECK constraints be disabled, for example, your company do not hire foreign employees, you made the appropriate constraint, but the situation was changed and your boss need to hire the foreign employee, but only this one. In this case, you need to disable the constraint by using the ALTER TABLE statement. After these actions will be performed, you can re-enable the FOREIGN KEY and CHECK constraints by using the ALTER TABLE statement.The following example disables the check_sale constraint in the employee table and enables this constraint later:&lt;br /&gt;-- disable the check_sale constraint in the employee tableALTER TABLE employee NOCHECK CONSTRAINT check_sale&lt;br /&gt;&lt;br /&gt;-- enable the check_sale constraint in the employee tableALTER TABLE employee CHECK CONSTRAINT check_sale&lt;br /&gt; &lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-2731387693235647859?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/2731387693235647859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=2731387693235647859' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/2731387693235647859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/2731387693235647859'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2008/04/simple-sql-statements.html' title='Simple SQL Statements'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-2289996877060384788</id><published>2008-04-16T06:13:00.000-07:00</published><updated>2008-04-16T06:14:15.626-07:00</updated><title type='text'>Delete &amp; Truncate</title><content type='html'>&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;out put will same but u can add some moredifference like1.delete can be rollback truncate cann.t be roleback.2.on delete trigger can be fire.but in truncate no trigger can be fire.3.delete is a dml statement while truncate is a dll statement&lt;br /&gt;Delete Command: 1. It’s a DML Command 2. Data can be rolled back. 3. Its slower than Truncate command b’coz it logs each row deletion. 4. With delete command trigger can be fire.&lt;br /&gt;Truncate Command:  1. It’s a DML Command 2. Data Can not be rolled back. 3. Its is faster than delete b’coz it does not log rows. With Truncate command trigger can not be fire.  both cases only the table data is removed, not the table structure&lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-2289996877060384788?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/2289996877060384788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=2289996877060384788' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/2289996877060384788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/2289996877060384788'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2008/04/delete-truncate.html' title='Delete &amp; Truncate'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-7149334921872119990</id><published>2008-04-16T06:10:00.000-07:00</published><updated>2008-04-16T06:11:12.303-07:00</updated><title type='text'>Refelction</title><content type='html'>&lt;span style="font-family:arial;font-size:130%;color:#009900;"&gt;&lt;strong&gt;Refelction is the mechanism of discovering class information solely at run time.Wondering where it would be useful? Imagine,you are in visual studio IDE (Integrated devolopment environment) and as you type "object." you would see all the methods,properties and events associated with that object.An other example would be an Object browser.The code attached here,loads all assemblies and displays each class,its contructors, methods, properties and events in tree view.The form also hase a command botton (labeled More Reflection) in whose click event I create an object of MyClass1 class based on the name of the class and invoke its methods during run time.&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#009900;"&gt;&lt;strong&gt;     While there are many reasons to use reflection, let me give you a real life example. Say you are building a custom component in .NET that requires a XML file to be used along with your components DLL. You can store the XML file in the /bin directory with your DLL, but how will you access the XML file without knowing the correct path to the /bin directory? I'm sure this is a rhetorical question if you have understand even 10% of what I have wrote so far, but I'll tell you anyways: r e f l e c t i o n. I've created a sample code snippet for you that does just this. Keep reading…&lt;br /&gt; &lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-7149334921872119990?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/7149334921872119990/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=7149334921872119990' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/7149334921872119990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/7149334921872119990'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2008/04/refelction.html' title='Refelction'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-6108339148927257404</id><published>2008-04-16T06:06:00.000-07:00</published><updated>2008-04-16T06:09:49.290-07:00</updated><title type='text'>Simple Mailing</title><content type='html'>&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;1.1-System.Web.Mail&lt;br /&gt;2.0-system.net.mail&lt;br /&gt;&lt;br /&gt;-----------------------------------------------&lt;br /&gt;2.0&lt;br /&gt;string AdminEmailId = System.Configuration.ConfigurationSettings.AppSettings["Conn"];&lt;br /&gt;------------------------&lt;br /&gt;string AdminEmailId = ConfigurationSettings.AppSettings["AdminEmailId"];&lt;br /&gt;MailMessage strmail = new MailMessage();&lt;br /&gt;strmail.To = AdminEmailId;&lt;br /&gt;strmail.From = txtEmail.Text;&lt;br /&gt;strmail.Body = (" &lt;/strong&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;Hi, &lt;/strong&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;The below are the details of person who is looking for a job. &lt;/strong&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;" + (BodyString + " &lt;/strong&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;Thanks."));&lt;br /&gt;strmail.BodyFormat = MailFormat.Html;&lt;br /&gt;strmail.Subject = "Hai";&lt;br /&gt;System.Web.Mail.SmtpMail.Send(strmail);&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-6108339148927257404?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/6108339148927257404/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=6108339148927257404' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/6108339148927257404'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/6108339148927257404'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2008/04/calling-simple-javascript.html' title='Simple Mailing'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-609613683101138364</id><published>2008-04-16T06:05:00.001-07:00</published><updated>2008-04-16T06:05:45.850-07:00</updated><title type='text'>Get Post</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;1.  Incase of Get method the information entered into the input frames will carried to the server along with the requested URL as a query strem.Where as&lt;br /&gt;Incase of Post method the client input data will be carried along with form headers but not with the URL.&lt;br /&gt;2. the Limitation of Get method is it cant carry the data more than 256 characters where as in&lt;br /&gt;Post method there is no Limitation in the size of the data.&lt;br /&gt;3. The advantage of Get method is it works faster than the post method .  POST is more safer then GET. Because the URL doesn't expose the data.&lt;br /&gt;4. Incase  of ASP the default method is Get where as in Asp.Net is Post&lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-609613683101138364?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/609613683101138364/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=609613683101138364' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/609613683101138364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/609613683101138364'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2008/04/get-post.html' title='Get Post'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-7998497467692556732</id><published>2008-04-16T06:03:00.000-07:00</published><updated>2008-04-16T06:04:14.473-07:00</updated><title type='text'>How to prevent my .NET DLL to be decompiled?</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;By design .NET embeds rich Meta data inside the executable code using MSIL. Any one can easilydecompile your DLL back using tools like ILDASM (owned by Microsoft) or Reflector for.NET which is a third party. Secondly there are many third party tools which make this decompilingprocess a click away. So any one can easily look in to your assemblies and reverse engineer themback in to actual source code and understand some real good logic which can make it easy tocrack your application.&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;                     The process by which you can stop this reverse engineering is using “obfuscation”. It’s a techniquewhich will foil the decompilers. There are many third parties (XenoCode, Demeanor for .NET)which provide .NET obfuscation solution. Microsoft includes one that is Dotfuscator CommunityEdition with Visual Studio.NET&lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-7998497467692556732?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/7998497467692556732/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=7998497467692556732' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/7998497467692556732'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/7998497467692556732'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2008/04/how-to-prevent-my-net-dll-to-be.html' title='How to prevent my .NET DLL to be decompiled?'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-2492861219416288845</id><published>2008-04-16T06:01:00.000-07:00</published><updated>2008-04-16T06:02:18.734-07:00</updated><title type='text'>Compiled vs. Interpreted</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Programming languages generally fall into one of two categories: Compiled or Interpreted.&lt;br /&gt; With a compiled language, code you enter is reduced to a set of machine-specific instructions before being saved as an executable file.&lt;br /&gt;With interpreted languages, the code is saved in the same format that you entered.&lt;br /&gt;Compiled programs generally run faster than interpreted ones because interpreted programs must be reduced to machine instructions at runtime.&lt;br /&gt;However, with an interpreted language you can do things that cannot be done in a compiled language.&lt;br /&gt; For example, interpreted programs can modify themselves by adding or changing functions at runtime. It is also usually easier to develop applications in an interpreted environment because you don't have to recompile your application each time you want to test a small section. &lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-2492861219416288845?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/2492861219416288845/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=2492861219416288845' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/2492861219416288845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/2492861219416288845'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2008/04/compiled-vs-interpreted.html' title='Compiled vs. Interpreted'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-748410151615907258</id><published>2008-04-16T05:59:00.000-07:00</published><updated>2008-04-16T06:00:28.934-07:00</updated><title type='text'>VCS</title><content type='html'>&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;Short for &lt;span style="color:#ff0000;"&gt;Concurrent Versions System&lt;/span&gt;, an open-source, network-transparent program that allows developers to keep track of different development versions of source code. CVS does not maintain multiple versions of source code files but keeps a single copy and records of all of the changes that are made. When a developer wants a particular development version of a file, CVS will reconstruct that version based on its records. Bugs can often get into code when it is modified and may not be detected until long after the modification is made. CVS can retrieve old versions of the code, allowing the developer to see precisely which change caused the bug. CVS is also useful when more than one person is working on a specific file, where it is possible for the developers to overwrite each other's changes. CVS solves this problem by having each developer work in an individual directory and then merging the work from each after the work is complete. &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;&lt;br /&gt;It is important to note that CVS is not a build system but rather a way to control disparate versions of code as it is developed over time.&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;CVS is also called a version control system.&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-748410151615907258?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/748410151615907258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=748410151615907258' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/748410151615907258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/748410151615907258'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2008/04/vcs.html' title='VCS'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-6212503112391919030</id><published>2008-04-16T05:55:00.000-07:00</published><updated>2008-04-16T05:57:29.575-07:00</updated><title type='text'>Configure SMTP Mail Server</title><content type='html'>&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt; Please find the following steps to setup the SMTP Mail server.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#663366;"&gt;1)       Go to IIS.&lt;br /&gt;2)       Go to Default SMTP Virtual Server à Right Click on this.&lt;br /&gt;3)       Go to Properties  à Go to “Access” Tab.&lt;br /&gt;4)       Go to “Relay restrictions” Section à Click on Relay button.&lt;br /&gt;5)       Select “Only the list below” radio button à Click on Add button.&lt;br /&gt;6)       Select Single Computer à Give IP Address as 127.0.0.1&lt;br /&gt;7)       Click on OK.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Note:  Please START the Default SMTP Virtual Server in IIS if it is STOP&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-6212503112391919030?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/6212503112391919030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=6212503112391919030' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/6212503112391919030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/6212503112391919030'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2008/04/configure-smtp-mail-server.html' title='Configure SMTP Mail Server'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-6608019107158751306</id><published>2008-04-16T05:52:00.000-07:00</published><updated>2008-04-16T05:58:12.580-07:00</updated><title type='text'>Remove SQL Logfile</title><content type='html'>&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;&lt;span style="color:#ffcccc;"&gt;&lt;span style="color:#cc33cc;"&gt;BACKUP LOG &lt;database_name&gt;WITH TRUNCATE_ONLYGO&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;EX:&lt;/span&gt; &lt;span style="color:#000000;"&gt;BACKUP LOG pubs WITH TRUNCATE_ONLYGO&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-6608019107158751306?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/6608019107158751306/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=6608019107158751306' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/6608019107158751306'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/6608019107158751306'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2008/04/remove-sql-logfile.html' title='Remove SQL Logfile'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-2159839567722920305</id><published>2008-04-16T05:48:00.000-07:00</published><updated>2008-04-18T02:49:01.790-07:00</updated><title type='text'>Simple Storeprocedure</title><content type='html'>&lt;span style="font-family:arial;font-size:130%;color:#3333ff;"&gt;&lt;strong&gt;INSERT:-&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;========================&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#000000;"&gt;&lt;strong&gt;CREATE PROCEDURE SP_INSERT_VALUES &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#000000;"&gt;&lt;strong&gt;( &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#000000;"&gt;&lt;strong&gt;@ProdName char(50), @active bit, @SortOrder int&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#000000;"&gt;&lt;strong&gt;) &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#000000;"&gt;&lt;strong&gt;as&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#000000;"&gt;&lt;strong&gt;INSERT INTO atmt_products (ProdName,active,SortOrder )&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#000000;"&gt;&lt;strong&gt;VALUES&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#000000;"&gt;&lt;strong&gt;(@ProdName,@active,@SortOrder) &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#000000;"&gt;&lt;strong&gt;return @@identity&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#000000;"&gt;&lt;strong&gt;GO&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;=================================&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#3333ff;"&gt;&lt;strong&gt;UPDATE:-&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;===========================&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;CREATE PROCEDURE SP_UPDATE_VALUES &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;( &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;@prodid int, @ProdName Nchar(50), @active bit, @SortOrder int) &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;as&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;UPDATE atmt_products SET &lt;/strong&gt;&lt;/span&gt;&lt;a href="mailto:ProdName=@ProdName"&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;ProdName=@ProdName&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;,&lt;/strong&gt;&lt;/span&gt;&lt;a href="mailto:active=@active"&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;active=@active&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;,&lt;/strong&gt;&lt;/span&gt;&lt;a href="mailto:SortOrder=@SortOrder"&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;SortOrder=@SortOrder&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt; &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;WHERE &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href="mailto:prodid=@prodid"&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;prodid=@prodid&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;GO&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;==========================&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;color:#3333ff;"&gt;&lt;strong&gt;DELETE:-&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;========================&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;CREATE PROCEDURE SP_DELETE &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;( &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;@prodid int &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;) &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;as &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;delete from atmt_products WHERE &lt;/strong&gt;&lt;/span&gt;&lt;a href="mailto:prodid=@prodid"&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;prodid=@prodid&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:130%;"&gt;&lt;strong&gt;GO&lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-2159839567722920305?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/2159839567722920305/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=2159839567722920305' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/2159839567722920305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/2159839567722920305'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2008/04/simple-storeprocedure.html' title='Simple Storeprocedure'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-8205217383211802445</id><published>2008-04-16T05:43:00.000-07:00</published><updated>2008-04-22T05:54:15.879-07:00</updated><title type='text'>TRIGGERS</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;The SQL CREATE TRIGGER statement provides a way for the database management system to actively control, monitor, and manage a group of tables whenever an insert, update, or delete operation is performed. The statements specified in the SQL trigger are executed each time an SQL insert, update, or delete operation is performed. An SQL trigger may call stored procedures or user-defined functions to perform additional processing when the trigger is executed.&lt;br /&gt;Unlike stored procedures, an SQL trigger cannot be directly called from an application. Instead, an SQL trigger is invoked by the database management system on the execution of a triggering insert, update, or delete operation. The definition of the SQL trigger is stored in the database management system and is invoked by the database management system, when the SQL table, that the trigger is defined on, is modified.&lt;br /&gt;&lt;/strong&gt;&lt;span style="color:#cc6600;"&gt;&lt;br /&gt;&lt;strong&gt;Implementing Triggers in SQL Server 2000&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;br /&gt;&lt;br /&gt;Triggers are special types of Stored Procedures that are defined to execute automatically in place of or after data modifications. They can be executed automatically on the INSERT, DELETE and UPDATE triggering actions.&lt;br /&gt;There are two different types of triggers in Microsoft SQL Server 2000. They are INSTEAD OF triggers and AFTER triggers. These triggers differ from each other in terms of their purpose and when they are fired. In this article we shall discuss each type of trigger.&lt;br /&gt;First of all, let's create a sample database with some tables and insert some sample data in those tables using the script below:&lt;br /&gt;&lt;br /&gt;Create Database KDMNN&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;USE KDMNN&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;CREATE TABLE [dbo].[User_Details] (&lt;br /&gt;[UserID] [int] NULL ,&lt;br /&gt;[FName] [varchar] (50) NOT NULL ,&lt;br /&gt;[MName] [varchar] (50) NULL ,&lt;br /&gt;[LName] [varchar] (50) NOT NULL ,&lt;br /&gt;[Email] [varchar] (50) NOT NULL&lt;br /&gt;) ON [PRIMARY]&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;CREATE TABLE [dbo].[User_Master] (&lt;br /&gt;[UserID] [int] IDENTITY (1, 1) NOT NULL ,&lt;br /&gt;[UserName] [varchar] (50) NULL ,&lt;br /&gt;[Password] [varchar] (50) NULL&lt;br /&gt;) ON [PRIMARY]&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;ALTER TABLE [dbo].[User_Master] WITH NOCHECK ADD&lt;br /&gt;CONSTRAINT [PK_User_Master] PRIMARY KEY CLUSTERED&lt;br /&gt;(&lt;br /&gt;[UserID]&lt;br /&gt;) ON [PRIMARY]&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;ALTER TABLE [dbo].[User_Details] ADD&lt;br /&gt;CONSTRAINT [FK_User_Details_User_Master] FOREIGN KEY&lt;br /&gt;(&lt;br /&gt;[UserID]&lt;br /&gt;) REFERENCES [dbo].[User_Master] (&lt;br /&gt;[UserID]&lt;br /&gt;)&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;INSERT INTO USER_MASTER(USERNAME, PASSWORD)&lt;br /&gt;SELECT 'Navneeth','Navneeth' UNION&lt;br /&gt;SELECT 'Amol','Amol' UNION&lt;br /&gt;SELECT 'Anil','Anil' UNION&lt;br /&gt;SELECT 'Murthy','Murthy'&lt;br /&gt;&lt;br /&gt;INSERT INTO USER_DETAILS(USERID, FNAME, LNAME, EMAIL)&lt;br /&gt;SELECT 1,'Navneeth','Naik','navneeth@kdmnn.com' UNION&lt;br /&gt;SELECT 2,'Amol','Kulkarni','amol@kdmnn.com' UNION&lt;br /&gt;SELECT 3,'Anil','Bahirat','anil@kdmnn.com' UNION&lt;br /&gt;SELECT 4,'Murthy','Belluri','murthy@kdmnn.com'&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#993300;"&gt;AFTER Triggers&lt;/span&gt;&lt;br /&gt;The type of trigger that gets executed automatically after the statement that triggered it completes is called an AFTER trigger. An AFTER trigger is a trigger that gets executed automatically before the transaction is committed or rolled back.&lt;br /&gt;Using the below script, first we shall create a trigger on the table USER_MASTER for the INSERT event of the table.&lt;br /&gt;&lt;br /&gt;USE KDMNN&lt;br /&gt;Go&lt;br /&gt;&lt;br /&gt;CREATE TRIGGER trgInsert&lt;br /&gt;ON User_Master&lt;br /&gt;FOR INSERT&lt;br /&gt;AS&lt;br /&gt;Print ('AFTER Trigger [trgInsert] – Trigger executed !!')&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;BEGIN TRANSACTION&lt;br /&gt;DECLARE @ERR INT&lt;br /&gt;&lt;br /&gt;INSERT INTO USER_MASTER(USERNAME, PASSWORD)&lt;br /&gt;VALUES('Damerla','Damerla')&lt;br /&gt;&lt;br /&gt;SET @ERR = @@Error&lt;br /&gt;IF @ERR = 0&lt;br /&gt;BEGIN&lt;br /&gt;ROLLBACK TRANSACTION&lt;br /&gt;PRINT 'ROLLBACK TRANSACTION'&lt;br /&gt;END&lt;br /&gt;ELSE&lt;br /&gt;BEGIN&lt;br /&gt;COMMIT TRANSACTION&lt;br /&gt;PRINT 'COMMIT TRANSACTION'&lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;Output&lt;br /&gt;AFTER Trigger [trgInsert] – Trigger executed !!&lt;br /&gt;(1 row(s) affected)&lt;br /&gt;ROLLBACK TRANSACTION&lt;br /&gt;&lt;br /&gt;By looking at the output, we can conclude that before the transaction is rolled back or committed, the AFTER trigger gets executed automatically. A table can have several AFTER triggers for each of the three triggering actions i.e., INSERT, DELETE and UPDATE. Using the below script, we shall create two triggers on the table User_Master for the INSERT triggering action.&lt;br /&gt;&lt;br /&gt;CREATE TRIGGER trgInsert2&lt;br /&gt;ON User_Master&lt;br /&gt;FOR INSERT&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt;Print ('AFTER Trigger [trgInsert2] – Trigger executed !!')&lt;br /&gt;END&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;CREATE TRIGGER trgInsert3&lt;br /&gt;ON User_Master&lt;br /&gt;FOR INSERT&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt;Print ('AFTER Trigger [trgInsert3] – Trigger executed !!')&lt;br /&gt;END&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;BEGIN TRANSACTION&lt;br /&gt;DECLARE @ERR INT&lt;br /&gt;&lt;br /&gt;INSERT INTO USER_MASTER(USERNAME, PASSWORD)&lt;br /&gt;VALUES('Damerla','Damerla')&lt;br /&gt;&lt;br /&gt;SET @ERR = @@Error&lt;br /&gt;IF @ERR = 0&lt;br /&gt;BEGIN&lt;br /&gt;ROLLBACK TRANSACTION&lt;br /&gt;PRINT 'ROLLBACK TRANSACTION'&lt;br /&gt;END&lt;br /&gt;ELSE&lt;br /&gt;BEGIN&lt;br /&gt;COMMIT TRANSACTION&lt;br /&gt;PRINT 'COMMIT TRANSACTION'&lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;Output&lt;br /&gt;AFTER Trigger [trgInsert] – Trigger executed !!&lt;br /&gt;AFTER Trigger [trgInsert2] – Trigger executed !!&lt;br /&gt;AFTER Trigger [trgInsert3] – Trigger executed !!&lt;br /&gt;(1 row(s) affected)&lt;br /&gt;ROLLBACK TRANSACTION&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;&lt;span style="font-family:arial;color:#996633;"&gt;&lt;strong&gt;Triggers can be used in the following scenarios, such as if the database is de-normalized and requires an automated way to update redundant data contained in multiple tables, or if customized messages and complex error handling are required, or if a value in one table must be validated against a non-identical value in another table.&lt;br /&gt;Triggers are a powerful tool that can be used to enforce the business rules automatically when the data is modified. Triggers can also be used to maintain the data integrity. But they are not to maintain data integrity. Triggers should be used to maintain the data integrity only if you are unable to enforce the data integrity using CONSTRAINTS, RULES and DEFAULTS. Triggers cannot be created on the temporary tables.&lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-8205217383211802445?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/8205217383211802445/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=8205217383211802445' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/8205217383211802445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/8205217383211802445'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2008/04/triggers.html' title='TRIGGERS'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-2943163947266912955</id><published>2008-04-16T05:36:00.000-07:00</published><updated>2008-04-16T05:42:27.041-07:00</updated><title type='text'>NORMALIZATION</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;&lt;span style="color:#ff99ff;"&gt;What is normalization?&lt;/span&gt;&lt;br /&gt;Normalization is the process of designing a data model to efficiently store data in a database. The end result is that redundant data is eliminated, and only data related to the attribute is stored within the table.&lt;br /&gt;For example, let's say we store City, State and ZipCode data for Customers in the same table as Other Customer data. With this approach, we keep repeating the City, State and ZipCode data for all Customers in the same area. Instead of storing the same data again and again, we could normalize the data and create a related table called City. The "City" table could then store City, State and ZipCode along with IDs that relate back to the Customer table, and we can eliminate those three columns from the Customer table and add the new ID column.&lt;br /&gt;&lt;span style="color:#ffcc33;"&gt;Normalization rules have been broken down into several forms.&lt;/span&gt; People often refer to the third normal form (3NF) when talking about database design. This is what most database designers try to achieve: In the conceptual stages, data is segmented and normalized as much as possible, but for practical purposes those segments are changed during the evolution of the data model. Various normal forms may be introduced for different parts of the data model to handle the unique situations you may face.&lt;br /&gt;Whether you have heard about normalization or not, your database most likely follows some of the rules, unless all of your data is stored in one giant table. We will take a look at the first three normal forms and the rules for determining the different forms here.&lt;br /&gt;&lt;span style="color:#cc9933;"&gt;Rules for First Normal Form (1NF)&lt;br /&gt;&lt;/span&gt;Eliminate repeating groups. This table contains repeating groups of data in the Software column.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#cc6600;"&gt;Rules for second Normal Form (2NF) &lt;/span&gt;&lt;br /&gt;Eliminate redundant data plus 1NF. This table contains the name of the software which is redundant data.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#cc6600;"&gt;Rules for Third Normal Form (3NF)&lt;/span&gt;&lt;br /&gt;Eliminate columns ‘not dependent on key’ plus 1NF and 2NF. In this table, we have data that contains both data about the computer and the user.&lt;br /&gt;&lt;br /&gt;To eliminate columns not dependent on the key, we would create the following tables. Now the data stored in the computer table is only related to the computer, and the data stored in the user table is only related to the user.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#996633;"&gt;What does normalization have to do with SQL Server?&lt;/span&gt;&lt;br /&gt;To be honest, the answer here is nothing. SQL Server, like any other RDBMS, couldn't care less whether your data model follows any of the normal forms. You could create one table and store all of your data in one table or you can create a lot of little, unrelated tables to store your data. SQL Server will support whatever you decide to do. The only limiting factor you might face is the maximum number of columns SQL Server supports for a table.&lt;br /&gt;SQL Server does not force or enforce any rules that require you to create a database in any of the normal forms. You are able to mix and match any of the rules you need, but it is a good idea to try to normalize your database as much as possible when you are designing it. People tend to spend a lot of time up front creating a normalized data model, but as soon as new columns or tables need to be added, they forget about the initial effort that was devoted to creating a nice clean model.&lt;br /&gt;To assist in the design of your data model, you can use the &lt;/strong&gt;&lt;/span&gt;&lt;a href="http://searchsqlserver.techtarget.com/tip/1,289483,sid87_gci1114748,00.html"&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;DaVinci tools&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt; that are part of SQL Server Enterprise Manager.&lt;br /&gt;&lt;span style="color:#993300;"&gt;Advantages of normalization&lt;/span&gt;&lt;br /&gt;1. Smaller database: By eliminating duplicate data, you will be able to reduce the overall size of the database.2. Better performance:&lt;br /&gt;a. Narrow tables: Having more fine-tuned tables allows your tables to have less columns and allows you to fit more records per data page.b. Fewer indexes per table mean faster maintenance tasks such as index rebuilds.c. Only join tables that you need.&lt;br /&gt;&lt;span style="color:#cc6600;"&gt;Disadvantages of normalization&lt;/span&gt;&lt;br /&gt;1. More tables to join: By spreading out your data into more tables, you increase the need to join tables.2. Tables contain codes instead of real data: Repeated data is stored as codes rather than meaningful data. Therefore, there is always a need to go to the lookup table for the value.3. Data model is difficult to query against: The data model is optimized for applications, not for ad hoc querying.&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;Summary&lt;/span&gt;&lt;br /&gt;Your data model design is both an art and a science. Balance what works best to support the application that will use the database and to store data in an efficient and structured manner. For transaction-based systems, a highly normalized database design is the way to go; it ensures consistent data throughout the entire database and that it is performing well. For reporting-based systems, a less normalized database is usually the best approach. You will eliminate the need to join a lot of tables and queries will be faster. Plus, the database will be much more user friendly for ad hoc reporting needs. &lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-2943163947266912955?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/2943163947266912955/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=2943163947266912955' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/2943163947266912955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/2943163947266912955'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2008/04/normalization.html' title='NORMALIZATION'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-3411994134840960829</id><published>2008-04-14T08:00:00.000-07:00</published><updated>2008-04-14T09:10:17.441-07:00</updated><title type='text'>Search Engine Optimization (SEO)</title><content type='html'>&lt;h3&gt;What is Search Engine Optimization (SEO)?&lt;br /&gt;You might have heard of the word SEO mean search engine optimization. Google is major search engine and if you have a website, you can get more traffic on your site by adding it to search engines like google yahoo or msn. There are many ways to add your site to search engines and get crawled.&lt;br /&gt;Search engine optimization is a set of methods aimed at improving the ranking of a website in search engine listings. The term also refers to an industry of consultants that carry out optimization projects on behalf of clients' sites. Search Engines display different kinds of listings in the search engine results pages (SERPs), including: pay-per-click advertisements, paid inclusion listings, and organic search results. SEO is primarily concerned with advancing the goals of a web site by improving the number and position of its organic search results for a wide variety of relevant keywords.&lt;br /&gt;&lt;strong&gt;Available general search engines..&lt;/strong&gt;&lt;br /&gt;Alexa Internet&lt;br /&gt;Ask.com (formerly Ask Jeeves)&lt;br /&gt;Baidu (Chinese)&lt;br /&gt;Exalead (French)&lt;br /&gt;Gigablast&lt;br /&gt;Google&lt;br /&gt;Live Search (formerly MSN Search)&lt;br /&gt;Sogou (Chinese)&lt;br /&gt;Sohu (Chinese)&lt;br /&gt;Yahoo! Search&lt;br /&gt;&lt;/h3&gt;&lt;br /&gt;&lt;h6&gt;Ref: &lt;a href="http://en.wikipedia.org/wiki/List_of_search_engines"&gt;http://en.wikipedia.org/wiki/List_of_search_engines&lt;/a&gt;&lt;/h6&gt;&lt;br /&gt;&lt;h3&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;How To Search Engine Optization&lt;/span&gt;&lt;br /&gt;--------------------------------- &lt;/h3&gt;&lt;br /&gt;&lt;h3&gt;1. Use exact key words, relted to your site. Add key words with large font( more than 14pix) &lt;/h3&gt;&lt;br /&gt;&lt;h3&gt;2. Add social services links in your ste to get more clicks to your site. &lt;/h3&gt;&lt;br /&gt;&lt;h3&gt;3.use validated HTML code &lt;/h3&gt;&lt;br /&gt;&lt;h3&gt;4.use HTML Markups &lt;/h3&gt;&lt;br /&gt;&lt;h3&gt;5. USe Rss, add Atl text for Images. &lt;/h3&gt;&lt;br /&gt;&lt;h3&gt;6.Use sitemap. &lt;/h3&gt;&lt;br /&gt;&lt;h3&gt;7.Use "title" property&lt;/h3&gt;&lt;br /&gt;&lt;h3&gt;8.Don't use Flash/Silverlight, javascript-based MENU. &lt;/h3&gt;&lt;br /&gt;&lt;h3&gt;9.Don't use inline css, use external stylesheets whenever possible&lt;br /&gt;Don't use inline javascript, use external .js-files instead&lt;br /&gt;Remove leave html-comments. &lt;/h3&gt;&lt;br /&gt;&lt;h3&gt;10.Don't forger " title-tag ". &lt;/h3&gt;&lt;br /&gt;&lt;h3&gt;11. Don't USE duplicate content. &lt;/h3&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-3411994134840960829?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/3411994134840960829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=3411994134840960829' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/3411994134840960829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/3411994134840960829'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2008/04/search-engine-optimization-seo.html' title='Search Engine Optimization (SEO)'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-6024600211011773666</id><published>2007-10-27T03:35:00.000-07:00</published><updated>2007-10-27T03:37:26.146-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='New series of Microsoft Webcasts'/><title type='text'>New series of Microsoft Webcasts</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;Communities and webcasts are great place to learn and share .Is not it?&lt;br /&gt;&lt;br /&gt;Here are new series of webcasts for IT PRO by eminent speakersPlease register the corresponding stream.&lt;br /&gt;&lt;br /&gt;October 15, 2007(4:00 pm - 5:30 pm)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a id="amzn_cl_link_0" href="http://amazon.com/gp/product/0792376528?ie=UTF8&amp;amp;tag=hima-20&amp;amp;link_code=em1&amp;amp;camp=212341&amp;amp;creative=384049&amp;amp;creativeASIN=0792376528&amp;amp;adid=785ef657-a16f-4234-a30c-08f452340e4a" target="_blank"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Infrastructure Architecture&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:85%;"&gt; - Case Study Review&lt;br /&gt;&lt;/span&gt;&lt;a href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032348944&amp;amp;EventCategory=4&amp;amp;culture=en-US&amp;amp;CountryCode=US"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Infrastructure Architecture - Case Study Review.&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;Speaker: Ramnish SinghOctober 17, 2007(2:00 pm - 3:00 pm)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://go.microsoft.com/?linkid=7535891"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;SQL Server 2005 - Basics&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;This session we will take a look at the various &lt;/span&gt;&lt;a id="amzn_cl_link_1" href="http://amazon.com/gp/product/073562271X?ie=UTF8&amp;amp;tag=hima-20&amp;amp;link_code=em1&amp;amp;camp=212341&amp;amp;creative=384049&amp;amp;creativeASIN=073562271X&amp;amp;adid=8611a3e7-5c0f-463b-9487-48e356df5551" target="_blank"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;SQL Server 2005&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:85%;"&gt; Editions available in the market. We will then take a dive into the various sub-components introduced with SQL Server 2005. The session will build the foundation for getting started with SQL Server 2005.&lt;br /&gt;&lt;br /&gt;Speaker: &lt;/span&gt;&lt;a id="amzn_cl_link_2" href="http://amazon.com/gp/product/1590593456?ie=UTF8&amp;amp;tag=hima-20&amp;amp;link_code=em1&amp;amp;camp=212341&amp;amp;creative=384049&amp;amp;creativeASIN=1590593456&amp;amp;adid=0d6756d2-1ef6-4b7e-97ec-3d3cfde637e6" target="_blank"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Vinod Kumar&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:85%;"&gt; October 18, 2007(4:00 pm - 5:30 pm)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://go.microsoft.com/?linkid=7535892"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;SQL Server 2005: Database Maintenance&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Although many of the concepts of database maintenance in a SQL Server 2005 Environment remain the same as with previous SQL releases, there are several new features. Database snapshots provide a way to revert to a point of consistency, while partial restores allows users to access unaffected files and pages. You can now continue the &lt;/span&gt;&lt;a id="amzn_cl_link_3" href="http://amazon.com/gp/product/B0009RKKZ4?ie=UTF8&amp;amp;tag=hima-20&amp;amp;link_code=em1&amp;amp;camp=212341&amp;amp;creative=384049&amp;amp;creativeASIN=B0009RKKZ4&amp;amp;adid=c372e41d-69fb-45d6-ae71-e4b0605fad3b" target="_blank"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;backup and restore operations&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:85%;"&gt; after a failure and configure fast recovery during crash recovering and mirroring failover. It is now possible to verify the integrity of data pages during backup and restore operations. Come, hear about all of these and see some of these features in action with me!&lt;br /&gt;&lt;br /&gt;Speaker: L Srividya October 19, 2007(4:00 pm - 5:30 pm)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032355047&amp;amp;EventCategory=4&amp;amp;culture=en-US&amp;amp;CountryCode=US"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Monitoring SQL Server 2005 Performance&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;A number of tools are available to inspect and record activity in a SQL Server installation. Some are built into SQL Server and some are built into the Operating System. Some of these tools include the System monitor, Data Tuning Advisor, &lt;/span&gt;&lt;a id="amzn_cl_link_4" href="http://amazon.com/gp/product/B000QV30G4?ie=UTF8&amp;amp;tag=hima-20&amp;amp;link_code=em1&amp;amp;camp=212341&amp;amp;creative=384049&amp;amp;creativeASIN=B000QV30G4&amp;amp;adid=249fa397-2688-481c-936a-b360a77f9bf4" target="_blank"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Activity Monitor&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;, etc. This session takes you through a few of these tools for troubleshooting and optimizing your SQL Server performance.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-6024600211011773666?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/6024600211011773666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=6024600211011773666' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/6024600211011773666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/6024600211011773666'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2007/10/new-series-of-microsoft-webcasts.html' title='New series of Microsoft Webcasts'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-2177263879727795478</id><published>2007-10-27T03:26:00.000-07:00</published><updated>2007-10-27T03:27:17.616-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Class and structure'/><title type='text'>Class and structure</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;span style="color:#cc0000;"&gt;What are similarities between Class and structure ?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#333399;"&gt;Following are the similarities between classes and structures :-v Both can have constructors, methods, properties, fields, constants,enumerations, events, and event handlers.v Structures and classes can implement interface.v Both of them can have constructors with and without parameter.v Both can have delegates and events.(A) What is the difference between Class and structure’s ?Following are the key differences between them :-v Structure are value types and classes are reference types. So structures usestack and classes use heap.v Structures members can not be declared as protected, but class members canbe. You can not do inheritance in structures.v Structures do not require constructors while classes require.v Objects created from classes are terminated using Garbage collector. Structuresare not destroyed using GC.&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-2177263879727795478?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/2177263879727795478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=2177263879727795478' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/2177263879727795478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/2177263879727795478'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2007/10/class-and-structure.html' title='Class and structure'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-4794809118491048645</id><published>2007-10-27T03:25:00.001-07:00</published><updated>2007-10-27T03:25:53.867-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cache'/><title type='text'>Cache</title><content type='html'>&lt;span style="font-family:arial;"&gt;(B) What is application object ?&lt;br /&gt;Application object can used in situation where we want data to be shared across users globally.&lt;br /&gt;(I)What’s the difference between Cache object and application object ?&lt;br /&gt;The main difference between the Cache and Application objects is that the Cache object provides cache-specific features, such as dependencies and expiration policies.&lt;br /&gt;(I)How can get access to cache object ?&lt;br /&gt;The Cache object is defined in the System.Web.Caching namespace. You can get a reference to the Cache object by using the Cache property of the HttpContext class in the System.Web namespace or by using the Cache property of the Page object.&lt;br /&gt;(A)What are dependencies in cache and types of dependencies ?&lt;br /&gt;When you add an item to the cache, you can define dependency relationships that can force that item to be removed from the cache under specific activities of&lt;br /&gt;dependencies.Example if the cache object is dependent on file and when the file data changes you want the cache object to be update.Following are the supported dependency&lt;br /&gt;:-&lt;br /&gt;√ File dependency :- Allows you to invalidate a specific cache item when a disk&lt;br /&gt;based file or files change.&lt;br /&gt;√ Time-based expiration :- Allows you to invalidate a specific cache item&lt;br /&gt;depending on predefined time.&lt;br /&gt;√ Key dependency :-Allows you to invalidate a specific cache item depending&lt;br /&gt;when another cached item changes.&lt;br /&gt;(P)Can you show a simple code showing file dependency in cache ?&lt;br /&gt;Partial Class Default_aspx&lt;br /&gt;Public Sub displayAnnouncement()&lt;br /&gt;Dim announcement As String&lt;br /&gt;If Cache(“announcement”) Is Nothing Then&lt;br /&gt;Dim file As New _&lt;br /&gt;System.IO.StreamReader _&lt;br /&gt;(Server.MapPath(“announcement.txt”))&lt;br /&gt;announcement = file.ReadToEnd&lt;br /&gt;file.Close()&lt;br /&gt;Dim depends As New _&lt;br /&gt;System.Web.Caching.CacheDependency _&lt;br /&gt;(Server.MapPath(“announcement.txt”))&lt;br /&gt;Cache.Insert(“announcement”, announcement, depends)&lt;br /&gt;End If&lt;br /&gt;Response.Write(CType(Cache(“announcement”), String))&lt;br /&gt;End Sub&lt;br /&gt;Private Sub Page_Init(ByVal sender As Object, ByVal e As&lt;br /&gt;System.EventArgs) Handles Me.Init&lt;br /&gt;displayAnnouncement()&lt;br /&gt;End Sub&lt;br /&gt;End Class&lt;br /&gt;Note :- Above source code can be obtained from CD in “CacheSample”&lt;br /&gt;folder.”Announcement.txt” is in the same folder which you can play around to see the&lt;br /&gt;results.&lt;br /&gt;Above given method displayAnnouncement() displays banner text from Announcement.txt file which is lying in application path of the web directory.Above method first checks is the Cache object nothing , if the cache object is nothing then it moves further to load the cache data from the file.Whenever the file data changes the cache object is removed and&lt;br /&gt;set to nothing.&lt;br /&gt;(A) What is Cache Callback in Cache ?&lt;br /&gt;Cache object is dependent on its dependencies example file based , time based etc.Cache items remove the object when cache dependencies change.ASP.NET provides capability to execute a callback method when that item is removed from cache.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(B) What are different types of caching using cache object of ASP.NET?&lt;br /&gt;You can use two types of output caching to cache information that is to be transmitted to&lt;br /&gt;and displayed in a Web browser:&lt;br /&gt;√ Page Output Caching&lt;br /&gt;Page output caching adds the response of page to cache object.Later when&lt;br /&gt;page is requested page is displayed from cache rather than creating the&lt;br /&gt;page object and displaying it.Page output caching is good if the site is&lt;br /&gt;fairly static.&lt;br /&gt;√ Page Fragment Caching&lt;br /&gt;If parts of the page are changing, you can wrap the static sections as user&lt;br /&gt;controls and cache the user controls using pagefragment caching.&lt;br /&gt;(B) How can you cache different version of same page using ASP.NET&lt;br /&gt;cache object ?&lt;br /&gt;Output cache functionality is achieved by using “OutputCache” attribute on ASP.NET&lt;br /&gt;page header.Below is the syntax&lt;br /&gt;&lt;%@ OutputCache Duration="20" Location="Server" VaryByParam="state" VaryByCustom="minorversion" VaryByHeader="Accept-Language"%&gt;&lt;br /&gt;√ VaryByParam :- Caches different version depending on input parameters send&lt;br /&gt;through HTTP POST/GET.&lt;br /&gt;√ VaryByHeader:- Caches different version depending on the contents of the&lt;br /&gt;page header.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(A) How will implement Page Fragment Caching ?&lt;br /&gt;Page fragment caching involves the caching of a fragment of the page, rather than the&lt;br /&gt;entire page. When portions of the page need to be dynamically created for each user&lt;br /&gt;request this is best method as compared to page caching.You can wrap Web Forms user&lt;br /&gt;control and cache the control so that these portions of the page don’t need to be recreated&lt;br /&gt;each time.&lt;br /&gt;(B) What are ASP.NET session and compare ASP.NET session with&lt;br /&gt;classic ASP session variables?&lt;br /&gt;ASP.NET session caches per user session state.It basically uses “HttpSessionState” class.&lt;br /&gt;Following are the limitations in classic ASP sessions :-&lt;br /&gt;√ ASP session state is dependent on IIS process very heavily.So if IIS restarts&lt;br /&gt;ASP session variables are also recycled.ASP.NET session can be independent&lt;br /&gt;of the hosting environment thus ASP.NET session can maintained even if IIS&lt;br /&gt;reboots.&lt;br /&gt;√ ASP session state has no inherent solution to work with Web Farms.ASP.NET&lt;br /&gt;session can be stored in state server and SQL SERVER which can support&lt;br /&gt;multiple server.&lt;br /&gt;√ ASP session only functions when browser supports cookies.ASP.NET session&lt;br /&gt;can be used with browser side cookies or independent of it.&lt;br /&gt;(B) Which various modes of storing ASP.NET session ?&lt;br /&gt;√ InProc:- In this mode Session state is stored in the memory space of the&lt;br /&gt;Aspnet_wp.exe process.This is the default setting.If the IIS reboots or web&lt;br /&gt;application restarts then session state is lost.&lt;br /&gt;√ StateServer:-In this mode Session state is serialized and stored in a separate&lt;br /&gt;process (Aspnet_state.exe); therefore, the state can be stored on a separate&lt;br /&gt;computer(a state server).&lt;br /&gt;√ SQL SERVER:- In this mode Session state is serialized and stored in a SQL&lt;br /&gt;Server database.&lt;br /&gt;Session state can be specified in &lt;sessionstate&gt;element of application configuration file.Using State Server and SQL SERVER session state can be shared across web farms but note this comes at speed cost as ASP.NET needs to serialize and deserialize data over network again and again.&lt;br /&gt;(B) What are the other ways you can maintain state ?&lt;br /&gt;Other than session variables you can use the following technique to store state :&lt;br /&gt;√ Hidden fields&lt;br /&gt;√ View state&lt;br /&gt;√ Hidden frames&lt;br /&gt;√ Cookies&lt;br /&gt;√ Query strings&lt;br /&gt;(B) What are benefits and Limitation of using Hidden fields ?&lt;br /&gt;Following are the benefits of using Hidden fields :-&lt;br /&gt;√ They are simple to implement.&lt;br /&gt;√ As data is cached on client side they work with Web Farms.&lt;br /&gt;√ All browsers support hidden field.&lt;br /&gt;√ No server resources are required.&lt;br /&gt;Following are limitations of Hidden field :-&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-4794809118491048645?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/4794809118491048645/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=4794809118491048645' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/4794809118491048645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/4794809118491048645'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2007/10/cache.html' title='Cache'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-8963613458018852799</id><published>2007-10-27T03:23:00.000-07:00</published><updated>2007-10-27T03:25:03.835-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# for All Interviews.'/><title type='text'>C# for All Interviews.</title><content type='html'>&lt;span style="font-family:arial;"&gt;Interview questions for C# developers&lt;br /&gt;&lt;br /&gt;Is it possible to inline assembly or IL in C# code? - No.&lt;br /&gt;&lt;br /&gt;Is it possible to have different access modifiers on the get/set methods of a property? - No. The access modifier on a property applies to both its get and set accessors. What you need to do if you want them to be different is make the property read-only (by only providing a get accessor) and create a private/internal set method that is separate from the property.&lt;br /&gt;&lt;br /&gt;Is it possible to have a static indexer in C#? - No. Static indexers are not allowed in C#.&lt;br /&gt;&lt;br /&gt;If I return out of a try/finally in C#, does the code in the finally-clause run? - Yes.&lt;br /&gt;The code in the finally always runs. If you return out of the try block, or even if you do a “goto” out of the try, the finally block always runs:&lt;br /&gt;using System;&lt;br /&gt;&lt;br /&gt;class main&lt;br /&gt;{&lt;br /&gt;public static void Main()&lt;br /&gt;{&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;Console.WriteLine(\"In Try block\");&lt;br /&gt;return;&lt;br /&gt;}&lt;br /&gt;finally&lt;br /&gt;{&lt;br /&gt;Console.WriteLine(\"In Finally block\");&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;Both “In Try block” and “In Finally block” will be displayed. Whether the return is in the try block or after the try-finally block, performance is not affected either way. The compiler treats it as if the return were outside the try block anyway. If it’s a return without an expression (as it is above), the IL emitted is identical whether the return is inside or outside of the try. If the return has an expression, there’s an extra store/load of the value of the expression (since it has to be computed within the try block).&lt;br /&gt;&lt;br /&gt;I was trying to use an “out int” parameter in one of my functions. How should I declare the variable that I am passing to it? - You should declare the variable as an int, but when you pass it in you must specify it as ‘out’, like the following: int i; foo(out i); where foo is declared as follows: [return-type] foo(out int o) { }&lt;br /&gt;&lt;br /&gt;How does one compare strings in C#?&lt;br /&gt;In the past, you had to call .ToString() on the strings when using the == or != operators to compare the strings’ values. That will still work, but the C# compiler now automatically compares the values instead of the references when the == or != operators are used on string types. If you actually do want to compare references, it can be done as follows: if ((object) str1 == (object) str2) { … } Here’s an example showing how string compares work:&lt;br /&gt;using System;&lt;br /&gt;public class StringTest&lt;br /&gt;{&lt;br /&gt;public static void Main(string[] args)&lt;br /&gt;{&lt;br /&gt;Object nullObj = null; Object realObj = new StringTest();&lt;br /&gt;int i = 10;&lt;br /&gt;Console.WriteLine(\"Null Object is [\" + nullObj + \"]\n\"&lt;br /&gt;+ \"Real Object is [\" + realObj + \"]\n\"&lt;br /&gt;+ \"i is [\" + i + \"]\n\");&lt;br /&gt;// Show string equality operators&lt;br /&gt;string str1 = \"foo\";&lt;br /&gt;string str2 = \"bar\";&lt;br /&gt;string str3 = \"bar\";&lt;br /&gt;Console.WriteLine(\"{0} == {1} ? {2}\", str1, str2, str1 == str2 );&lt;br /&gt;Console.WriteLine(\"{0} == {1} ? {2}\", str2, str3, str2 == str3 );&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;Output:&lt;br /&gt;Null Object is []&lt;br /&gt;Real Object is [StringTest]&lt;br /&gt;i is [10]&lt;br /&gt;foo == bar ? False&lt;br /&gt;bar == bar ? True&lt;br /&gt;&lt;br /&gt;How do you specify a custom attribute for the entire assembly (rather than for a class)?&lt;br /&gt;Global attributes must appear after any top-level using clauses and before the first type or namespace declarations. An example of this is as follows:&lt;br /&gt;using System;&lt;br /&gt;[assembly : MyAttributeClass] class X {}&lt;br /&gt;Note that in an IDE-created project, by convention, these attributes are placed in AssemblyInfo.cs.&lt;br /&gt;How do you mark a method obsolete? -&lt;br /&gt;[Obsolete] public int Foo() {...}&lt;br /&gt;or&lt;br /&gt;[Obsolete(\"This is a message describing why this method is obsolete\")] public int Foo() {...}&lt;br /&gt;Note: The O in Obsolete is always capitalized.&lt;br /&gt;How do you implement thread synchronization (Object.Wait, Notify,and CriticalSection) in C#? - You want the lock statement, which is the same as Monitor Enter/Exit:&lt;br /&gt;lock(obj) { // code }&lt;br /&gt;translates to&lt;br /&gt;try {&lt;br /&gt;CriticalSection.Enter(obj);&lt;br /&gt;// code&lt;br /&gt;}&lt;br /&gt;finally&lt;br /&gt;{&lt;br /&gt;CriticalSection.Exit(obj);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;How do you directly call a native function exported from a DLL?&lt;br /&gt;Here’s a quick example of the DllImport attribute in action:&lt;br /&gt;using System.Runtime.InteropServices; \&lt;br /&gt;class C&lt;br /&gt;{&lt;br /&gt;[DllImport(\"user32.dll\")]&lt;br /&gt;public static extern int MessageBoxA(int h, string m, string c, int type);&lt;br /&gt;public static int Main()&lt;br /&gt;{&lt;br /&gt;return MessageBoxA(0, \"Hello World!\", \"Caption\", 0);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;This example shows the minimum requirements for declaring a C# method that is implemented in a native DLL. The method C.MessageBoxA() is declared with the static and external modifiers, and has the DllImport attribute, which tells the compiler that the implementation comes from the user32.dll, using the default name of MessageBoxA. For more information, look at the Platform Invoke tutorial in the documentation.&lt;br /&gt;&lt;br /&gt;How do I simulate optional parameters to COM calls?&lt;br /&gt;You must use the Missing class and pass Missing.Value (in System.Reflection) for any values that have optional parameters.&lt;br /&gt;&lt;br /&gt;Are private class-level variables inherited?&lt;br /&gt;Yes, but they are not accessible, so looking at it you can honestly say that they are not inherited. But they are.&lt;br /&gt;&lt;br /&gt;Why does DllImport not work for me?&lt;br /&gt;All methods marked with the DllImport attribute must be marked as public static extern.&lt;br /&gt;&lt;br /&gt;Why does my Windows application pop up a console window every time I run it?&lt;br /&gt;Make sure that the target type set in the project properties setting is set to Windows Application, and not Console Application. If you’re using the command line, compile with /target:winexe, not /target:exe.&lt;br /&gt;&lt;br /&gt;Why do I get an error (CS1006) when trying to declare a method without specifying a return type?&lt;br /&gt;If you leave off the return type on a method declaration, the compiler thinks you are trying to declare a constructor. So if you are trying to declare a method that returns nothing, use void. The following is an example: // This results in a CS1006 error public static staticMethod (mainStatic obj) // This will work as wanted public static void staticMethod (mainStatic obj)&lt;br /&gt;&lt;br /&gt;Why do I get a syntax error when trying to declare a variable called checked?&lt;br /&gt;The word checked is a keyword in C#.&lt;br /&gt;Why do I get a security exception when I try to run my C# app?&lt;br /&gt;Some security exceptions are thrown if you are working on a network share. There are some parts of the frameworks that will not run if being run off a share (roaming profile, mapped drives, etc.). To see if this is what’s happening, just move the executable over to your local drive and see if it runs without the exceptions. One of the common exceptions thrown under these conditions is System.Security.SecurityException. To get around this, you can change your security policy for the intranet zone, code group 1.2, (the zone that running off shared folders falls into) by using the caspol.exe tool.&lt;br /&gt;&lt;br /&gt;Why do I get a CS5001: does not have an entry point defined error when compiling?&lt;br /&gt;The most common problem is that you used a lowercase ‘m’ when defining the Main method. The correct way to implement the entry point is as follows: class test { static void Main(string[] args) {} }&lt;br /&gt;&lt;br /&gt;What optimizations does the C# compiler perform when you use the /optimize+ compiler option?&lt;br /&gt;The following is a response from a developer on the C# compiler team: We get rid of unused locals (i.e., locals that are never read, even if assigned). We get rid of unreachable code. We get rid of try-catch with an empty try. We get rid of try-finally with an empty try. We get rid of try-finally with an empty finally. We optimize branches over branches: gotoif A, lab1 goto lab2: lab1: turns into: gotoif !A, lab2 lab1: We optimize branches to ret, branches to next instruction, and branches to branches.&lt;br /&gt;&lt;br /&gt;What is the syntax for calling an overloaded constructor within a constructor (this() and constructorname() does not compile)?&lt;br /&gt;The syntax for calling another constructor is as follows: class B { B(int i) { } } class C : B { C() : base(5) // call base constructor B(5) { } C(int i) : this() // call C() { } public static void Main() {} }&lt;br /&gt;What is the equivalent to regsvr32 and regsvr32 /u a file in .NET development? - Try using RegAsm.exe. Search MSDN on Assembly Registration Tool.&lt;br /&gt;&lt;br /&gt;What is the difference between a struct and a class in C#?&lt;br /&gt;From language spec: The list of similarities between classes and structs is as follows. Longstructs can implement interfaces and can have the same kinds of members as classes. Structs differ from classes in several important ways; however, structs are value types rather than reference types, and inheritance is not supported for structs. Struct values are stored on the stack or in-line. Careful programmers can sometimes enhance performance through judicious use of structs. For example, the use of a struct rather than a class for a Point can make a large difference in the number of memory allocations performed at runtime. The program below creates and initializes an array of 100 points. With Point implemented as a class, 101 separate objects are instantiated-one for the array and one each for the 100 elements.&lt;br /&gt;&lt;br /&gt;My switch statement works differently than in C++! Why?&lt;br /&gt;C# does not support an explicit fall through for case blocks. The following code is not legal and will not compile in C#:&lt;br /&gt;switch(x)&lt;br /&gt;{&lt;br /&gt;case 0: // do something&lt;br /&gt;case 1: // do something as continuation of case 0&lt;br /&gt;default: // do something in common with&lt;br /&gt;//0, 1 and everything else&lt;br /&gt;break;&lt;br /&gt;}&lt;br /&gt;To achieve the same effect in C#, the code must be modified as shown below (notice how the control flows are explicit):&lt;br /&gt;class Test&lt;br /&gt;{&lt;br /&gt;public static void Main() {&lt;br /&gt;int x = 3;&lt;br /&gt;switch(x)&lt;br /&gt;{&lt;br /&gt;case 0: // do something&lt;br /&gt;goto case 1;&lt;br /&gt;case 1: // do something in common with 0&lt;br /&gt;goto default;&lt;br /&gt;default: // do something in common with 0, 1, and anything else&lt;br /&gt;break;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;C# does support fall through. The following code is valid:&lt;br /&gt;&lt;br /&gt;switch (x)&lt;br /&gt;{&lt;br /&gt;case 0: // do something&lt;br /&gt;case 1: // do something as continuation of case 0&lt;br /&gt;default: // do something in common with&lt;br /&gt;//0, 1 and everything else&lt;br /&gt;{&lt;br /&gt;break;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;What C# does not allow is falling out of one code block into another like this:&lt;br /&gt;// will not compile because each code block needs&lt;br /&gt;// a break statement.&lt;br /&gt;switch (x)&lt;br /&gt;{&lt;br /&gt;case 0:&lt;br /&gt;{&lt;br /&gt;Console.WriteLine(”0″);&lt;br /&gt;}&lt;br /&gt;case 1:&lt;br /&gt;{&lt;br /&gt;Console.WriteLine(”0″);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;switch (x)&lt;br /&gt;{&lt;br /&gt;case 0: // do something&lt;br /&gt;case 1: // do something as continuation of case 0&lt;br /&gt;default: // do something in common with&lt;br /&gt;//0, 1 and everything else&lt;br /&gt;{&lt;br /&gt;break;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;C# does not support explicit fall through for the Case ….you can use goto:Case/goto:default to make a fall through&lt;br /&gt;ex&lt;br /&gt;swich(x)&lt;br /&gt;case 1:&lt;br /&gt;//do spmething ;&lt;br /&gt;break;&lt;br /&gt;case 2: //do somethin&lt;br /&gt;goto case1;&lt;br /&gt;case 3 : //do spmething ;&lt;br /&gt;break;&lt;br /&gt;case default : //do spmething ;&lt;br /&gt;break;&lt;br /&gt;&lt;br /&gt;Fall through is achieved like this. Do not put any code except in the case 2 to achieve the fall through.&lt;br /&gt;switch(i)&lt;br /&gt;{&lt;br /&gt;case 0:&lt;br /&gt;case 1:&lt;br /&gt;case 2:&lt;br /&gt;//Some code here&lt;br /&gt;break;&lt;br /&gt;case 5:&lt;br /&gt;//some code here&lt;br /&gt;break;&lt;br /&gt;default:&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Is there regular expression (regex) support available to C# developers? - Yes. The .NET class libraries provide support for regular expressions.&lt;br /&gt;Look at the System.Text.RegularExpressions namespace.&lt;br /&gt;Is there any sample C# code for simple threading? - Yes:&lt;br /&gt;using System;&lt;br /&gt;using System.Threading;&lt;br /&gt;class ThreadTest&lt;br /&gt;{&lt;br /&gt;public void runme()&lt;br /&gt;{&lt;br /&gt;Console.WriteLine(\"Runme Called\");&lt;br /&gt;}&lt;br /&gt;public static void Main(String[] args)&lt;br /&gt;{&lt;br /&gt;ThreadTest b = new ThreadTest();&lt;br /&gt;Thread t = new Thread(new ThreadStart(b.runme));&lt;br /&gt;t.Start();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;Is there an equivalent of exit() for quitting a C# .NET application? –&lt;br /&gt;Yes, you can use System.Environment.Exit(int exitCode) to exit the application or Application.Exit() if it’s a Windows Forms app.&lt;br /&gt;&lt;br /&gt;Is there a way to force garbage collection?&lt;br /&gt;Yes. Set all references to null and then call System.GC.Collect(). If you need to have some objects destructed, and System.GC.Collect() doesn’t seem to be doing it for you, you can force finalizers to be run by setting all the references to the object to null and then calling System.GC.RunFinalizers().&lt;br /&gt;&lt;br /&gt;Is there a way of specifying which block or loop to break out of when working with nested loops?&lt;br /&gt;he easiest way is to use goto:&lt;br /&gt;using System;&lt;br /&gt;class BreakExample&lt;br /&gt;{&lt;br /&gt;public static void Main(String[] args) {&lt;br /&gt;for(int i=0; i&lt;3; j="0" j ="="" s =" #”n" s =" “’n" s =" @”n" s =" “n" a ="="" a =" new" instance ="="" instance =" new" instance =" new" unrestricted="true)]" cppname =" new" cppname =" new" privatepath="”c:\mylibs;"&gt;&lt;br /&gt;should do the trick. Or you can add additional search paths in the Properties box of the deployed application.&lt;br /&gt;&lt;br /&gt;How can you debug failed assembly binds?&lt;br /&gt;Use the Assembly Binding Log Viewer (fuslogvw.exe) to find out the paths searched.&lt;br /&gt;Where are shared assemblies stored? Global assembly cache.&lt;br /&gt;&lt;br /&gt;How can you create a strong name for a .NET assembly?&lt;br /&gt;With the help of Strong Name tool (sn.exe).&lt;br /&gt;&lt;br /&gt;Where’s global assembly cache located on the system?&lt;br /&gt;Usually C:\winnt\assembly or C:\windows\assembly.&lt;br /&gt;&lt;br /&gt;Can you have two files with the same file name in GAC?&lt;br /&gt;Yes, remember that GAC is a very special folder, and while normally you would not be able to place two files with the same name into a Windows folder, GAC differentiates by version number as well, so it’s possible for MyApp.dll and MyApp.dll to co-exist in GAC if the first one is version 1.0.0.0 and the second one is 1.1.0.0.&lt;br /&gt;So let’s say I have an application that uses MyApp.dll assembly, version 1.0.0.0. There is a security bug in that assembly, and I publish the patch, issuing it under name MyApp.dll 1.1.0.0. How do I tell the client applications that are already installed to start using this new MyApp.dll? Use publisher policy. To configure a publisher policy, use the publisher policy configuration file, which uses a format similar app .config file. But unlike the app .config file, a publisher policy file needs to be compiled into an assembly and placed in the GAC.&lt;br /&gt;&lt;br /&gt;What is delay signing?&lt;br /&gt;Delay signing allows you to place a shared assembly in the GAC by signing the assembly with just the public key. This allows the assembly to be signed with the private key at a later stage, when the development process is complete and the component or assembly is ready to be deployed. This process enables developers to work with shared assemblies as if they were strongly named, and it secures the private key of the signature from being accessed at different stages of development.&lt;br /&gt;&lt;br /&gt;ASP.NET interview questions&lt;br /&gt;&lt;br /&gt;Whats an assembly?&lt;br /&gt;Assemblies are the building blocks of .NET Framework applications; they form the fundamental unit of deployment, version control, reuse, activation scoping, and security permissions. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. An assembly provides the common language runtime with the information it needs to be aware of type implementations. To the runtime, a type does not exist outside the context of an assembly.&lt;br /&gt;&lt;br /&gt;Describe the difference between inline and code behind - which is best in a loosely coupled solution?&lt;br /&gt;ASP.NET supports two modes of page development: Page logic code that is written inside&lt;script runat="server"&gt; blocks within an .aspx file and dynamically compiled the first time the page is requested on the server. Page logic code that is written within an external class that is compiled prior to deployment on a server and linked "behind" the .aspx file at run time.&lt;br /&gt;Explain what a diffgram is, and a good use for one?&lt;br /&gt;A DiffGram is an XML format that is used to identify current and original versions of data elements. The DataSet uses the DiffGram format to load and persist its contents, and to serialize its contents for transport across a network connection. When a DataSet is written as a DiffGram, it populates the DiffGram with all the necessary information to accurately recreate the contents, though not the schema, of the DataSet, including column values from both the Original and Current row versions, row error information, and row order.&lt;br /&gt;Where would you use an iHTTPModule, and what are the limitations of anyapproach you might take in implementing one?&lt;br /&gt;One of ASP.NET’s most useful features is the extensibility of the HTTP pipeline, the path that data takes between client and server. You can use them to extend your ASP.NET applications by adding pre- and post-processing to each HTTP request coming into your application. For example, if you wanted custom authentication facilities for your application, the best technique would be to intercept the request when it comes in and process the request in a custom HTTP module.&lt;br /&gt;&lt;br /&gt;What are the disadvantages of viewstate/what are the benefits?&lt;br /&gt;Disadvantage of viewstate is that additional data is sent to the browser. The benefits are that you do not have to manually manage refreshing the page fields after a submit, (when re-displaying the same page).&lt;br /&gt;Automatic view-state management is a feature of server controls that enables them to repopulate their property values on a round trip (without you having to write any code). This feature does impact performance, however, since a server control’s view state is passed to and from the server in a hidden form field. You should be aware of when view state helps you and when it hinders your page’s performance.&lt;br /&gt;What is State Management in .Net and how many ways are there to maintain a state in .Net? What is view state?&lt;br /&gt;Web pages are recreated each time the page is posted to the server. In traditional Web programming, this would ordinarily mean that all information associated with the page and the controls on the page would be lost with each round trip.&lt;br /&gt;&lt;br /&gt;To overcome this inherent limitation of traditional Web programming, the ASP.NET page framework includes various options to help you preserve changes — that is, for managing state. The page framework includes a facility called view state that automatically preserves property values of the page and all the controls on it between round trips.&lt;br /&gt;&lt;br /&gt;However, you will probably also have application-specific values that you want to preserve. To do so, you can use one of the state management options.&lt;br /&gt;&lt;br /&gt;Client-Based State Management Options:&lt;br /&gt;View State&lt;br /&gt;Hidden Form Fields&lt;br /&gt;Cookies&lt;br /&gt;Query Strings&lt;br /&gt;Server-Based State Management Options&lt;br /&gt;Application State&lt;br /&gt;Session State&lt;br /&gt;Database Support&lt;br /&gt;&lt;br /&gt;Describe session handling in a webfarm, how does it work and what are the limits?&lt;br /&gt;How would you get ASP.NET running in Apache web servers - why would you even do this?&lt;br /&gt;Whats MSIL, and why should my developers need an appreciation of it if at all?&lt;br /&gt;In what order do the events of an ASPX page execute. As a developer is it important to undertsand these events?&lt;br /&gt;Every Page object (which your .aspx page is) has nine events, most of which you will not have to worry about in your day to day dealings with ASP.NET. The three that you will deal with the most are: Page_Init, Page_Load, Page_PreRender.&lt;br /&gt;&lt;br /&gt;Which method do you invoke on the DataAdapter control to load your generated dataset with data?&lt;br /&gt;System.Data.Common.DataAdapter.Fill(System.Data.DataSet);&lt;br /&gt;If my DataAdapter is sqlDataAdapter and my DataSet is dsUsers then it is called this way:&lt;br /&gt;sqlDataAdapter.Fill(dsUsers);&lt;br /&gt;ata in the Repeater control?&lt;br /&gt;&lt;br /&gt;Which template must you provide, in order to display data in a Repeater control? ItemTemplate&lt;br /&gt;How can you provide an alternating color scheme in a Repeater control?&lt;br /&gt;AlternatingItemTemplate Like the ItemTemplate element, but rendered for every other&lt;br /&gt;row (alternating items) in the Repeater control. You can specify a different appearance&lt;br /&gt;for the AlternatingItemTemplate element by setting its style properties.&lt;br /&gt;&lt;br /&gt;What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control?&lt;br /&gt;You must set the DataMember property which Gets or sets the specific table in the DataSource to bind to the control and the DataBind method to bind data from a source to a server control. This method is commonly used after retrieving a data set through a database query.&lt;br /&gt;&lt;br /&gt;What base class do all Web Forms inherit from?&lt;br /&gt; System.Web.UI.Page&lt;br /&gt;What method do you use to explicitly kill a user’s session?&lt;br /&gt;The Abandon method destroys all the objects stored in a Session object and releases their resources.&lt;br /&gt;If you do not call the Abandon method explicitly, the server destroys these objects when the session times out.&lt;br /&gt;Syntax: Session.Abandon&lt;br /&gt;&lt;br /&gt;How do you turn off cookies for one page in your site?&lt;br /&gt;Use the Cookie.Discard Property which Gets or sets the discard flag set by the server. When true, this property instructs the client application not to save the Cookie on the user’s hard disk when a session ends.&lt;br /&gt;&lt;br /&gt;Which two properties are on every validation control?&lt;br /&gt;ControlToValidate &amp; ErrorMessage properties&lt;br /&gt;&lt;br /&gt;What tags do you need to add within the asp:datagrid tags to bind columns manually?&lt;br /&gt;Columns tag and either asp:BoundColumn or Asp:TemplateColumn tags (with appropriate attributes of course)&lt;br /&gt;&lt;br /&gt;How do you create a permanent cookie?&lt;br /&gt; Setting the Expires property to MinValue means that the Cookie never expires.&lt;br /&gt;&lt;br /&gt;What tag do you use to add a hyperlink column to the DataGrid?&lt;br /&gt;Depends on who’s definition of hyperlink your using. Manually a std html anchor tag (a) will work or you can use the micro-magical asp:HyperLink tag&lt;br /&gt;&lt;br /&gt;What is the standard you use to wrap up a call to a Web service?&lt;br /&gt;SOAP Envelope&lt;br /&gt;&lt;br /&gt;Which method do you use to redirect the user to another page without performing a round trip to the client?&lt;br /&gt; Server.transfer()&lt;br /&gt;What is the transport protocol you use to call a Web service?&lt;br /&gt;SOAP. Transport Protocols: It is essential for the acceptance of Web Services that they are based on established Internet infrastructure. This in fact imposes the usage of of the HTTP, SMTP and FTP protocols based on the TCP/IP family of transports. Messaging Protocol: The format of messages exchanged between Web Services clients and Web Services should be vendor neutral and should not carry details about the technology used to implement the service. Also, the message format should allow for extensions and different bindings to specific transport protocols. SOAP and ebXML Transport are specifications which fulfill these requirements. We expect that the W3C XML Protocol Working Group defines a successor standard.&lt;br /&gt;&lt;br /&gt;SOAP is not the transport protocol. SOAP is the data encapsulation protocol that is used but the transport protocol is fairly unlimited. Generally HTTP is the most common transport protocol used though you could conceivanly use things like SMTP or any others. SOAP is not dependant on any single transport protocol or OS, it is a syntactical and logical definition, not a transport protocol.&lt;br /&gt;True or False: A Web service can only be written in .NET. False.&lt;br /&gt;&lt;br /&gt;What does WSDL stand for?&lt;br /&gt;Web Services Description Language&lt;br /&gt;&lt;br /&gt;What property do you have to set to tell the grid which page to go to when using the Pager object?&lt;br /&gt;&lt;br /&gt;Where on the Internet would you look for Web services?&lt;br /&gt;UDDI repositaries like uddi.microsoft.com, IBM UDDI node, UDDI Registries in Google Directory, enthusiast sites like XMethods.net.&lt;br /&gt;&lt;br /&gt;What tags do you need to add within the asp:datagrid tags to bind columns manually?&lt;br /&gt;Column tag and an ASP:databound tag.&lt;br /&gt;&lt;br /&gt;Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box?&lt;br /&gt;&lt;br /&gt;How is a property designated as read-only? In VB.NET:&lt;br /&gt;Public ReadOnly Property PropertyName As ReturnType&lt;br /&gt; Get    ‘Your Property Implementation goes in here&lt;br /&gt; End Get&lt;br /&gt;End Property&lt;br /&gt;in C#&lt;br /&gt;public returntype PropertyName&lt;br /&gt;{&lt;br /&gt; get{&lt;br /&gt;  //property implementation goes here&lt;br /&gt; }&lt;br /&gt; // Do not write the set implementation&lt;br /&gt;}&lt;br /&gt;Which control would you use if you needed to make sure the values in two different controls matched?&lt;br /&gt;Use the CompareValidator control to compare the values of 2 different controls.&lt;br /&gt;True or False: To test a Web service you must create a windows application or Web application to consume this service? False.&lt;br /&gt;&lt;br /&gt;How many classes can a single .NET DLL contain?&lt;br /&gt;Unlimited.&lt;br /&gt;Describe session handling in a webfarm, how does it work and what are the limits?&lt;br /&gt;Set the sessionState mode in the web.config file to “StateServer”.&lt;br /&gt;StateServer mode uses an out-of-process Windows NT Server to store state information.&lt;br /&gt;It solves the session state loss problem in InProc mode.&lt;br /&gt;Allows a webfarm to store session on a central server.&lt;br /&gt;It provides a Single point of failure at the State Server.&lt;br /&gt;Follow these simple steps:&lt;br /&gt;- In a web farm, make sure you have the same in all your web servers.&lt;br /&gt;- Also, make sure your objects are serializable.&lt;br /&gt;- For session state to be maintained across different web servers in the web farm, the Application Path of the website in the IIS Metabase should be identical in all the web servers in the web farm.&lt;br /&gt;&lt;br /&gt;Should validation (did the user enter a real date) occur server-side or client-side? Why?&lt;br /&gt;Client-side validation because there is no need to request a server side date when you could obtain a date from the client machine. so many other reasons, see answer #1&lt;br /&gt;I heavily disagree. Data validation on client-side is always optional. The only time you should be validating data on the client-side is to make the process smoother for the end-user. Any data that you actually plan on using anywhere should be validated on the server-side and should be considered to have the potential to fail. Without this you are opening yourself to people probing your application for error output or attempting injection or overflow errors.&lt;br /&gt;&lt;br /&gt;What tags do you need to add within the asp:datagrid tags to bind columns manually?&lt;br /&gt;tag and either or tags (with appropriate attributes of course)&lt;br /&gt;&lt;br /&gt;What tag do you use to add a hyperlink column to the DataGrid?&lt;br /&gt;Depends on who’s definition of hyperlink your using. Manually a std html anchor tag (a) will work or you can use the micro-magical tag&lt;br /&gt;&lt;br /&gt;What is the standard you use to wrap up a call to a Web service?&lt;br /&gt;Several possible answers depending on your interpretation of the quesiton, but I think you were aiming for SOAP (with the caveat that this is MS’s version of SOAP)&lt;br /&gt;&lt;br /&gt;What is the transport protocol you use to call a Web service?&lt;br /&gt;SOAP is not the transport protocol. SOAP is the data encapsulation protocol that is used but the transport protocol is fairly unlimited. Generally HTTP is the most common transport protocol used though you could conceivanly use things like SMTP or any others. SOAP is not dependant on any single transport protocol or OS, it is a syntactical and logical definition, not a transport protocol.&lt;br /&gt;&lt;br /&gt;.NET and COM interop questions&lt;br /&gt;&lt;br /&gt;Describe the advantages of writing a managed code application instead of unmanaged one. What’s involved in certain piece of code being managed?&lt;br /&gt;The advantages include automatic garbage collection, memory management, support for versioning and security. These advantages are provided through .NET FCL and CLR, while with the unmanaged code similar capabilities had to be implemented through third-party libraries or as a part of the application itself.&lt;br /&gt;Are COM objects managed or unmanaged?&lt;br /&gt;Since COM objects were written before .NET, apparently they are unmanaged.&lt;br /&gt;&lt;br /&gt;So can a COM object talk to a .NET object?&lt;br /&gt;Yes, through Runtime Callable Wrapper (RCW) or PInvoke.&lt;br /&gt;&lt;br /&gt;How do you generate an RCW from a COM object?&lt;br /&gt;Use the Type Library Import utility shipped with SDK. tlbimp COMobject.dll /out:.NETobject.dll or reference the COM library from Visual Studio in your project.&lt;br /&gt;&lt;br /&gt;I can’t import the COM object that I have on my machine. Did you write that object? You can only import your own objects. If you need to use a COM component from another developer, you should obtain a Primary Interop Assembly (PIA) from whoever authored the original object.&lt;br /&gt;&lt;br /&gt;How do you call unmanaged methods from your .NET code through PInvoke?&lt;br /&gt;Supply a DllImport attribute. Declare the methods in your .NET code as static extern. Do not implement the methods as they are implemented in your unmanaged code, you’re just providing declarations for method signatures.&lt;br /&gt;&lt;br /&gt;Can you retrieve complex data types like structs from the PInvoke calls?&lt;br /&gt;Yes, just make sure you re-declare that struct, so that managed code knows what to do with it.&lt;br /&gt;&lt;br /&gt;I want to expose my .NET objects to COM objects. Is that possible?&lt;br /&gt;Yes, but few things should be considered first. Classes should implement interfaces explicitly. Managed types must be public. Methods, properties, fields, and events that are exposed to COM must be public. Types must have a public default constructor with no arguments to be activated from COM. Types cannot be abstract.&lt;br /&gt;&lt;br /&gt;Can you inherit a COM class in a .NET application?&lt;br /&gt;The .NET Framework extends the COM model for reusability by adding implementation inheritance. Managed types can derive directly or indirectly from a COM coclass; more specifically, they can derive from the runtime callable wrapper generated by the runtime. The derived type can expose all the method and properties of the COM object as well as methods and properties implemented in managed code. The resulting object is partly implemented in managed code and partly implemented in unmanaged code.&lt;br /&gt;&lt;br /&gt;Suppose I call a COM object from a .NET applicaiton, but COM object throws an error. What happens on the .NET end? COM methods report errors by returning HRESULTs; .NET methods report them by throwing exceptions. The runtime handles the transition between the two. Each exception class in the .NET Framework maps to an HRESULT.&lt;br /&gt;&lt;br /&gt;COM/COM+ services and components in .NET&lt;br /&gt;&lt;br /&gt;Explain transaction atomicity. We must ensure that the entire transaction is either committed or rolled back.&lt;br /&gt;Explain consistency. We must ensure that the system is always left at the correct state in case of the failure or success of a transaction.&lt;br /&gt;Explain integrity. Ensure data integrity by protecting concurrent transactions from seeing or being adversely affected by each other’s partial and uncommitted results.&lt;br /&gt;Explain durability. Make sure that the system can return to its original state in case of a failure.&lt;br /&gt;Explain object pooling. With object pooling, COM+ creates objects and keeps them in a pool, where they are ready to be used when the next client makes a request. This improves the performance of a server application that hosts the objects that are frequently used but are expensive to create.&lt;br /&gt;&lt;br /&gt;Explain JIT activation. The objective of JIT activation is to minimize the amount of time for which an object lives and consumes resources on the server. With JIT activation, the client can hold a reference to an object on the server for a long time, but the server creates the object only when the client calls a method on the object. After the method call is completed, the object is freed and its memory is reclaimed. JIT activation enables applications to scale up as the number of users increases.&lt;br /&gt;&lt;br /&gt;Explain role-based security.&lt;br /&gt;In the role-based security model, access to parts of an application are granted or denied based on the role to which the callers belong. A role defines which members of a Windows domain are allowed to work with what components, methods, or interfaces.&lt;br /&gt;&lt;br /&gt;Explain queued components.&lt;br /&gt; The queued components service enables you to create components that can execute asynchronously or in disconnected mode. Queued components ensure availability of a system even when one or more sub-systems are temporarily unavailable. Consider a scenario where salespeople take their laptop computers to the field and enter orders on the go. Because they are in disconnected mode, these orders can be queued up in a message queue. When salespeople connect back to the network, the orders can be retrieved from the message queue and processed by the order processing components on the server.&lt;br /&gt;&lt;br /&gt;Explain loosely coupled events.&lt;br /&gt;Loosely coupled events enable an object (publisher) to publish an event. Other objects (subscribers) can subscribe to an event. COM+ does not require publishers or subscribers to know about each other. Therefore, loosely coupled events greatly simplify the programming model for distributed applications.&lt;br /&gt;&lt;br /&gt;Define scalability. The application meets its requirement for efficiency even if the number of users increases.&lt;br /&gt;Define reliability. The application generates correct and consistent information all the time.&lt;br /&gt;Define availability. Users can depend on using the application when needed.&lt;br /&gt;Define security. The application is never disrupted or compromised by the efforts of malicious or ignorant users.&lt;br /&gt;Define manageability. Deployment and maintenance of the application is as efficient and painless as possible.&lt;br /&gt;&lt;br /&gt;Which namespace do the classes, allowing you to support COM functionality, are located? System.EnterpriseServices&lt;br /&gt;How do you make a NET component talk to a COM component?&lt;br /&gt;To enable the communication between COM and .NET components, the .NET Framework generates a COM Callable Wrapper (CCW). The CCW enables communication between the calling COM code and the managed code. It also handles conversion between the data types, as well as other messages between the COM types and the .NET types.&lt;br /&gt;&lt;br /&gt;.NET Windows services development questions&lt;br /&gt;&lt;br /&gt;Explain Windows service.&lt;br /&gt; You often need programs that run continuously in the background. For example, an email server is expected to listen continuously on a network port for incoming email messages, a print spooler is expected to listen continuously to print requests, and so on.&lt;br /&gt;&lt;br /&gt;What’s the Unix name for a Windows service equivalent?&lt;br /&gt;Daemon.&lt;br /&gt;&lt;br /&gt;So basically a Windows service application is just another executable?&lt;br /&gt;What’s different about a Windows service as compared to a regular application?&lt;br /&gt;Windows services must support the interface of the Service Control Manager (SCM). A Windows service must be installed in the Windows service database before it can be launched.&lt;br /&gt;&lt;br /&gt;How is development of a Windows service different from a Windows Forms application?&lt;br /&gt;A Windows service typically does not have a user interface, it supports a set of commands and can have a GUI that’s built later to allow for easier access to those commands.&lt;br /&gt;&lt;br /&gt;How do you give a Windows service specific permissions?&lt;br /&gt;Windows service always runs under someone’s identity. Can be System or Administrator account, but if you want to restrict the behavior of a Windows service, the best bet is to create a new user account, assign and deny necessary privileges to that account, and then associate the Windows service with that new account.&lt;br /&gt;&lt;br /&gt;Can you share processes between Windows services? Yes.&lt;br /&gt;Where’s Windows service database located? HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services&lt;br /&gt;&lt;br /&gt;What does SCM do?&lt;br /&gt; SCM is Windows Service Control Manager. Its responsibilities are as follows:&lt;br /&gt;Accepts requests to install and uninstall Windows services from the Windows service database.&lt;br /&gt;To start Windows services either on system startup or requested by the user.&lt;br /&gt;To enumerate installed Windows services.&lt;br /&gt;To maintain status information for currently running Windows services.&lt;br /&gt;To transmits control messages (such as Start, Stop, Pause, and Continue) to available Windows services.&lt;br /&gt;To lock/unlock Windows service database.&lt;br /&gt;&lt;br /&gt;vice on a box? Use Windows Service Installer, do not go through Add/Remove Programs or MSI file, as you would normally go with applications.&lt;br /&gt;When developing a Windows service for .NET, which namespace do you typically look in for required classes?&lt;br /&gt;System.ServiceProcess. The classes are ServiceBase, ServiceProcessInstaller, ServiceInstaller and ServiceController.&lt;br /&gt;How do you handle Start, Pause, Continue and Stop calls from SCM within your application? By implementing OnStart, OnPause, OnContinue and OnStop methods.&lt;br /&gt;&lt;br /&gt;Describe the start-up process for a Windows service. Main() is executed to create an instance of a Web service, then Run() to launch it, then OnStart() from within the instance is executed.&lt;br /&gt;&lt;br /&gt;I want to write a Windows service that cannot be paused, only started and stopped. How do I accomplish that?&lt;br /&gt;Set CanPauseAndContinue attribute to false.&lt;br /&gt;&lt;br /&gt;What application do you use to install a Windows service? installutil.exe&lt;br /&gt;&lt;br /&gt;I am trying to install my Windows service under NetworkService account, but keep getting an error. The LocalService and NetworkService accounts are only available on Windows XP and Windows Server 2003. These accounts do not exist on Windows 2000 or older operating systems.&lt;br /&gt;&lt;br /&gt;How can you see which services are running on a Windows box?&lt;br /&gt;Admin Tools -&gt; Computer Management -&gt; Services and Application -&gt; Services. You can also open the Computer Management tool by right-clicking on My Computer and selecting Manage from the popup menu.&lt;br /&gt;&lt;br /&gt;How do you start, pause, continue or stop a Windows service off the command line?&lt;br /&gt;net start ServiceName, net pause ServiceName and so on. Also sc.exe provides a command-line interface for Windows services. View the OS documentation or proper book chapters on using sc.exe.&lt;br /&gt;Can I write an MMC snap-in for my Windows service?&lt;br /&gt;Yes, use classes from the System.Management.Instrumentation namespace. Also see Managing Applications Using WMI from .NET Framework SDK.&lt;br /&gt;&lt;br /&gt;Microsoft .NET Framework&lt;br /&gt;&lt;br /&gt;What is .NET Framework?&lt;br /&gt;Is .NET a runtime service or a development platform? Answer It’s bothand actually a lot more. Microsoft .NET is a company-wide initiative. It includes a new way of delivering software and services to businesses and consumers. A part of Microsoft.NET is the .NET Frameworks. The frameworks is the first part of the MS.NET initiate to ship and it was given out to attendees at the PDC in July. The .NET frameworks consists of two parts: the .NET common language runtime and the .NET class library. These two components are packaged together into the .NET Frameworks SDK which will be available for free download from Microsoft’s MSDN web site later this month. In addition, the SDK also includes command-line compilers for C#, C++, JScript, and VB. You use these compilers to build applications and components. These components require the runtime to execute so this is a development platform. When Visual Studio.NET ships, it will include the .NET SDK and a GUI editor, wizards, tools, and a slew of other things. However, Visual Studio.NET is NOT required to build .NET applications.&lt;br /&gt;&lt;br /&gt;New features of Framework 1.1 ?&lt;br /&gt;What is CLR? How it will work?&lt;br /&gt;What is MSIL, IL, CTS?&lt;br /&gt;What is JIT and how is works&lt;br /&gt;&lt;br /&gt;What is strong name?&lt;br /&gt;A name that consists of an assembly’s identity—its simple text name, version number, and culture information (if provided)—strengthened by a public key and a digital signature generated over the assembly.&lt;br /&gt;&lt;br /&gt;What is portable executable&lt;br /&gt;(PE) The file format defining the structure that all executable files (EXE) and Dynamic Link Libraries (DLL) must use to allow them to be loaded and executed by Windows. PE is derived from the Microsoft Common Object File Format (COFF). The EXE and DLL files created using the .NET Framework obey the PE/COFF formats and also add additional header and data sections to the files that are only used by the CLR. The specification for the PE/COFF file formats is available&lt;br /&gt;&lt;br /&gt;Which is the base class for .net Class library?&lt;br /&gt;system.object&lt;br /&gt;&lt;br /&gt;What is Event?&lt;br /&gt;Delegate, clear syntax for writing a event delegate// keyword_delegate.cs // delegate declaration delegate void MyDelegate(int i);&lt;br /&gt;class Program&lt;br /&gt;{&lt;br /&gt; public static void Main()&lt;br /&gt; {&lt;br /&gt;  TakesADelegate(new MyDelegate(DelegateFunction));&lt;br /&gt; }&lt;br /&gt; public static void TakesADelegate(MyDelegate SomeFunction)&lt;br /&gt; {&lt;br /&gt;  SomeFunction(21);&lt;br /&gt; }&lt;br /&gt; public static void DelegateFunction(int i)&lt;br /&gt; {&lt;br /&gt;  System.Console.WriteLine(\"Called by delegate withnumber: {0}.\", i);&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;ment DataGrid in .NET? How would you make a combo-box appear in one column of a DataGrid?&lt;br /&gt;&lt;br /&gt;What are the ways to show data grid inside a data grid for a master details type of tables?&lt;br /&gt;&lt;br /&gt;If we write any code for DataGrid methods, what is the access specifier used for that methods in the code behind file and why?&lt;br /&gt;&lt;br /&gt;What is Application Domain?&lt;br /&gt;Application domains provide a unit of isolation for the common language runtime. They are created and run inside a process. Application domains are usually created by a runtime host, which is an application responsible for loading the runtime into a process and executing user code within an application domain. The runtime host creates a process and a default application domain, and runs managed code inside it. Runtime hosts include ASP.NET, Microsoft Internet Explorer, and the Windows shell.&lt;br /&gt;&lt;br /&gt;What is serialization in .NET? What are the ways to control serialization?&lt;br /&gt;Serialization can be defined as the process of storing the state of an object to a storage medium. During this process, the public and private fields of the object and the name of the class, including the assembly containing the class, are converted to a stream of bytes, which is then written to a data stream. When the object is subsequently deserialized, an exact clone of the original object is created.&lt;br /&gt;Binary serialization preserves type fidelity, which is useful for preserving the state of an object between different invocations of an application. For example, you can share an object between different applications by serializing it to the clipboard. You can serialize an object to a stream, disk, memory, over the network, and so forth. Remoting uses serialization to pass objects “by value” from one computer or application domain to another.&lt;br /&gt;&lt;br /&gt;XML serialization serializes only public properties and fields and does not preserve type fidelity. This is useful when you want to provide or consume data without restricting the application that uses the data. Because XML is an open standard, it is an attractive choice for sharing data across the Web. SOAP is an open standard, which makes it an attractive choice.&lt;br /&gt;&lt;br /&gt;What are the different authentication modes in the .NET environment?&lt;br /&gt; &lt;authentication mode="”WindowsFormsPassportNone”"&gt;&lt;br /&gt; &lt;forms name="”name”" loginurl="”url”" protection="”AllNoneEncryptionValidation”" timeout="”30″" path="”/”"&gt; requireSSL=“truefalse”slidingExpiration=“truefalse”&gt;&lt;  credentials passwordFormat=”ClearSHA1MD5″&gt;&lt;   user name=”username” password=”password”/&gt;&lt;br /&gt; &lt;/credentials&gt; &lt;/forms&gt;&lt;br /&gt; &lt;passport redirecturl="\"&gt;&lt;br /&gt; &lt;/authentication&gt;&lt;br /&gt;/li&gt;&lt;br /&gt;&lt;br /&gt;What is the use of trace utility&lt;br /&gt;&lt;br /&gt;What is different between User Control and Web Control and Custom Control?&lt;br /&gt;&lt;br /&gt;What is exception handling?&lt;br /&gt;When an exception occurs, the system searches for the nearest catch clause that can handle the exception, as determined by the run-time type of the exception. First, the current method is searched for a lexically enclosing try statement, and the associated catch clauses of the try statement are considered in order. If that fails, the method that called the current method is searched for a lexically enclosing try statement that encloses the point of the call to the current method. This search continues until a catch clause is found that can handle the current exception, by naming an exception class that is of the same class, or a base class, of the run-time type of the exception being thrown. A catch clause that doesn’t name an exception class can handle any exception. Once a matching catch clause is found, the system prepares to transfer control to the first statement of the catch clause. Before execution of the catch clause begins, the system first executes, in order, any finally clauses that were associated withtry statements more nested that than the one that caught the exception. Exceptions that occur during destructor execution are worthspecial mention. If an exception occurs during destructor execution, and that exception is not caught, then the execution of that destructor is terminated and the destructor of the base class (if any) is called. If there is no base class (as in the case of the object type) or if there is no base class destructor, then the exception is discarded.&lt;br /&gt;&lt;br /&gt;What is Assembly?&lt;br /&gt;Assemblies are the building blocks of .NET Framework applications; they form the fundamental unit of deployment, version control, reuse, activation scoping, and security permissions. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. An assembly provides the common language runtime withthe information it needs to be aware of type implementations. To the runtime, a type does not exist outside the context of an assembly. Assemblies are a fundamental part of programming withthe .NET Framework. An assembly performs the following functions:&lt;br /&gt;It contains code that the common language runtime executes. Microsoft intermediate language (MSIL) code in a portable executable (PE) file will not be executed if it does not have an associated assembly manifest. Note that each assembly can have only one entry point (that is,DllMain,WinMain, orMain).&lt;br /&gt;&lt;br /&gt;It forms a security boundary. An assembly is the unit at which permissions are requested and granted.&lt;br /&gt;It forms a type boundary. Every type’s identity includes the name of the assembly in which it resides. A type called MyType loaded in the scope of one assembly is not the same as a type called MyType loaded in the scope of another assembly.&lt;br /&gt;&lt;br /&gt;It forms a reference scope boundary. The assembly’s manifest contains assembly metadata that is used for resolving types and satisfying resource requests. It specifies the types and resources that are exposed outside the assembly. The manifest also enumerates other assemblies on which it depends.&lt;br /&gt;&lt;br /&gt;It forms a version boundary. The assembly is the smallest versionable unit in the common language runtime; all types and resources in the same assembly are versioned as a unit. The assembly’s manifest describes the version dependencies you specify for any dependent assemblies.&lt;br /&gt;It forms a deployment unit. When an application starts, only the assemblies that the application initially calls must be present. Other assemblies, such as localization resources or assemblies containing utility classes, can be retrieved on demand. This allows applications to be kept simple and thin when first downloaded.&lt;br /&gt;&lt;br /&gt;It is the unit at which side-by-side execution is supported. Assemblies can be static or dynamic. Static assemblies can include .NET Framework types (interfaces and classes), as well as resources for the assembly (bitmaps, JPEG files, resource files, and so on). Static assemblies are stored on disk in PE files. You can also use the .NET Framework to create dynamic assemblies, which are run directly from memory and are not saved to disk before execution. You can save dynamic assemblies to disk after they have executed.&lt;br /&gt;There are several ways to create assemblies. You can use development tools, such as Visual Studio .NET, that you have used in the past to create .dll or .exe files. You can use tools provided in the .NET Framework SDK to create assemblies withmodules created in other development environments. You can also use common language runtime APIs, such as Reflection.Emit, to create dynamic assemblies.&lt;br /&gt;s of assemblies? Private, Public/Shared, Satellite&lt;br /&gt;&lt;br /&gt;What are Satellite Assemblies? How you will create this? How will you get the different language strings?&lt;br /&gt;Satellite assemblies are often used to deploy language-specific resources for an application. These language-specific assemblies work in side-by-side execution because the application has a separate product ID for each language and installs satellite assemblies in a language-specific subdirectory for each language. When uninstalling, the application removes only the satellite assemblies associated with a given language and .NET Framework version. No core .NET Framework files are removed unless the last language for that .NET Framework version is being removed. For example, English and Japanese editions of the .NET Framework version 1.1 share the same core files. The Japanese .NET Framework version 1.1 adds satellite assemblies with localized resources in a \ja subdirectory. An application that supports the .NET Framework version 1.1, regardless of its language, always uses the same core runtime files.&lt;br /&gt;&lt;br /&gt;How will you load dynamic assembly? How will create assemblies at run time?&lt;br /&gt;&lt;br /&gt;What is Assembly manifest?&lt;br /&gt;what all details the assembly manifest will contain. Every assembly, whether static or dynamic, contains a collection of data that describes how the elements in the assembly relate to each other. The assembly manifest contains this assembly metadata. An assembly manifest contains all the metadata needed to specify the assembly’s version requirements and security identity, and all metadata needed to define the scope of the assembly and resolve references to resources and classes. The assembly manifest can be stored in either a PE file (an .exe or .dll) withMicrosoft intermediate language (MSIL) code or in a standalone PE file that contains only assembly manifest information. It contains Assembly name, Version number, Culture, Strong name information, List of all files in the assembly, Type reference information, Information on referenced assemblies.&lt;br /&gt;&lt;br /&gt;What are the contents of assembly?&lt;br /&gt;In general, a static assembly can consist of four elements:&lt;br /&gt;The assembly manifest, which contains assembly metadata.&lt;br /&gt;Type metadata.&lt;br /&gt;Microsoft intermediate language (MSIL) code that implements the types. A set of resources.&lt;br /&gt;&lt;br /&gt;Difference between assembly manifest &amp; metadata assembly manifest –&lt;br /&gt;An integral part of every assembly that renders the assembly self-describing. The assembly manifest contains the assembly’s metadata. The manifest establishes the assembly identity, specifies the files that make up the assembly implementation, specifies the types and resources that make up the assembly, itemizes the compile-time dependencies on other assemblies, and specifies the set of permissions required for the assembly to run properly. This information is used at run time to resolve references, enforce version binding policy, and validate the integrity of loaded assemblies. The self-describing nature of assemblies also helps makes zero-impact install and XCOPY deployment feasible. metadata -Information that describes every element managed by the common language runtime: an assembly, loadable file, type, method, and so on. This can include information required for debugging and garbage collection, as well as security attributes, marshaling data, extended class and member definitions, version binding, and other information required by the runtime.&lt;br /&gt;&lt;br /&gt;What is Global Assembly Cache (GAC) and what is the purpose of it? (How to make an assembly to public? Steps) Each computer where the common language runtime is installed has a machine-wide code cache called the global assembly cache. The global assembly cache stores assemblies specifically designated to be shared by several applications on the computer.  You should share assemblies by installing them into the global assembly cache only when you need to.&lt;br /&gt;&lt;br /&gt;If I have more than one version of one assemblies, then how’ll I use old version (how/where to specify version number?)in my application?&lt;br /&gt;&lt;br /&gt;How to find methods of a assembly file (not using ILDASM) Reflection&lt;br /&gt;&lt;br /&gt;Value type &amp; data types difference. Example from .NET.&lt;br /&gt;&lt;br /&gt;Integer &amp; struct are value types or reference types in .NET?&lt;br /&gt;&lt;br /&gt;What is Garbage Collection in .Net? Garbage collection process?&lt;br /&gt;The process of transitively tracing through all pointers to actively used objects in order to locate all objects that can be referenced, and then arranging to reuse any heap memory that was not found during this trace. The common language runtime garbage collector also compacts the memory that is in use to reduce the working space needed for the heap.&lt;br /&gt;&lt;br /&gt;Readonly vs. const?&lt;br /&gt;A constfield can only be initialized at the declaration of the field. A readonlyfield can be initialized either at the declaration or in a constructor. Therefore,readonlyfields can have different values depending on the constructor used. Also, while a constfield is a compile-time constant, thereadonlyfield can be used for runtime constants, as in the following example: public static readonly uint l1 = (uint) DateTime.Now.Ticks;&lt;br /&gt;&lt; . { System.Attribute : MyAttribute public attribute.(&gt;&lt;br /&gt;&lt; { public this.myvalue="myvalue;" myvalue) MyAttribute(bool constructors(&gt;&lt;br /&gt;//Declaring properties&lt;br /&gt;public bool MyProperty&lt;br /&gt;{&lt;br /&gt; get {return this.myvalue;}&lt;br /&gt; set {this.myvalue = value;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;ion to get access to custom attributes.&lt;br /&gt;class MainClass&lt;br /&gt;{&lt;br /&gt;public static void Main()&lt;br /&gt;{&lt;br /&gt;System.Reflection.MemberInfo info = typeof(MyClass);&lt;br /&gt;object[] attributes = info.GetCustomAttributes();&lt;br /&gt;for (int i = 0; i &lt; canvas =" new" canvas =" new"&gt; and &lt;code&gt; XML documentation tag? Single line code example and multiple-line code example.&lt;br /&gt;&lt;br /&gt;Is XML case-sensitive?&lt;br /&gt;Yes, so &lt;student&gt; and &lt;student&gt; are different elements.&lt;br /&gt;&lt;br /&gt;What debugging tools come with the .NET SDK?&lt;br /&gt;CorDBG – command-line debugger, and DbgCLR – graphic debugger. Visual Studio .NET uses the DbgCLR. To use CorDbg, you must compile the original C# file using the /debug switch.&lt;br /&gt;&lt;br /&gt;What does the This window show in the debugger?&lt;br /&gt;It points to the object that’s pointed to by this reference. Object’s instance data is shown.&lt;br /&gt;&lt;br /&gt;What does assert() do?&lt;br /&gt;In debug compilation, assert takes in a Boolean condition as a parameter, and shows the error dialog if the condition is false. The program proceeds without any interruption if the condition is true.&lt;br /&gt;&lt;br /&gt;What’s the difference between the Debug class and Trace class?&lt;br /&gt;Documentation looks the same.&lt;br /&gt; Use Debug class for debug builds, use Trace class for both debug and release builds.&lt;br /&gt;&lt;br /&gt;Why are there five tracing levels in System.Diagnostics.TraceSwitcher?&lt;br /&gt;The tracing dumps can be quite verbose and for some applications that are constantly running you run the risk of overloading the machine and the hard drive there. Five levels range from None to Verbose, allowing to fine-tune the tracing activities.&lt;br /&gt;&lt;br /&gt;Where is the output of TextWriterTraceListener redirected?&lt;br /&gt;To the Console or a text file depending on the parameter passed to the constructor.&lt;br /&gt;&lt;br /&gt;How do you debug an ASP.NET Web application?&lt;br /&gt;Attach the aspnet_wp.exe process to the DbgClr debugger.&lt;br /&gt;&lt;br /&gt;What are three test cases you should go through in unit testing?&lt;br /&gt;Positive test cases (correct data, correct output), negative test cases (broken or missing data, proper handling), exception test cases (exceptions are thrown and caught properly).&lt;br /&gt;&lt;br /&gt;Can you change the value of a variable while debugging a C# application?&lt;br /&gt;Yes, if you are debugging via Visual Studio.NET, just go to Immediate window.&lt;br /&gt;&lt;br /&gt;Explain the three services model&lt;br /&gt;(three-tier application). Presentation (UI), business (logic and underlying code) and data (from storage or other sources).&lt;br /&gt;&lt;br /&gt;What are advantages and disadvantages of Microsoft-provided data provider classes in ADO.NET?&lt;br /&gt;SQLServer.NET data provider is high-speed and robust, but requires SQL Server license purchased from Microsoft. OLE-DB.NET is universal for accessing other sources, like Oracle, DB2, Microsoft Access and Informix, but it’s a .NET layer on top of OLE layer, so not the fastest thing in the world. ODBC.NET is a deprecated layer provided for backward compatibility to ODBC engines.&lt;br /&gt;&lt;br /&gt;What’s the role of the DataReader class in ADO.NET connections?&lt;br /&gt;It returns a read-only dataset from the data source when the command is executed.&lt;br /&gt;&lt;br /&gt;What is the wildcard character in SQL?&lt;br /&gt;Let’s say you want to query database with LIKE for all employees whose name starts with La. The wildcard character is %, the proper query with LIKE would involve ‘La%’.&lt;br /&gt;&lt;br /&gt;Explain ACID rule of thumb for transactions. Transaction must be Atomic&lt;br /&gt; (it is one unit of work and does not dependent on previous and following transactions), Consistent (data is either committed or roll back, no “in-between” case where something has been updated and something hasn’t), Isolated (no transaction sees the intermediate results of the current transaction), Durable (the values persist if the data had been committed even if the system crashes right after).&lt;br /&gt;&lt;br /&gt;What connections does Microsoft SQL Server support?&lt;br /&gt;Windows Authentication (via Active Directory) and SQL Server authentication (via Microsoft SQL Server username and passwords).&lt;br /&gt;&lt;br /&gt;Which one is trusted and which one is untrusted?&lt;br /&gt;Windows Authentication is trusted because the username and password are checked with the Active Directory, the SQL Server authentication is untrusted, since SQL Server is the only verifier participating in the transaction.&lt;br /&gt;&lt;br /&gt;Why would you use untrusted verificaion?&lt;br /&gt;Web Services might use it, as well as non-Windows applications.&lt;br /&gt;Use untrusted (SQL) verification so everybody uses same connection string to access db. Only this way can connection pooling be used.&lt;br /&gt;&lt;br /&gt;What does the parameter Initial Catalog define inside Connection String?&lt;br /&gt;The database name to connect to.&lt;br /&gt;&lt;br /&gt;What’s the data provider name to connect to Access database?&lt;br /&gt;Microsoft.Access.&lt;br /&gt;&lt;br /&gt;What’s the data provider name to connect to Access database?&lt;br /&gt;Microsoft Jet 3.51/4.0 OLEDB data provider&lt;br /&gt;&lt;br /&gt;What does Dispose method do with the connection object?&lt;br /&gt; Deletes it from the memory.&lt;br /&gt;it doesn’t delete it from memory, it closes any resources (e.g. returns the underlying database connection to the connection pool). The garbage collector will delete the object from memory at some undefined point in the future.&lt;br /&gt;&lt;br /&gt;What is a pre-requisite for connection pooling?&lt;br /&gt; Multiple processes must agree that they will share the same connection, where every parameter is the same, including the security settings. technically the decision on whether to use a pooled connection is made by a string comparison of the connection string being opened and that in the pool, so even though the parameters might be functionally the same, a difference in case or an extra space will cause the pooled connection not to be used&lt;br /&gt;&lt;br /&gt;At work we use an Oracle 9i db to store our session info by removing the standard session provided by .NET and forcing our own session implementation in the web.config file.&lt;br /&gt;So to answer your question, in order to store ASP.NET session information inside SQL Server you must:&lt;br /&gt;1) Have SQL Server version 7 or 2000 installed.&lt;br /&gt;2) Execute the following script using SQL Server’s Query Analyzer, which creates the database that ASP.NET uses to store Session:&lt;br /&gt;\%winroot%\Microsoft.NET\Framework\versionNum\InstallSqlState.sql&lt;br /&gt;&lt;br /&gt; Modify the web.config file appropriately (where the connectionString attribute denotes the connection string that should be used to open the database):&lt;br /&gt;&lt;sessionstate mode="SQLServer" sqlconnectionstring= "data source=127.0.0.1;user sa;password="&gt;&lt;br /&gt;Storing Session inside SQL Server is the most durable option, as information persists even if the machine crashes. This is the slowest option of the three, however, because session data must be accessed from disk rather than directly from memory, a process thousands of times slower. Note that as with the Windows Service option, you can point ASP.NET to a Session store on a different machine, which is also appropriate in Web farm settings.&lt;br /&gt;&lt;br /&gt;What’s the implicit name of the parameter that gets passed into the class’ set method?&lt;br /&gt;Value, and it’s datatype depends on whatever variable we’re changing.&lt;br /&gt;&lt;br /&gt;How do you inherit from a class in C#?&lt;br /&gt;Place a colon and then the name of the base class.&lt;br /&gt;&lt;br /&gt;Does C# support multiple inheritance?&lt;br /&gt;No, use interfaces instead.&lt;br /&gt;&lt;br /&gt;When you inherit a protected class-level variable, who is it available to?&lt;br /&gt;Classes in the same namespace.&lt;br /&gt;&lt;br /&gt;Are private class-level variables inherited?&lt;br /&gt;Yes, but they are not accessible, so looking at it you can honestly say that they are not inherited. But they are.&lt;br /&gt;&lt;br /&gt;Describe the accessibility modifier protected internal. It’s available to derived classes and classes within the same Assembly (and naturally from the base class it’s declared in).&lt;br /&gt;&lt;br /&gt;C# provides a default constructor for me. I write a constructor that takes a string as a parameter, but want to keep the no parameter one. How many constructors should I write? Two. Once you write at least one constructor, C# cancels the freebie constructor, and now you have to write one yourself, even if there’s no implementation in it.&lt;br /&gt;&lt;br /&gt;What’s the top .NET class that everything is derived from?&lt;br /&gt; System.Object.&lt;br /&gt;&lt;br /&gt;How’s method overriding different from overloading?&lt;br /&gt;When overriding, you change the method behavior for a derived class. Overloading simply involves having a method with the same name within the class.&lt;br /&gt;&lt;br /&gt;What does the keyword virtual mean in the method definition?&lt;br /&gt;The method can be over-ridden.&lt;br /&gt;Can you declare the override method static while the original method is non-static? No, you can’t, the signature of the virtual method must remain the same, only the keyword virtual is changed to keyword override.&lt;br /&gt;&lt;br /&gt;Can you override private virtual methods?&lt;br /&gt;No, moreover, you cannot access private methods in inherited classes, have to be protected in the base class to allow any sort of access.&lt;br /&gt;&lt;br /&gt;Can you prevent your class from being inherited and becoming a base class for some other classes?&lt;br /&gt;Yes, that’s what keyword sealed in the class definition is for. The developer trying to derive from your class will get a message: cannot inherit from Sealed class WhateverBaseClassName. It’s the same concept as final class in Java.&lt;br /&gt;&lt;br /&gt;Can you allow class to be inherited, but prevent the method from being over-ridden?&lt;br /&gt;Yes, just leave the class public and make the method sealed.&lt;br /&gt;&lt;br /&gt;What’s an abstract class?&lt;br /&gt;A class that cannot be instantiated. A concept in C++ known as pure virtual method. A class that must be inherited and have the methods over-ridden. Essentially, it’s a blueprint for a class without any implementation.&lt;br /&gt;When do you absolutely have to declare a class as abstract (as opposed to free-willed educated choice or decision based on UML diagram)? When at least one of the methods in the class is abstract. When the class itself is inherited from an abstract class, but not all base abstract methods have been over-ridden.&lt;br /&gt;&lt;br /&gt;What’s an interface class?&lt;br /&gt;It’s an abstract class with public abstract methods all of which must be implemented in the inherited classes.&lt;br /&gt;&lt;br /&gt;Why can’t you specify the accessibility modifier for methods inside the interface?&lt;br /&gt;They all must be public. Therefore, to prevent you from getting the false impression that you have any freedom of choice, you are not allowed to specify any accessibility, it’s public by default.&lt;br /&gt;&lt;br /&gt;Can you inherit multiple interfaces? Yes, why not.&lt;br /&gt;And if they have conflicting method names? It’s up to you to implement the method inside your own class, so implementation is left entirely up to you. This might cause a problem on a higher-level scale if similarly named methods from different interfaces expect different data, but as far as compiler cares you’re okay.&lt;br /&gt;&lt;br /&gt;What’s the difference between an interface and abstract class?&lt;br /&gt;In the interface all methods must be abstract, in the abstract class some methods can be concrete. In the interface no accessibility modifiers are allowed, which is ok in abstract classes.&lt;br /&gt;&lt;br /&gt;How can you overload a method?&lt;br /&gt;Different parameter data types, different number of parameters, different order of parameters.&lt;br /&gt;&lt;br /&gt;If a base class has a bunch of overloaded constructors, and an inherited class has another bunch of overloaded constructors, can you enforce a call from an inherited constructor to an arbitrary base constructor?&lt;br /&gt; Yes, just place a colon, and then keyword base (parameter list to invoke the appropriate constructor) in the overloaded constructor definition inside the inherited class.&lt;br /&gt;&lt;br /&gt;What’s the difference between System.String and System.StringBuilder classes?&lt;br /&gt;System.String is immutable, System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed.&lt;br /&gt;&lt;br /&gt;Is it namespace class or class namespace?&lt;br /&gt;The .NET class library is organized into namespaces. Each namespace contains a functionally related group of classes so natural namespace comes first.&lt;br /&gt;&lt;br /&gt;When you inherit a protected class-level variable, who is it available to?&lt;br /&gt;Classes in the same namespace. ”&lt;br /&gt;&lt;br /&gt;Wrong, the protected keyword in C# specifies that only classes that ultimately inherit from the class with a protected member can see that member.&lt;br /&gt;&lt;br /&gt; “protected - Access is limited to the containing class or types derived from the containing class.”&lt;br /&gt;&lt;br /&gt;What’s an abstract class?&lt;br /&gt;Essentially, it’s a blueprint for a class without any implementation.”&lt;br /&gt;Although an abstract class does not require implementations (it’s methods can be abstract) it *can* also offer implementations of methods (either virtual or not) which can be called in implementing classes.&lt;br /&gt;&lt;br /&gt;You CAN implement an interface explicitly without the members being declared public in your class. The difference is that if the members are not public, they will only be available when you have a reference variable of the type of the interface pointing to you class&lt;br /&gt;You implement them like so:&lt;br /&gt;&lt;br /&gt;void IDisposable.Dispose()&lt;br /&gt;{&lt;br /&gt;// TODO: Add Class1.Dispose implementation&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;If the members of the interface are not public, then even if you have an instance of that, how would you implement/override non-public members if you don’t have any access to them?&lt;br /&gt;&lt;br /&gt;If the members of the interface are not public, then even if you have an instance of that, how would you implement/override non-public members if you don’t have any access to them?”&lt;br /&gt;&lt;br /&gt;Ah, you meant “public to references to the *interface*” so of course they must be publically visible. I read the original question as meaning “public to references to the class” which isn’t a necessity.&lt;br /&gt;&lt;br /&gt;Is it namespace class or class namespace?&lt;br /&gt;The .NET class library is organized into namespaces. Each namespace contains a functionally related group of classes so natural namespace comes first.&lt;br /&gt;&lt;br /&gt;correction: “so natural namespace comes first” should be “so naturally namespace comes first”&lt;br /&gt;&lt;br /&gt;C# does’t cancel the freebie constructor(parameter less constuctor).&lt;br /&gt;it is goting to keep the parameter less constructor, even if you add any number of parameterised constructors.&lt;br /&gt;&lt;br /&gt;C# behaves this way so that you can specify a class has *no* parameterless constructor. then it would be impossible to implement a class without a parameterless (”default”) constructor.&lt;br /&gt;&lt;br /&gt;How do you specify constructors in an interface?&lt;br /&gt;You cannot. C# does not allow constructor signatures to be specified in interface.” I don’t know the reason&lt;br /&gt;&lt;br /&gt;As far I know interfaces doesn’t have data members(fields), they will only have methods or properties, so no need for constructors. I am also new to C# so I dont know whether I am completely correct or not.&lt;br /&gt;&lt;br /&gt;An instance of an interface cannot be created. (But the interface methods can be accessed in a class implementing that interface, by casting the instance of that class to the interface type. This is sometimes referred to as creating an instance of the interface.) “The job of a constructor is to create the object specified by a class and to put it into a valid state.”[Programming C#-Jesse Liberty]. So, no need of a constructor.&lt;br /&gt;&lt;br /&gt;Use of property in an interface:&lt;br /&gt;An interface can have methods, properties, events and indexers. When a property in an interface is implemented in a class, the advantage is that, through that property, the class can give access to its private member varibles.&lt;br /&gt;&lt;br /&gt;1) This question would be better stated “What is the implicit name of the parameter passed into a property’s ’set’ method?”&lt;br /&gt;&lt;br /&gt;2) It’s a good while since I’ve had to do any C++, but my long term memory tells me that it isn’t double colon in C++. Perhaps you’re confusing the scope resolution operator?&lt;br /&gt;&lt;br /&gt;3) A better answer would be that C# disallows multiple inheritance of implementation, but allows classes to implement multiple interfaces.&lt;br /&gt;&lt;br /&gt;4) This is just wrong. Protected members are visible only to classes that are derived from the containing class.&lt;br /&gt;5) An abstract class in C++ is a class that contains at least 1 pure virtual method.&lt;br /&gt;&lt;br /&gt;can anyone explain/differentiate between different database concepts(odbc,ole-db,ado.net, ado,dao,rao)?&lt;br /&gt;&lt;br /&gt;What does the readonly keyword do for a variable in c#? (hint on Question 4)&lt;br /&gt;&lt;br /&gt;Can we overload methods by specifying different return types?&lt;br /&gt;&lt;br /&gt;Can you can specify values for for variables in interfaces in c#? (In Java you can)&lt;br /&gt;&lt;br /&gt;What is the difference between const and readonly ?&lt;br /&gt;&lt;br /&gt;What does the readonly keyword do for a variable in c#? What is the difference between const and readonly ?&lt;br /&gt;To declare constants in C# the const keyword is used for compile time constants while the readonly keyword is used for runtime constants&lt;br /&gt;&lt;br /&gt;Can we overload methods by specifying different return types?&lt;br /&gt;NO. I tried it in VS.net&lt;br /&gt;&lt;br /&gt;Can you can specify values for for variables in interfaces in c#? (In Java you can)&lt;br /&gt;Answer) NO. I tried this in VS.net and it gave me the following error:&lt;br /&gt;D:\VisualStudio\…\Interface.cs(10): Interfaces cannot contain fields&lt;br /&gt;&lt;br /&gt;The .Net compiler does not accept a virtual private method which makes sense since a virtual private method makes no sense.&lt;br /&gt;&lt;br /&gt;Since you constructors are not allowed in an interface, how would you be able to use an interface as a type parameter when the type parameter is constrained by new()?&lt;br /&gt;&lt;br /&gt;if u can’t access a member in derived class, then how do we say it is inherited.To my knowledge, the fundamental concept behind inheritance is representing the parent, if a child con’t access then we can say its not inherited.Please correct me if am wrong.&lt;br /&gt;&lt;br /&gt;How big is the datatype int in .NET?&lt;br /&gt;32 bits.&lt;br /&gt;&lt;br /&gt;How big is the char?&lt;br /&gt;16 bits (Unicode).&lt;br /&gt;&lt;br /&gt;How do you initiate a string without escaping each backslash?&lt;br /&gt;Put an @ sign in front of the double-quoted string.&lt;br /&gt;&lt;br /&gt;What are valid signatures for the Main function?&lt;br /&gt;public static void Main()&lt;br /&gt;public static int Main()&lt;br /&gt;public static void Main( string[] args )&lt;br /&gt;public static int Main(string[] args )&lt;br /&gt;&lt;br /&gt;Does Main() always have to be public?&lt;br /&gt; No.&lt;br /&gt;&lt;br /&gt;How do you initialize a two-dimensional array that you don’t know the dimensions of?&lt;br /&gt;int [, ] myArray; //declaration&lt;br /&gt;myArray= new int [5, 8]; //actual initialization&lt;br /&gt;&lt;br /&gt;What’s the access level of the visibility type internal?&lt;br /&gt;Current assembly.&lt;br /&gt;What’s the difference between struct and class in C#?&lt;br /&gt;Structs cannot be inherited.&lt;br /&gt;Structs are passed by value, not by reference.&lt;br /&gt;Struct is stored on the stack, not the heap.&lt;br /&gt;&lt;br /&gt;Explain encapsulation.&lt;br /&gt;The implementation is hidden, the interface is exposed.&lt;br /&gt;&lt;br /&gt;What data type should you use if you want an 8-bit value that’s signed?&lt;br /&gt;sbyte.&lt;br /&gt;&lt;br /&gt;Speaking of Boolean data types, what’s different between C# and C/C++?&lt;br /&gt;There’s no conversion between 0 and false, as well as any other number and true, like in C/C++.&lt;br /&gt;&lt;br /&gt;Where are the value-type variables allocated in the computer RAM?&lt;br /&gt;Stack.&lt;br /&gt;&lt;br /&gt;Where do the reference-type variables go in the RAM?&lt;br /&gt;The references go on the stack, while the objects themselves go on the heap. However, in reality things are more elaborate.&lt;br /&gt;&lt;br /&gt;What is the difference between the value-type variables and reference-type variables in terms of garbage collection?&lt;br /&gt;The value-type variables are not garbage-collected, they just fall off the stack when they fall out of scope, the reference-type objects are picked up by GC when their references go null.&lt;br /&gt;&lt;br /&gt;How do you convert a string into an integer in .NET?&lt;br /&gt;Int32.Parse(string), Convert.ToInt32()&lt;br /&gt;&lt;br /&gt;How do you box a primitive data type variable?&lt;br /&gt;Initialize an object with its value, pass an object, cast it to an object&lt;br /&gt;&lt;br /&gt;Why do you need to box a primitive variable?&lt;br /&gt;To pass it by reference or apply a method that an object supports, but primitive doesn’t.&lt;br /&gt;&lt;br /&gt;What’s the difference between Java and .NET garbage collectors?&lt;br /&gt;Sun left the implementation of a specific garbage collector up to the JRE developer, so their performance varies widely, depending on whose JRE you’re using. Microsoft standardized on their garbage collection.&lt;br /&gt;&lt;br /&gt;How do you enforce garbage collection in .NET?&lt;br /&gt;System.GC.Collect();&lt;br /&gt;&lt;br /&gt;Can you declare a C++ type destructor in C# like ~MyClass()?&lt;br /&gt;Yes, but what’s the point, since it will call Finalize(), and Finalize() has no guarantees when the memory will be cleaned up, plus, it introduces additional load on the garbage collector. The only time the finalizer should be implemented, is when you’re dealing with unmanaged code.&lt;br /&gt;&lt;br /&gt;What’s different about namespace declaration when comparing that to package declaration in Java?&lt;br /&gt;No semicolon. Package declarations also have to be the first thing within the file, can’t be nested, and affect all classes within the file.&lt;br /&gt;&lt;br /&gt;What’s the difference between const and readonly?&lt;br /&gt;You can initialize readonly variables to some runtime values. Let’s say your program uses current date and time as one of the values that won’t change. This way you declare&lt;br /&gt;public readonly string DateT = new DateTime().ToString().&lt;br /&gt;&lt;br /&gt;Can you create enumerated data types in C#?&lt;br /&gt;Yes.&lt;br /&gt;&lt;br /&gt;What’s different about switch statements in C# as compared to C++?&lt;br /&gt;No fall-throughs allowed.&lt;br /&gt;&lt;br /&gt;What happens when you encounter a continue statement inside the for loop?&lt;br /&gt; The code for the rest of the loop is ignored, the control is transferred back to the beginning of the loop.&lt;br /&gt;&lt;br /&gt;Is goto statement supported in C#? How about Java?&lt;br /&gt;Gotos are supported in C#to the fullest. In Java goto is a reserved keyword that provides  absolutely no functionality.&lt;br /&gt;&lt;br /&gt;Describe the compilation process for .NET code?&lt;br /&gt;Source code is compiled and run in the .NET Framework using a two-stage process. First, source code is compiled to Microsoft intermediate language (MSIL) code using a .NET Framework-compatible compiler, such as that for Visual Basic .NET or Visual C#. Second, MSIL code is compiled to native code.&lt;br /&gt;&lt;br /&gt;Name any 2 of the 4 .NET authentification methods. ASP.NET, in conjunction with Microsoft Internet Information Services (IIS), can authenticate user credentials such as names and passwords using any of the following authentication methods:&lt;br /&gt;&lt;br /&gt;Windows: Basic, digest, or Integrated Windows Authentication (NTLM or Kerberos).&lt;br /&gt;Microsoft Passport authentication&lt;br /&gt;Forms authentication&lt;br /&gt;Client Certificate authentication&lt;br /&gt;&lt;br /&gt;How do you turn off SessionState in the web.config file?&lt;br /&gt;In the system.web section of web.config, you should locate the httpmodule tag and you simply disable session by doing a remove tag with attribute name set to session.&lt;br /&gt;&lt;httpmodules&gt;&lt;br /&gt;&lt;remove name="”Session”"&gt;&lt;br /&gt;&lt;/httpmodules&gt;&lt;br /&gt;&lt;br /&gt;What is main difference between Global.asax and Web.Config?&lt;br /&gt;ASP.NET uses the global.asax to establish any global objects that your Web application uses. The .asax extension denotes an application file rather than .aspx for a page file. Each ASP.NET application can contain at most one global.asax file. The file is compiled on the first page hit to your Web application. ASP.NET is also configured so that any attempts to browse to the global.asax page directly are rejected. However, you can specify application-wide settings in the web.config file. The web.config is an XML-formatted text file that resides in the Web site’s root directory. Through Web.config you can specify settings like custom 404 error pages, authentication and authorization settings for the Web site, compilation options for the ASP.NET Web pages, if tracing should be enabled, etc.&lt;br /&gt;&lt;br /&gt;Is .net code compiled to a folder?&lt;br /&gt;Source code is compiled and run in the .NET Framework using a two-stage process. First, source code is compiled to Microsoft intermediate language (MSIL) code using a .NET Framework–compatible compiler, such as that for Visual Basic .NET or Visual C#. Second, MSIL code is compiled to native code.&lt;br /&gt;&lt;br /&gt;How do you turn off session in the web.config file?&lt;br /&gt;In the system.web section of web.config, you should locate the httpmodule tag and include an “add” tag set attribute name to session and enableSesstionState attribute to false or you can simply disable session by doing a remove tag with attribute name set to session.&lt;br /&gt;&lt;httpmodules&gt;&lt;br /&gt;&lt;add name="”Session”" type="”System.Web.SessionState.SessionStateModule”/"&gt;&lt;br /&gt;&lt;/httpmodules&gt;&lt;br /&gt;&lt;br /&gt;what is main difference between Global.asax and Web.Config. use of which is and preferrable .Please send me the answer.Can we Declare a Global Database Connection Object in Web.config (Yes) so what will be the advantage over declring it insted in Global.asax.&lt;br /&gt;&lt;br /&gt;What are the two syntaxes for declaring multidimensional arrays in C# and what is the difference?&lt;br /&gt; int [][] and int [,] .The first is ‘jagged’ and the second is rectangular. The first is not supported in managed C++.&lt;br /&gt;&lt;br /&gt;in the test program of asp.net/c# producing the error such as system.web.OLEDB service is not available after making this on top this error is also going on please tell me the solution&lt;br /&gt;&lt;br /&gt;NET framework programming&lt;br /&gt;&lt;br /&gt;Has own class libraries. System is the main namespace and all other namespaces are subsets of this.&lt;br /&gt;&lt;br /&gt;It has CLR(Common language runtime, Common type system, common language specification)&lt;br /&gt;&lt;br /&gt;All the types are part of CTS and Object is the base class for all the types.&lt;br /&gt;&lt;br /&gt;If a language said to be .net complaint, it should be compatible with CTS and CLS.&lt;br /&gt;All the code compiled into an intermediate language by the .Net language compiler, which is nothing but an assembly.&lt;br /&gt;During runtime, JIT of CLR picks the IL code and converts into PE machine code and from there it processes the request.&lt;br /&gt;CTS, CLS, CLR&lt;br /&gt;Garbage Collection&lt;br /&gt;Dispose, finalize, suppress finalize, Idispose interface&lt;br /&gt;Assemblies, Namespace: Assembly is a collection of class/namespaces. An assembly contains Manifest, Metadata, Resource files, IL code&lt;br /&gt;Com interoperability, adding references, web references&lt;br /&gt;Database connectivity and providers&lt;br /&gt;Application Domain&lt;br /&gt;Class modifiers: public, private, friend, protected, protected friend, mustinherit, NotInheritable&lt;br /&gt;Method modifiers: public, private&lt;br /&gt;Overridable&lt;br /&gt;Shadows&lt;br /&gt;Overloadable&lt;br /&gt;Overrides&lt;br /&gt;Overloads&lt;br /&gt;Set/Get Property&lt;br /&gt;IIF&lt;br /&gt;Inheritance&lt;br /&gt;Polymorphism&lt;br /&gt;Delegates&lt;br /&gt;Events&lt;br /&gt;Reflection&lt;br /&gt;Boxing&lt;br /&gt;UnBoxing&lt;br /&gt;ASP.Net&lt;br /&gt;Web Controls: Data grid (templates, sorting, paging, bound columns, unbound columns, data binding), Data list, repeater controls&lt;br /&gt;HTML Controls&lt;br /&gt;Code behind pages, system.web.ui.page base class&lt;br /&gt;Web.config: App settings, identity (impersonate), authentication (windows, forms, anonymous, passport), authorization&lt;br /&gt;Databind.eval&lt;br /&gt;Trace, Debug&lt;br /&gt;Output cache&lt;br /&gt;Session management&lt;br /&gt;Application, Session&lt;br /&gt;Global.asax httpapplication&lt;br /&gt;User controls, custom controls, custom rendered controls (postback event, postdatachanged event) usercontrol is the base class&lt;br /&gt;Directives&lt;br /&gt;ADO.Net&lt;br /&gt;Command object (ExecuteNonquery, ExecuteReader, ExecuteXMLReader, ExecuteScalar)&lt;br /&gt;DataAdapter object (Fill)&lt;br /&gt;Dataset (collection of tables)&lt;br /&gt;CommandBuiler object&lt;br /&gt;Transaction Object&lt;br /&gt;Isolation levels&lt;br /&gt;&lt;br /&gt;ASP.NET&lt;br /&gt;&lt;br /&gt;Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe&lt;br /&gt;in the page loading process. inetinfo.exe is theMicrosoft IIS server running,&lt;br /&gt;handling ASP.NET requests among other things.When an ASP.NET request is received&lt;br /&gt;(usually a file with .aspx extension),the ISAPI filter aspnet_isapi.dll takes&lt;br /&gt;care of it by passing the request tothe actual worker process aspnet_wp.exe.&lt;br /&gt;&lt;br /&gt;What’s the difference between Response.Write() andResponse.Output.Write()?&lt;br /&gt;The latter one allows you to write formattedoutput.&lt;br /&gt;What methods are fired during the page load?&lt;br /&gt; Init() - when the pageis&lt;br /&gt;instantiated, Load() - when the page is loaded into server memory,PreRender()&lt;br /&gt;- the brief moment before the page is displayed to the user asHTML, Unload()&lt;br /&gt;- when page finishes loading.&lt;br /&gt;&lt;br /&gt;Where does the Web page belong in the .NET Framework class hierarchy?&lt;br /&gt;System.Web.UI.Page&lt;br /&gt;&lt;br /&gt;Where do you store the information about the user’s locale?&lt;br /&gt; System.Web.UI.Page.Culture&lt;br /&gt;&lt;br /&gt;What’s the difference between Codebehind="MyCode.aspx.cs" andSrc="MyCode.aspx.cs"?&lt;br /&gt;CodeBehind is relevant to Visual Studio.NET only.&lt;br /&gt;&lt;br /&gt;What’s a bubbled event?&lt;br /&gt;&lt;br /&gt;When you have a complex control, likeDataGrid,writing an event processing routine for each object (cell, button,row, etc.)&lt;br /&gt;is quite tedious. The controls can bubble up their eventhandlers, allowing&lt;br /&gt;the main DataGrid event handler to take care of itsconstituents.&lt;br /&gt;Suppose you want a certain ASP.NET function executed on MouseOver overa&lt;br /&gt;certain button. Where do you add an event handler? It’s the Attributesproperty,&lt;br /&gt;the Add function inside that property. So&lt;br /&gt;btnSubmit.Attributes.Add("onMouseOver","someClientCode();")&lt;br /&gt;A simple”Javascript:ClientCode();” in the button control of the .aspx&lt;br /&gt;page will attach the handler (javascript function)to the onmouseover event.&lt;br /&gt;&lt;br /&gt;What data type does the RangeValidator control support?&lt;br /&gt;Integer,String and Date.&lt;br /&gt;&lt;br /&gt;Where would you use an iHTTPModule, and what are the limitations of any&lt;br /&gt;approach you might take in implementing one?&lt;br /&gt;One of ASP.NET’s most useful features is the extensibility of the HTTP pipeline, the path that data takes between client and server. You can use them to extend your ASP.NET applications by adding pre- and post-processing to each HTTP request coming into your application. For example, if you wanted custom authentication facilities for your application, the best technique would be to intercept the request when it comes in and process the request in a custom HTTP module.&lt;br /&gt;&lt;br /&gt;Explain what a diffgram is, and a good use for one?&lt;br /&gt;A DiffGram is an XML format that is used to identify current and original versions of data&lt;br /&gt;elements. The DataSet uses the DiffGram format to load and persist its contents, and to serialize its contents for transport across a network connection. When a DataSet is written as a DiffGram, it populates the DiffGram with all the necessary information to accurately recreate the contents, though not the schema, of the DataSet, including column values from both the Original and&lt;br /&gt;Current row versions, row error information, and row order.&lt;br /&gt;&lt;br /&gt;Explain the differences between Server-side and Client-side code?&lt;br /&gt;Server side scripting means that all the script will be executed by the server and interpreted as needed. ASP doesn’t have some of the functionality like sockets, uploading, etc. For these you have to make a custom components usually in VB or VC++. Client side scripting means that the script will be executed immediately in the browser such as form field validation, clock, email validation, etc. Client side scripting is usually done in VBScript or JavaScript. Download time, browser compatibility, and visible code - since JavaScript and VBScript code is included in the HTML page, then anyone can see the code by viewing the page source. Also a possible security hazards for the client computer.&lt;br /&gt;&lt;br /&gt;What type of code (server or client) is found in a Code-Behind class? C#&lt;br /&gt;Should validation (did the user enter a real date) occur server-side or client-side? Why? Client-side validation because there is no need to request a server side date when you could obtain a date from the client machine.&lt;br /&gt;&lt;br /&gt;What does the "EnableViewState" property do?&lt;br /&gt;Why would I want it on or off? Enable ViewState turns on the automatic state management feature that enables server controls to re-populate their values on a round trip without requiring you to write any code. This feature is not free however, since the state of a control is passed to and from the server in a hidden form field. You should be aware of when ViewState is helping you and when it is not. For example, if you are binding a control to data on every round trip (as in the datagrid example in tip #4), then you do not need the control to maintain it’s view state, since you will wipe out any re-populated data in any case. ViewState is enabled for all server controls by default. To disable it, set the EnableViewState property of the control to false.&lt;br /&gt;&lt;br /&gt;What is the difference between Server.Transfer and Response.Redirect?&lt;br /&gt;Why would I choose one over the other?&lt;br /&gt;Server.Transfer() : client is shown as it is on the requesting page only, but the all the content is of the requested page. Data can be persist accros the pages using Context.Item collection, which is one of the best way to transfer data from one page to another keeping the page state alive. Response.Dedirect() :client know the physical loation (page name and query string as well). Context.Items loses the persisitance when nevigate to destination page. In earlier versions of IIS, if we wanted to send a user to a new Web page, the only option we had was Response.Redirect. While this method does accomplish our goal, it has several important drawbacks. The biggest problem is that this method causes each page to be treated as a separate transaction. Besides making it difficult to maintain your transactional integrity, Response.Redirect introduces some additional headaches. First, it prevents good encapsulation of code. Second, you lose access to all of the properties in the Request object. Sure, there are workarounds, but they’re difficult. Finally, Response.Redirect necessitates a round trip to the client, which, on high-volume sites, causes scalability problems. As you might suspect, Server.Transfer fixes all of these problems. It does this by performing the transfer on the server without requiring a roundtrip to the client.&lt;br /&gt;Can you give an example of when it would be appropriate to use a web service as opposed to a non-serviced .NET component? When to Use Web Services:&lt;br /&gt;Communicating through a Firewall When building a distributed application with 100s/1000s of users spread over multiple locations, there is always the problem of communicating between client and server because of firewalls and proxy servers. Exposing your middle tier components as Web Services and invoking the directly from a Windows UI is a very valid option.&lt;br /&gt;Application Integration When integrating applications written in various languages and running on disparate systems. Or even applications running on the same platform that have been written by separate vendors.&lt;br /&gt;Business-to-Business Integration This is an enabler for B2B intergtation which allows one to expose vital business processes to authorized supplier and customers. An example would be exposing electronic ordering and invoicing, allowing customers to send you purchase orders and suppliers to send you invoices electronically.&lt;br /&gt;Software Reuse This takes place at multiple levels. Code Reuse at the Source code level or binary componet-based resuse. The limiting factor here is that you can reuse the code but not the data behind it. Webservice overcome this limitation. A scenario could be when you are building an app that aggregates the functionality of serveral other Applicatons. Each of these functions could be performed by individual apps, but there is value in perhaps combining the the multiple apps to present a unifiend view in a Portal or Intranet.&lt;br /&gt;When not to use Web Services: Single machine Applicatons When the apps are running on the same machine and need to communicate with each other use a native API. You also have the options of using component technologies such as COM or .NET Componets as there is very little overhead.&lt;br /&gt;Homogeneous Applications on a LAN If you have Win32 or Winforms apps that want to communicate to their server counterpart. It is much more efficient to use DCOM in the case of Win32 apps and .NET Remoting in the case of .NET Apps.&lt;br /&gt;Let’s say I have an existing application written using Visual Studio (VBInterDevand this application utilizes WindowsCOM+ transaction services. How would you approach migrating this application to .NET?&lt;br /&gt;&lt;br /&gt;Can you explain the difference between an ADO.NET Dataset and an ADO Recordset?&lt;br /&gt;In ADO, the in-memory representation of data is the recordset. In ADO.NET, it is the dataset. There are important differences between them.&lt;br /&gt;A recordset looks like a single table. If a recordset is to contain data from multiple database tables, it must use a JOIN query, which assembles the data from the various database tables into a single result table. In contrast, a dataset is a collection of one or more tables. The tables within a dataset are called data tables; specifically, they are DataTable objects. If a dataset contains data from multiple database tables, it will typically contain multiple DataTable objects. That is, each DataTable object typically corresponds to a single database table or view. In this way, a dataset can mimic the structure of the underlying database. A dataset usually also contains relationships. A relationship within a dataset is analogous to a foreign-key relationship in a database —that is, it associates rows of the tables with each other. For example, if a dataset contains a table about investors and another table about each investor’s stock purchases, it could also contain a relationship connecting each row of the investor table with the corresponding rows of the purchase table. Because the dataset can hold multiple, separate tables and maintain information about relationships between them, it can hold much richer data structures than a recordset, including self-relating tables and tables with many-to-many relationships.&lt;br /&gt;In ADO you scan sequentially through the rows of the recordset using the ADO MoveNext method. In ADO.NET, rows are represented as collections, so you can loop through a table as you would through any collection, or access particular rows via ordinal or primary key index. DataRelation objects maintain information about master and detail records and provide a method that allows you to get records related to the one you are working with. For example, starting from the row of the Investor table for "Nate Sun," you can navigate to the set of rows of the Purchase table describing his purchases. A cursor is a database element that controls record navigation, the ability to update data, and the visibility of changes made to the database by other users. ADO.NET does not have an inherent cursor object, but instead includes data classes that provide the functionality of a traditional cursor. For example, the functionality of a forward-only, read-only cursor is available in the ADO.NET DataReader object. For more information about cursor functionality, see Data Access Technologies.&lt;br /&gt;Minimized Open Connections: In ADO.NET you open connections only long enough to perform a database operation, such as a Select or Update. You can read rows into a dataset and then work with them without staying connected to the data source. In ADO the recordset can provide disconnected access, but ADO is designed primarily for connected access. There is one significant difference between disconnected processing in ADO and ADO.NET. In ADO you communicate with the database by making calls to an OLE DB provider. In ADO.NET you communicate with the database through a data adapter (an OleDbDataAdapter, SqlDataAdapter, OdbcDataAdapter, or OracleDataAdapter object), which makes calls to an OLE DB provider or the APIs provided by the underlying data source. The important difference is that in ADO.NET the data adapter allows you to control how the changes to the dataset are transmitted to the database — by optimizing for performance, performing data validation checks, or adding any other extra processing. Data adapters, data connections, data commands, and data readers are the components that make up a .NET Framework data provider. Microsoft and third-party providers can make available other .NET Framework data providers that can be integrated into Visual Studio.&lt;br /&gt;Sharing Data Between Applications. Transmitting an ADO.NET dataset between applications is much easier than transmitting an ADO disconnected recordset. To transmit an ADO disconnected recordset from one component to another, you use COM marshalling. To transmit data in ADO.NET, you use a dataset, which can transmit an XML stream.&lt;br /&gt;Richer data types.COM marshalling provides a limited set of data types — those defined by the COM standard. Because the transmission of datasets in ADO.NET is based on an XML format, there is no restriction on data types. Thus, the components sharing the dataset can use whatever rich set of data types they would ordinarily use.&lt;br /&gt;Performance. Transmitting a large ADO recordset or a large ADO.NET dataset can consume network resources; as the amount of data grows, the stress placed on the network also rises. Both ADO and ADO.NET let you minimize which data is transmitted. But ADO.NET offers another performance advantage, in that ADO.NET does not require data-type conversions. ADO, which requires COM marshalling to transmit records sets among components, does require that ADO data types be converted to COM data types.&lt;br /&gt;Penetrating Firewalls.A firewall can interfere with two components trying to transmit disconnected ADO recordsets. Remember, firewalls are typically configured to allow HTML text to pass, but to prevent system-level requests (such as COM marshalling) from passing.&lt;br /&gt;&lt;br /&gt;Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines? The Application_Start event is guaranteed to occur only once throughout the lifetime of the application. It’s a good place to initialize global variables. For example, you might want to retrieve a list of products from a database table and place the list in application state or the Cache object. SessionStateModule exposes both Session_Start and Session_End events.&lt;br /&gt;If I’m developing an application that must accomodate multiple security levels though secure login and my ASP.NET web appplication is spanned across three web-servers (using round-robbin load balancing) what would be the best approach to maintain login-in state for the users?&lt;br /&gt;What are ASP.NET Web Forms? How is this technology different than what is available though ASP? Web Forms are the heart and soul of ASP.NET. Web Forms are the User Interface (UI) elements that give your Web applications their look and feel. Web Forms are similar to Windows Forms in that they provide properties, methods, and events for the controls that are placed onto them. However, these UI elements render themselves in the appropriate markup language required by the request, e.g. HTML. If you use Microsoft Visual Studio .NET, you will also get the familiar drag-and-drop interface used to create your UI for your Web application.&lt;br /&gt;&lt;br /&gt;How does VB.NET/C# achieve polymorphism?&lt;br /&gt;By using Abstract classes/functions.&lt;br /&gt;Can you explain what inheritance is and an example of when you might use it? Inheritance is a fundamental feature of an object oriented system and it is simply the ability to inherit data and functionality from a parent object. Rather than developing new objects from scratch, new code can be based on the work of other programmers, adding only new features that are needed.&lt;br /&gt;How would you implement inheritance using VB.NET/C#? When we set out to implement a class using inheritance, we must first start with an existing class from which we will derive our new subclass. This existing class, or base class, may be part of the .NET system class library framework, it may be part of some other application or .NET assembly, or we may create it as part of our existing application. Once we have a base class, we can then implement one or more subclasses based on that base class. Each of our subclasses will automatically have all of the methods, properties, and events of that base class ? including the implementation behind each method, property, and event. Our subclass can add new methods, properties, and events of its own - extending the original interface with new functionality. Additionally, a subclass can replace the methods and properties of the base class with its own new implementation - effectively overriding the original behavior and replacing it with new behaviors. Essentially inheritance is a way of merging functionality from an existing class into our new subclass. Inheritance also defines rules for how these methods, properties, and events can be merged.&lt;br /&gt;&lt;br /&gt;Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines?&lt;br /&gt;The Application_Start event is guaranteed to occur only once throughout the lifetime of the application. It’s a good place to initialize global variables. For example, you might want to retrieve a list of products from a database table and place the list in application state or the Cache object.&lt;br /&gt;SessionStateModule exposes both Session_Start and Session_End events.&lt;br /&gt;&lt;br /&gt;How does VB.NET/C# achieve polymorphism?&lt;br /&gt;By using Abstract classes /functions&lt;br /&gt;Can you explain what inheritance is and an example of when you might use it?&lt;br /&gt;&lt;br /&gt;Inheritance is a fundamental feature of an object oriented system and it is simply the ability to inherit data and functionality from a parent object. Rather than developing new objects from scratch, new code can be based on the work of other programmers, adding only new features that are needed&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Which method do you use to redirect the user to another page without performing a round trip to the client?&lt;br /&gt; A) Server. Transfer ()&lt;br /&gt;&lt;br /&gt;What is the transport protocol you use to call a Web service SOAP (HTTP Protocol)&lt;br /&gt;&lt;br /&gt;Web service can only be written in .NET (false can also be written in Java)&lt;br /&gt;&lt;br /&gt;What does WSDL stand for? Web Service Definition Language (WSDL)&lt;br /&gt;&lt;br /&gt;To test a Web service you must create a windows application or Web application to consume this service? (FALSE)&lt;br /&gt;&lt;br /&gt;What tags do you need to add within the asp:datagrid tags to bind columns manually.&lt;br /&gt;Column tag and an ASP:databound tag&lt;br /&gt;&lt;br /&gt;How do you create a permanent cookie?&lt;br /&gt;This is a trick question. You can’t really set a cookie to permanent but you can use the maxAge property to set a time in seconds.&lt;br /&gt;&lt;br /&gt;Transport Protocols&lt;br /&gt;It is essential for the acceptance of Web Services that they are based on established Internet infrastructure. This in fact imposes the usage of of the HTTP, SMTP and FTP protocols based on the TCP/IP family of transports.&lt;br /&gt;&lt;br /&gt;Messaging Protocol&lt;br /&gt;The format of messages exchanged between Web Services clients and Web Services should be vendor neutral and should not carry details about the technology used to implement the service. Also, the message format should allow for extensions and different bindings to specific transport protocols. SOAP and ebXML Transport are specifications which fulfill these requirements. We expect that the W3C XML Protocol Working Group defines a successor standard.&lt;br /&gt;I believe you can say HTTP, SMTP, FTP, SOAP and still have the correct answer&lt;br /&gt;&lt;br /&gt;What are ASP.NET Web Forms? How is this technology different than what is available though ASP?&lt;br /&gt;Web Forms are the heart and soul of ASP.NET. Web Forms are the User Interface (UI) elements that give your Web applications their look and feel. Web Forms are similar to Windows Forms in that they provide properties, methods, and events for the controls that are placed onto them. However, these UI elements render themselves in the appropriate markup language required by the request, e.g. HTML. If you use Microsoft Visual Studio® .NET, you will also get the familiar drag-and-drop interface used to create your UI for your Web application.&lt;br /&gt;Web Forms are made up of two components: the visual portion (the ASPX file), and the code behind the form, which resides in a separate class file&lt;br /&gt;The Purpose of Web Forms&lt;br /&gt;Web Forms and ASP.NET were created to overcome some of the limitations of ASP. These new strengths include:&lt;br /&gt;Separation of HTML interface from application logic&lt;br /&gt;A rich set of server-side controls that can detect the browser and send out appropriate markup language such as HTML&lt;br /&gt;Less code to write due to the data binding capabilities of the new server-side .NET controls&lt;br /&gt;Event-based programming model that is familiar to Microsoft Visual Basic® programmers&lt;br /&gt;Compiled code and support for multiple languages, as opposed to ASP which was interpreted as Microsoft Visual Basic Scripting (VBScript) or Microsoft Jscript®&lt;br /&gt;Allows third parties to create controls that provide additional functionality&lt;br /&gt;&lt;br /&gt;How would you implement inheritance using VB.NET/C#?&lt;br /&gt;Implementing Inheritance&lt;br /&gt;When we set out to implement a class using inheritance, we must first start with an existing class from which we will derive our new subclass. This existing class, or base class, may be part of the .NET system class library framework, it may be part of some other application or .NET assembly, or we may create it as part of our existing application.&lt;br /&gt;Once we have a base class, we can then implement one or more subclasses based on that base class. Each of our subclasses will automatically have all of the methods, properties, and events of that base class – including the implementation behind each method, property, and event. Our subclass can add new methods, properties, and events of its own – extending the original interface with new functionality. Additionally, a subclass can replace the methods and properties of the base class with its own new implementation – effectively overriding the original behavior and replacing it with new behaviors.&lt;br /&gt;Essentially inheritance is a way of merging functionality from an existing class into our new subclass. Inheritance also defines rules for how these methods, properties, and events can be merged – including control over how they can be changed or replaced, and how the subclass can add new methods, properties, and events of its own. This is what we’ll explore as we go forward – what are these rules and what syntax do we use in VB.NET to make it all work.?&lt;br /&gt;&lt;br /&gt;Whats an assembly?&lt;br /&gt;Assemblies are the building blocks of .NET Framework applications; they form the fundamental unit of deployment, version control, reuse, activation scoping, and security permissions. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. An assembly provides the common language runtime with the information it needs to be aware of type implementations. To the runtime, a type does not exist outside the context of an assembly.&lt;br /&gt;&lt;br /&gt;Describe the difference between inline and code behind - which is best in a loosely coupled solution?&lt;br /&gt;Inline Versus Code-Behind Programming Models&lt;br /&gt;ASP.NET supports two modes of page development:&lt;br /&gt;Page logic code that is written inside blocks within an .aspx file and dynamically compiled the first time the page is requested on the server.&lt;br /&gt;Page logic code that is written within an external class that is compiled prior to deployment on a server and linked “behind” the .aspx file at run time.&lt;br /&gt;&lt;br /&gt;Explain what a diffgram is, and a good use for one?&lt;br /&gt;A DiffGram is an XML format that is used to identify current and original versions of data elements. The DataSet uses the DiffGram format to load and persist its contents, and to serialize its contents for transport across a network connection. When a DataSet is written as a DiffGram, it populates the DiffGram with all the necessary information to accurately recreate the contents, though not the schema, of the DataSet, including column values from both the Original and Current row versions, row error information, and row order.&lt;br /&gt;&lt;br /&gt;The DiffGram format that is used by the .NET Framework can also be used by other platforms to send and receive information to a .NET Framework application.&lt;br /&gt;When sending and retrieving a DataSet from an XML Web service, the DiffGram format is implicitly used. Additionally, when loading the contents of a DataSet from XML using the ReadXml method, or when writing the contents of a DataSet in XML using the WriteXml method, you can select that the contents be read or written as a DiffGram. For more information, see Loading a DataSet from XML and Writing a DataSet as XML Data.&lt;br /&gt;While the DiffGram format is primarily used by the .NET Framework as a serialization format for the contents of a DataSet, you can also use DiffGrams to modify data in tables in a Microsoft SQL Server™ 2000 database. For more information, see the XML for SQL Server 2000 Web Release 2&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Where would you use an iHTTPModule, and what are the limitations of anyapproach you might take in implementing one?&lt;br /&gt;One of ASP.NET’s most useful features is the extensibility of the HTTP pipeline, the path that data takes between client and server. You can use them to extend your ASP.NET applications by adding pre- and post-processing to each HTTP request coming into your application. For example, if you wanted custom authentication facilities for your application, the best technique would be to intercept the request when it comes in and process the request in a custom HTTP module.&lt;br /&gt;&lt;br /&gt;How many classes can a single .NET DLL contain?&lt;br /&gt;The simple answer off the top of my head is as many CLASSES as possible. In simple terms, .NET compiles the project into a DLL and as you know you can have as many classes in your project as your server can hold.&lt;br /&gt;&lt;br /&gt;Which method do you invoke on the DataAdapter control to load your generated&lt;br /&gt;dataset with data?&lt;br /&gt;System.Data.Common.DataAdapter.Fill(System.Data.DataSet);&lt;br /&gt;if my DataAdapter is sqlDataAdapter and my DataSet is dsUsers then it is called like so:&lt;br /&gt;sqlDataAdapter.Fill(dsUsers);&lt;br /&gt;source: .NET Framework General Reference&lt;br /&gt;&lt;br /&gt;Can you edit data in the Repeater control?&lt;br /&gt;Not sure. I would say NO during an Interview. No member function that supports editting in the Repeater Class.&lt;br /&gt;&lt;br /&gt;Which template must you provide, in order to display data in a Repeater&lt;br /&gt;control?&lt;br /&gt;itemTemplate&lt;br /&gt;source: .NET Framework General Reference&lt;br /&gt;&lt;br /&gt;How can you provide an alternating color scheme in a Repeater control?&lt;br /&gt;AlternatingItemTemplate Like the ItemTemplate element, but rendered for every other&lt;br /&gt;row (alternating items) in the Repeater control. You can specify a different appearance&lt;br /&gt;for the AlternatingItemTemplate element by setting its style properties.&lt;br /&gt;source: .NET Framework General Reference&lt;br /&gt;&lt;br /&gt;What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control?&lt;br /&gt;DataBind:Use this method to bind data from a source to a server control.&lt;br /&gt;This method is commonly used after retrieving a data set through a database query.&lt;br /&gt;source: .NET Framework General Reference&lt;br /&gt;you must set the DataMember which Gets or sets the specific table in the DataSource to bind to the control&lt;br /&gt;&lt;br /&gt;If any body has the important questions or Interview questions pls kindly help me , Iam having the Interview on Mar 15th&lt;br /&gt;&lt;br /&gt;What method do you use to explicitly kill a user s session?&lt;br /&gt;session.abandon&lt;br /&gt;&lt;br /&gt;Which two properties are on every validation control?&lt;br /&gt;ControlToValidate , ErrorMessage&lt;br /&gt;&lt;br /&gt;What tag do you use to add a hyperlink column to the DataGrid?&lt;br /&gt;&lt;br /&gt;Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to Display data in the combo box?&lt;br /&gt;DataValueField&lt;br /&gt;&lt;br /&gt;Which control would you use if you needed to make sure the values in two different controls Matched?&lt;br /&gt;CompareFieldValidator&lt;br /&gt;&lt;br /&gt;How do you turn off cookies for one page in your site?&lt;br /&gt;cookie.discard&lt;br /&gt;&lt;br /&gt;What property must you set, and what method must you call in your code,in order to bind the data from some data source to the Repeater control?&lt;br /&gt;Datasource property and databind() method Session.Abandon method can be used to explicitly kill the session.&lt;br /&gt;Which template must you provide, in order to display data in a Repeater control?&lt;br /&gt;ItemTemplate&lt;br /&gt;&lt;br /&gt;What tag do you use to add a hyperlink column to the DataGrid?&lt;br /&gt;&lt;br /&gt;What are the disadvantages of viewstate/what are the benefits?&lt;br /&gt; Disadvantages&lt;br /&gt;&lt;br /&gt;1)Performance becoz the viewstate is stored in the page itself, storing large values can cause the page to slowdown.It can carry only up to 10 KB of data very easily without causing any degraded perfomance. 2) As view state is stored in a hidden field on the page although it stores data in a hashed base64 encoded format, it can be tampered.&lt;br /&gt;&lt;br /&gt;Advantages :&lt;br /&gt; *No server resources are required&lt;br /&gt;*simple Implementation&lt;br /&gt;*Automatic retention of page &amp; view state&lt;br /&gt;&lt;br /&gt;what is the difference between sortedList and Hashtable ?&lt;br /&gt;Ans: Hash table and sorted list classes manage a collection of key value pairs the only difference between them is that in sorted list ,the values are sorted by keys and accesible by key as well as by index.&lt;br /&gt;&lt;br /&gt;What are the different parameter passing techniques c# supports?&lt;br /&gt;byvalue (default),byreference,out and paramarray&lt;br /&gt;&lt;br /&gt;What is the difference between arraylist and array classes ?&lt;br /&gt;Ans : arraylist size can be dynamically increased where as array size can’t be increased.&lt;br /&gt;&lt;br /&gt;what is the difference between ref and out parameters ?&lt;br /&gt;Ans : ref –&gt; inout&lt;br /&gt;out –&gt; Out&lt;br /&gt;Argument passed as ref must be initialized before it is passed to the method,where as incase of Out it’s not neccssary.but after a call to the method as an out parameter the variable must be initialized .out parameter can be used when you want to return more than one value from a method.&lt;br /&gt;&lt;br /&gt;If all the objects of a class need to be share the same variable, how must you declare that variable ?&lt;br /&gt;shared variables must declared static&lt;br /&gt;&lt;br /&gt;what is the difference between a class and a interface?&lt;br /&gt;You can instantiate a class but you cannot instantiate an interface,you can only offer the funtionality of that interface not the implementation.&lt;br /&gt;&lt;br /&gt;what is a singleton class?&lt;br /&gt;Ans : singleton class can be instantiated only once.&lt;br /&gt;&lt;br /&gt;what is the purpose of “base” keyword in c# ?&lt;br /&gt;There are two uses&lt;br /&gt;1) used to access a base class constructor&lt;br /&gt;2) used to access a base class member in the derived class.&lt;br /&gt;&lt;br /&gt;What is dynamic binding ? How is it different from static binding?&lt;br /&gt;With dynamic binding, the decision on which object method to call is made at runtime.Dynamic binding is polymorphism. with static binding, the decision to on which method to call is made at compile time.c# uses static binding as the default method dispatching mechanism.&lt;br /&gt;&lt;br /&gt;What is a virtual function ?&lt;br /&gt;is a function that you want to force derived classes to override. if a class has any overridden pure virtuals, it is an “abstract” class and you can’t create objects of that type.&lt;br /&gt;&lt;br /&gt;what are the differences between Datalist DataGrid and datarepeater ?&lt;br /&gt;Ans: DataList&lt;br /&gt;*Has table appearence by default&lt;br /&gt;*Has no autoformat option&lt;br /&gt;*has no default paging &amp; sorting options&lt;br /&gt;*can define separators between elements using template&lt;br /&gt;DataGrid&lt;br /&gt;*Has a grid appearence by default&lt;br /&gt;*has a autoformat option&lt;br /&gt;*has default paging and sorting&lt;br /&gt;*has no separator between elements&lt;br /&gt;DataRepeater&lt;br /&gt;simple,read-only output, has no built in support for selecting or editing items, has no DEFAULT APPEARENCE,&lt;br /&gt;has no default paging.&lt;br /&gt;&lt;br /&gt;What tag do you use to add a hyperlink column to the DataGrid?&lt;br /&gt;This code is useful if the hyper-link is in the datagrid &amp; If the user click on the link it redirect to the ABC.aspx page.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt; &lt;/script&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-8963613458018852799?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/8963613458018852799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=8963613458018852799' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/8963613458018852799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/8963613458018852799'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2007/10/c-for-all-interviews.html' title='C# for All Interviews.'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-7322502685351568169</id><published>2007-10-27T03:22:00.001-07:00</published><updated>2007-10-27T03:22:55.516-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='AutoEventWireup.'/><title type='text'>AutoEventWireup.</title><content type='html'>&lt;span style="font-family:arial;"&gt;Introduction&lt;br /&gt;ASP.NET supports two methods to author pages:&lt;br /&gt;In-line code&lt;br /&gt;Code-behind&lt;br /&gt;In-line code is code that is embedded directly within the ASP.NET page. Code-behind refers to code for your ASP.NET page that is contained within a separate class file. This allows a clean separation of your HTML from your presentation logic.&lt;br /&gt;When we use Microsoft Visual Studio .NET to create ASP.NET Web Forms, code-behind pages are the default method. In addition, Visual Studio .NET automatically performs precompilation for us when we build our solution.&lt;br /&gt;A little bit of background&lt;br /&gt;Directives in ASP.NET control the settings and properties of page and user control compilers. They can be included anywhere on a page, although it is standard to place them at the beginning. Directives are used in both .aspx files (ASP.NET pages) and .ascx files (user control pages). ASP.NET pages actually support eight different directives.&lt;br /&gt;@ Page&lt;br /&gt;@ Control&lt;br /&gt;@ Import&lt;br /&gt;@ Implements&lt;br /&gt;@ Register&lt;br /&gt;@ Assembly&lt;br /&gt;@ OutputCache&lt;br /&gt;@ Reference&lt;br /&gt;Page directives are the most commonly used directives, and are used to edit a wide variety of settings that control how the page parser and page compiler work. The following is a list of some of the more commonly used page directive attributes in ASP.NET.@ Page language="c#" Codebehind="WebForm1.aspx.cs"          AutoEventWireup="false" Inherits="TestWebApp.WebForm1"&lt;br /&gt;Language indicates the language in which the inline script code within the ASP.NET page is written (the code between &lt;% %&gt; tags). The value of this attribute can be C#, VB, or JS.&lt;br /&gt;Codebehind indicates the name of the file being used as the code supporting this ASP.NET page. This file should reflect the Language setting; that is, if the language being used is C#, the CodeBehind file should have a .cs extension and be written in C#.&lt;br /&gt;Inherits indicates a qualified class from which this ASP.NET page should inherit. Generally, this will be the name of the class described in the code-behind file.&lt;br /&gt;AutoEventWireup is a Boolean attribute that indicates whether the ASP.NET pages events are auto-wired.&lt;br /&gt;Note: In the above case, ASP.NET compiles the code-behind page on the fly. We have to note that this compilation step only occurs when the code-behind file is updated. Whether the file has been updated or not, well this is detected through a timestamp change.&lt;br /&gt;To get to the Real Thing&lt;br /&gt;The AutoEventWireup attribute may have a value of true or false. When an ASP.NET Web Application is created by using Microsoft Visual Studio .NET, the value of the AutoEventWireup attribute is set as false.&lt;br /&gt;We can specify the default value of the AutoEventWireup attribute in the following locations:&lt;br /&gt;The Machine.config file.&lt;br /&gt;The Web.config file.&lt;br /&gt;Individual Web Forms (.aspx files).&lt;br /&gt;Web User Controls (.ascx files)&lt;br /&gt;The value of the AutoEventWireup attribute can be declared in the &lt;pages&gt; section in the Machine.config file or the Web.config file, as follows:&lt;configuration&gt; &lt;system.web&gt; &lt;pages autoeventwireup="truefalse"&gt; &lt;/system.web&gt; &lt;/configuration&gt;&lt;br /&gt;If you make these changes in the Machine.config file, the changes affect all ASP.NET Web Forms on the computer. If you make these changes in the Web.config file, the changes affect only the application that the file belongs to. However, to make changes in the individual Web Form Only, we have to add the AutoEventWireup attribute to the @ Page directive, as shown above.&lt;br /&gt;Check out the Code&lt;br /&gt;When we create a new ASP.NET Web Application in Visual Studio .NET, as mentioned earlier, by default, the value of the AutoEventWireup attribute is set to false in the .aspx page and event handlers are automatically created. We can find this in the InitializeComponent method:this.Load += new System.EventHandler(this.Page_Load);&lt;br /&gt;The best way to see the working of this attribute would be:&lt;br /&gt;Declare a string variable msg as public in WebForm1.aspx.cs.&lt;br /&gt;In the HTML section of WebForm1.aspx, enter the following code in the &lt;head&gt; section: &lt;% Response.Write(msg); %&gt;&lt;br /&gt;In the Page_Load, you could enter a value for the variable msg declared.msg= "We are in Page_Load()";&lt;br /&gt;On running the application, you will get the message We are in Page_Load() [hereafter referred to as message]. Note: this is in the default case where the attribute is set to false.&lt;br /&gt;Now try commenting the event handler code for the Page_Load in the aspx.cs file; and set the AutoEventWireup attribute to false in the .aspx page. On running the application this time, you will not get the message.&lt;br /&gt;Now with the event handler code for the Page_Load in the aspx.cs file still commented; set the AutoEventWireup attribute to true in the .aspx page. On running the application this time, you will get the message.&lt;br /&gt;Reason: In the case where AutoEventWireup attribute is set to false (by default), event handlers are automatically required for Page_Load or Page_Init. However, when we set the value of the AutoEventWireup attribute to true, the ASP.NET runtime does not require events to specify event handlers like Page_Load or Page_Init.&lt;br /&gt;A thing to be kept in mind is that the AutoEventWireup attribute of the Page directive is set to true by default for the machine (check out the value of this attribute in the machine.config) but set to false by default for a .aspx page). So if it is missing, since by default it is true (i.e., at the machine level), the page framework calls page events automatically, specifically the Page_Init and Page_Load methods. In that case, no explicit Handles clause or delegate is needed.&lt;br /&gt;Performance Issues&lt;br /&gt;We must not set the value of the AutoEventWireup attribute to true if performance is a key consideration. If we set the value of the AutoEventWireup attribute to true, the ASP.NET page framework must make a call to the CreateDelegate method for every Web Form (.aspx page), and instead of relying on the automatic hookup, manually override the events from the page.&lt;br /&gt;Credits&lt;br /&gt;The whole thing was really simple but I just thought of posting it online; hope it helps someone. To give credit to where it is due. Most of the information was garnered from different places on the net. I've just complied them together and added a bit of my own to help folks along their way. I was also able to find an article related to this in MSDN Online (Article ID: 317690) but for VB.NET.&lt;br /&gt;About Aby Thomas Varghese&lt;br /&gt; &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-7322502685351568169?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/7322502685351568169/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=7322502685351568169' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/7322502685351568169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/7322502685351568169'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2007/10/autoeventwireup.html' title='AutoEventWireup.'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-8252488792814795442</id><published>2007-10-27T03:21:00.000-07:00</published><updated>2007-10-27T03:22:04.407-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='assembly'/><title type='text'>Assembly</title><content type='html'>&lt;span style="font-family:arial;"&gt;What is a satellite assembly? When you write a multilingual or multi-cultural application in .NET, and want to distribute the core application separately from the localized modules, the localized assemblies that modify the core application are called satellite assemblies.&lt;br /&gt;&lt;br /&gt;Assembly&lt;br /&gt;&lt;br /&gt;An assembly is the primary building block of a .NET Framework application. It is a collection of functionality that is built, versioned, and deployed as a single implementation unit (as one or more files). All managed types and resources are marked either as accessible only within their implementation unit, or as accessible by code outside that unit. .NET Assembly contains all the metadata about the modules, types, and other elements it contains in the form of a “manifest.” The CLR loves assemblies because differing programming languages are just perfect for creating certain kinds of applications. For example, COBOL stands for Common Business-Oriented Language because it’s tailor-made for creating &lt;/span&gt;&lt;a href="http://www.geekinterview.com/question_details/" target="_blank"&gt;&lt;span style="font-family:arial;"&gt;business&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; apps. However, it’s not much good for creating drafting programs. Regardless of what language you used to create your modules, they can all work together within one Portable Executable Assembly. There’s a hierarchy to the structure of .NET code. That hierarchy is “Assembly -&gt; Module -&gt; Type -&gt; Method."Assemblies can be static or dynamic. Static assemblies can include .NET Framework types (interfaces and classes), as well as resources for the assembly (bitmaps, JPEG files, resource files, and so on). Static assemblies are stored on disk in portable executable (PE) files. You can also use the .NET Framework to create dynamic assemblies, which are run directly from memory and are not saved to disk before execution. You can save dynamic assemblies to disk after they have executed.&lt;br /&gt;&lt;br /&gt;Manifest&lt;br /&gt;An assembly manifest contains all the metadata needed to specify the assembly's version requirements and security identity, and all metadata needed to define the scope of the assembly and resolve references to resources and classes. The assembly manifest can be stored in either a PE (Portable Executable) file (an .exe or .dll) with &lt;/span&gt;&lt;a href="http://www.geekinterview.com/question_details/" target="_blank"&gt;&lt;span style="font-family:arial;"&gt;Microsoft&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; intermediate language (MSIL) code or in a standalone PE (Portable Executable) file that contains only assembly manifest information.The following table shows the information contained in the assembly manifest. The first four items — the assembly name, version number, culture, and strong name information — make up the assembly's identity.Assembly name: A text string specifying the assembly's name.Version number: A major and minor version number, and a revision and build number. The common language runtime uses these numbers to enforce version policy.Culture: Information on the culture or language the assembly supports. This information should be used only to designate an assembly as a satellite assembly containing culture- or language-specific information. (An assembly with culture information is automatically assumed to be a satellite assembly.)Strong name information: The public key from the publisher if the assembly has been given a strong name.List of all files in the assembly: A hash of each file contained in the assembly and a file name. Note that all files that make up the assembly must be in the same directory as the file containing the assembly manifest.Type reference information: Information used by the runtime to map a type reference to the file that contains its declaration and implementation. This is used for types that are exported from the assembly.Information on referenced assemblies: A list of other assemblies that are statically referenced by the assembly. Each reference includes the dependent assembly's name, assembly metadata (version, culture, operating system, and so on), and public key, if the assembly is strong named.&lt;br /&gt;(A) What is Manifest?&lt;br /&gt;Assembly metadata is stored in Manifest.&lt;br /&gt;Manifest contains all the metadata needed to do the following things( See Figure Manifest View for more details) :&lt;br /&gt;√ Version of assembly&lt;br /&gt;√ Security identity&lt;br /&gt;√ Scope of the assembly&lt;br /&gt;√ resolve references to resources and classes.&lt;br /&gt;√ The assembly manifest can be stored in either a PE file (an .exe or .dll) with&lt;br /&gt;Microsoft intermediate language (MSIL) code or in a stand-alone PE file that&lt;br /&gt;contains only assembly manifest information.&lt;br /&gt; &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-8252488792814795442?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/8252488792814795442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=8252488792814795442' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/8252488792814795442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/8252488792814795442'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2007/10/assembly.html' title='Assembly'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-3735927226480972335</id><published>2007-10-27T03:20:00.001-07:00</published><updated>2007-10-27T03:21:16.413-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Asp'/><title type='text'>Asp</title><content type='html'>&lt;span style="font-family:arial;"&gt;ASP.NET provides a programming model and infrastructure that offers the necessary services for programmers to develop web-based applications. Because ASP.NET is part of the .NET Framework, programmers can use the managed Common Language Runtime (CLR) environment, type safety, inheritance, etc. to create web-based applications. You can develop your ASP.NET web-based applications in any .NET-compliant language, such as Visual Basic, Visual C#, or JScript.NET. ASP.NET code is compiled rather than interpreted, which permits early binding, strong typing, and just-in-time (JIT) compiling to native code.&lt;br /&gt;In ASP.NET, deployment is as simple as copying a component assembly to its desired location. ASP.NET configuration settings are stored in XML-based files, which are human-readable and -writable. ASP.NET automatically applies new configuration settings to web resources whenever it finds any changes to configuration files, without rebooting the server.&lt;br /&gt;&lt;br /&gt;There are two core programming models when developing an ASP.NET application:&lt;br /&gt;· Web forms&lt;br /&gt;· Web Services&lt;br /&gt;&lt;br /&gt;Web forms allow you to develop programmable forms-based web pages. A web forms page consists of two parts:&lt;br /&gt;· Visual elements: HTML elements and web forms controls.&lt;br /&gt;· User interface logic: Code that contains logic for interacting with the visual elements.&lt;br /&gt;In ASP.NET, business logic code (functional code) is separated from presentation code (HTML code). The visual elements are created in an .aspx file. The code is in a separate class file, called the code-behind class file (.aspx.vb or .aspx.cs), which consists of event handlers, initialization code, and other supporting code for the user interface in the aspx file.&lt;br /&gt;Web services provide the capability to exchange messages in a loosely coupled environment using standard data formats and protocols such as HTTP, XML, and SOAP. A web service is nothing but a programmable application component that provides some serviceable, useful functionality such as application logic, and is available to any number of potentially incongruent systems through the use of Internet standards such as XML and HTTP.&lt;br /&gt;ASP.NET provides solutions to some of the drawbacks that exist in ASP and offers a lot of additional benefits such as performance, scalability, deployment, security, output cache control, and web services infrastructure. Both ASP.NET and ASP run agreeably on an Internet Information Services (IIS) web server without interruption. Newly created ASP.NET pages with the file extension .aspx won't corrupt any existing ASP application. Files with an .aspx extension are processed by the ASP.NET runtime and files with an .asp extension are processed as usual by the ASP engine. ASP.NET offers total syntax and processing compatibility with ASP applications. The two systems have completely separate processing engines.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-3735927226480972335?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/3735927226480972335/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=3735927226480972335' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/3735927226480972335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/3735927226480972335'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2007/10/asp.html' title='Asp'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-2043916629827302164</id><published>2007-10-27T03:15:00.000-07:00</published><updated>2007-10-27T03:20:16.285-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Access Modifiers'/><title type='text'>Access Modifiers</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;span style="color:#ff0000;"&gt;Introduction&lt;br /&gt;&lt;/span&gt;Access modifiers decide accessibility of your class or class member. There are five accessibility levels in VB.NET. They are:&lt;br /&gt;Private&lt;br /&gt;Protected&lt;br /&gt;Friend (internal in C#)&lt;br /&gt;Protected friend (protected internal in C#)&lt;br /&gt;Public&lt;br /&gt;This article examines all them with examples. Even though the examples are in VB.NET, they can be easily ported to C# as most of the keywords are same.&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Public Access&lt;/span&gt;&lt;br /&gt;Many &lt;/span&gt;&lt;a href="http://www.dotnetbips.com/articles/255f31ac-a304-4063-ad2d-93a790417f3c.aspx" target="_new"&gt;&lt;span style="font-family:arial;"&gt;programmers&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; have habit of making everything public in their applications. This is fine for test &lt;/span&gt;&lt;a href="http://www.dotnetbips.com/articles/255f31ac-a304-4063-ad2d-93a790417f3c.aspx" target="_new"&gt;&lt;span style="font-family:arial;"&gt;applications&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; but when you are developing real life applications you should expose only the &lt;/span&gt;&lt;a href="http://www.dotnetbips.com/articles/255f31ac-a304-4063-ad2d-93a790417f3c.aspx" target="_new"&gt;&lt;span style="font-family:arial;"&gt;data&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; or functionality that is necessary by the user of your class. Classes and class members marked with Public access modifier are available in the same class, all the classes from the same project and to all other projects as well. This access specifier is least restrictive. Following is an example of public access specifier.&lt;br /&gt;Public Class Book&lt;br /&gt;Public Title As String&lt;br /&gt;End Class&lt;br /&gt;Public Class BookUser&lt;br /&gt;Public Sub SomeMethod()&lt;br /&gt;Dim x as &lt;/span&gt;&lt;a href="http://www.dotnetbips.com/articles/255f31ac-a304-4063-ad2d-93a790417f3c.aspx" target="_new"&gt;&lt;span style="font-family:arial;"&gt;new Book&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;()&lt;br /&gt;x.Title="VB.NET Programming"&lt;br /&gt;End Sub&lt;br /&gt;End Class&lt;br /&gt;Restricting access to classes and class members is not only a good programming practice but is also necessary to avoid any accidental misuse of your classes. Let us now discuss each of the remaining access modifiers in detail&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Private Access&lt;/span&gt;&lt;br /&gt;Private access modifier is applicable only to the members of a type. It restricts access to the members within the type itself. Consider following class:&lt;br /&gt;Public Class Book&lt;br /&gt;Private strTitle As String&lt;br /&gt;Public Property Title()&lt;br /&gt;Get&lt;br /&gt;Return strTitle&lt;br /&gt;End Get&lt;br /&gt;Set(ByVal Value)&lt;br /&gt;strTitle = Value&lt;br /&gt;End Set&lt;br /&gt;End Property&lt;br /&gt;End Class&lt;br /&gt;Here, the member variable strTitle is declared as private inside a class Book. Hence, it cannot be accessed from outside the class Book. Remember that private access modifier is applicable only to type members not to the type itself. This means you cannot declare a class as private but if your class is a nested then it can be declared as private. For example following declaration is invalid:&lt;br /&gt;Namespace n1&lt;br /&gt;Private Class Book&lt;br /&gt;End Class&lt;br /&gt;End Namespace&lt;br /&gt;However, following declaration of nested class is valid:&lt;br /&gt;Namespace n1&lt;br /&gt;Public Class Book&lt;br /&gt;Private Class NestedBook&lt;br /&gt;End Class&lt;br /&gt;End Class&lt;br /&gt;End Namespace&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="color:#3333ff;"&gt;Protected Access&lt;br /&gt;&lt;/span&gt;Private access modifier allows us to hide members from others but what if some one is inheriting from your class? In many cases you want that members of &lt;/span&gt;&lt;a href="http://www.dotnetbips.com/articles/255f31ac-a304-4063-ad2d-93a790417f3c.aspx" target="_new"&gt;&lt;span style="font-family:arial;"&gt;base class&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; should be available in derived class. This cannot be achieved with private modifier. Protected access specifier provide such access. The members marked with protected access modifier can be accessed in the same class and all the classes inherited from it but they are not available to other classes. Following is an example of using protected access specifier:&lt;br /&gt;Public Class Class1&lt;br /&gt;Protected age As Integer '... other code&lt;br /&gt;End Class&lt;br /&gt;Public Class Class2&lt;br /&gt;Inherits Class1&lt;br /&gt;Public Sub SomeMethod()&lt;br /&gt;age = 99 'OK&lt;br /&gt;End Sub&lt;br /&gt;End Class&lt;br /&gt;Public Class Class3&lt;br /&gt;Public Sub SomeMethod()&lt;br /&gt;Dim x As New Class1()&lt;br /&gt;x.age = 99 'ERROR&lt;br /&gt;End Sub End Class&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Friend Access&lt;/span&gt;&lt;br /&gt;Now going one step further let us assume that you want that all the classes from your project should be able to access to your class members but classes external to your project should not be able to do so. In this case neither private nor protected can help. Only your Friend can help you out. You guessed it! The friend access modifier is used to declare your class members such that any class from the same project will be able to access them but external classes cannot. Note that this access modifier is applicable to class definitions also. Following are the examples of using Friend members and classes.&lt;br /&gt;Assembly1.dll&lt;br /&gt;Public Class Class1&lt;br /&gt;Friend age As Integer '... other code&lt;br /&gt;End Class&lt;br /&gt;Public Class Class2&lt;br /&gt;Public Sub SomeMethod()&lt;br /&gt;Dim x As New Class1()&lt;br /&gt;x.age = 99 'OK&lt;br /&gt;End Sub&lt;br /&gt;End Class&lt;br /&gt;Assembly2.dll&lt;br /&gt;Public Class Class3&lt;br /&gt;Public Sub SomeOtherMethod()&lt;br /&gt;Dim x As New Class1()&lt;br /&gt;x.age = 99 'ERROR&lt;br /&gt;End Sub&lt;br /&gt;End Class&lt;br /&gt;When applied to class the class will be available only in the project in which it is declared.&lt;br /&gt;Assembly1.dll&lt;br /&gt;Friend Class Class3&lt;br /&gt;Public Sub SomeMethod()&lt;br /&gt;End Sub&lt;br /&gt;End Class&lt;br /&gt;Public Class Class4&lt;br /&gt;Public Sub SomeOtherMethod()&lt;br /&gt;Dim x As Class3 'OK&lt;br /&gt;End Sub&lt;br /&gt;End Class&lt;br /&gt;Assembly2.dll&lt;br /&gt;Dim x As TestComp1.n1.Class3 'ERROR&lt;br /&gt;Note: In C# internal keyword serves the same purpose as Friend keyword in VB.NET.&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Protected Friend Access&lt;/span&gt;&lt;br /&gt;Protected Friend access modifier is a combination of protected and friend access modifiers and allows access to class members in the same project and all the inherited types.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-2043916629827302164?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/2043916629827302164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=2043916629827302164' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/2043916629827302164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/2043916629827302164'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2007/10/introduction-access-modifiers-decide.html' title='Access Modifiers'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-7179633565713350489</id><published>2007-10-27T03:12:00.002-07:00</published><updated>2007-10-27T03:15:09.134-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Abstract class'/><title type='text'>Abstract class</title><content type='html'>&lt;span style="font-family:arial;"&gt;à Abstract class defines functionality that is implemented by one or more subclass.&lt;br /&gt;à Abstract class states “what” to do, rather than “how” to do.&lt;br /&gt;à Abstract class cannot be instantiated.&lt;br /&gt;à Abstract method “must” be overridden in derived class.&lt;br /&gt;à Abstract classes can provide all, some, or none of the actual implementation of a class.&lt;br /&gt;It provides a default code or stub for their child class.à It is useful while creating Component.&lt;br /&gt;Eg:abstract class shape{void draw() { }}&lt;br /&gt;class circle : shape&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;void draw()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Console.WriteLine(“Circle”);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;}&lt;br /&gt;class rectangle : shape&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;void draw()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Console.WriteLine(“rectangle”);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;}&lt;br /&gt;class triangle : shape&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;void draw()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Console.WriteLine(“triangle”);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;}&lt;br /&gt;static void main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;shape s;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;s = new circle();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;s.draw();s = new rectangle();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;s.draw();s = new triangle();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;s.draw();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;//Outputcirclerectangletriangle&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-7179633565713350489?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/7179633565713350489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=7179633565713350489' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/7179633565713350489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/7179633565713350489'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2007/10/abstract-class.html' title='Abstract class'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-1038357014527900628</id><published>2007-10-27T03:12:00.001-07:00</published><updated>2007-10-27T03:12:34.311-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='3-TierIntroduction'/><title type='text'>3-TierIntroduction</title><content type='html'>&lt;span style="font-family:arial;"&gt;Introduction:&lt;br /&gt;Application Architecture is the most important process of developing a good application. Some people tends to jump into coding without any architecture laid. Later we see those people changing the architecture and finally the &lt;/span&gt;&lt;a href="http://www.codersource.net/Programming_Application_Architecture_azam.aspx" target="_top"&gt;&lt;span style="font-family:arial;"&gt;application&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; had to be developed from the scratch with the correct architecture.&lt;br /&gt;In this article I will describe some details about how you can improve the architecture of you application. This article is targeted to the beginner's audience.&lt;br /&gt;Three layered approach:&lt;br /&gt;Three layered approach is the most common approach taken to build a &lt;/span&gt;&lt;a href="http://www.codersource.net/Programming_Application_Architecture_azam.aspx" target="_top"&gt;&lt;span style="font-family:arial;"&gt;web application&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;. In this approach application is divided into three layers.&lt;br /&gt;1) Database layer:&lt;br /&gt;The &lt;/span&gt;&lt;a href="http://www.codersource.net/Programming_Application_Architecture_azam.aspx" target="_top"&gt;&lt;span style="font-family:arial;"&gt;database&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; layer contains the tables, views and stored procedures which deals with the database. Usually this layer is created before making the other layers. Database layer is also the most important layer in the application architecture that's why most of the time is spent making the database layer solid so, the pillars of the application are strong and scalable. &lt;br /&gt;2) Business logic layer:&lt;br /&gt;Business logic layer contains the logic of the application. Like the database layer this layer is not exposed to the users directly but a user interface is provided to do so.&lt;br /&gt;3) &lt;/span&gt;&lt;a href="http://www.codersource.net/Programming_Application_Architecture_azam.aspx" target="_top"&gt;&lt;span style="font-family:arial;"&gt;Presentation&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; layer:&lt;br /&gt;The presentation layer is what the user actually sees. The html pages with some animation, the textboxes to take input and message boxes to alarm the user of the operation of his action. Presentation layer must be developed in such a way that it can be changed without doing any changes to the business or the database layer. This means that the presentation layer must be independent of the database and the business layers. Also the presentation layer should be made in such a way that changing the presentation to the user will take less time and effort.&lt;br /&gt;Tips about the database layer:&lt;br /&gt;1) Database layer as I pointed out earlier consists of a database, stored procedures and tables etc. Its always good to use stored procedures instead of Ad-Hoc queries. Ad-Hoc queries have the danger of SQL injections. Stored procedures on the other hand are more fast to execute and gives the performance boost. Since those procedures used often are executed from the cache.    &lt;br /&gt;2) It's very important that you normalize the database design. You should carefully map out the one-one, one-many, many-many &lt;/span&gt;&lt;a href="http://www.codersource.net/Programming_Application_Architecture_azam.aspx" target="_top"&gt;&lt;span style="font-family:arial;"&gt;relationships&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;. If normalization of the database is not handled carefully at the right time it can destroy the whole application and you may have to start from scratch.&lt;br /&gt;Tips about the Business layer: &lt;br /&gt;Business layer is where all the cool stuff happens. Usually for each subject (noun) in our specification we make a class for it. Suppose we are making an application where users and &lt;/span&gt;&lt;a href="http://www.codersource.net/Programming_Application_Architecture_azam.aspx" target="_top"&gt;&lt;span style="font-family:arial;"&gt;sends emails&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; and receive messages depending on if their email is sent or not.&lt;br /&gt;Some users tends to keep all the business logic in the presentation layer. This approach is very dangerous since user has a direct interaction with the business logic and it becomes easily hackable. That's why business logic is always kept in the class libraries this approach makes the separation of the user interaction with business logic and also makes the libraries portable so, it can be used by some other same type of application.&lt;br /&gt;Sometimes its also a good idea to map the class fields to the database column names. Suppose our application stored articles so, our mapping class will look something like this:&lt;br /&gt;public class ArticleDetails{&lt;br /&gt;public string Title;public string Url;public string Description;&lt;br /&gt;}&lt;br /&gt;The advantage of using this approach is that if you make changes in the Title, Url, Description than you will only need to send the object of the ArticleDetails class. This is also a good approach since if later you decide to add one field to your database due to bad design you can just add the same field to this class without having to play around with the business logic methods.&lt;br /&gt;Data Access Application Block:&lt;br /&gt;I also explicitly use &lt;/span&gt;&lt;a href="http://www.codersource.net/Programming_Application_Architecture_azam.aspx" target="_top"&gt;&lt;span style="font-family:arial;"&gt;Microsoft&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;.NET Data Access Application Block. Application Blocks makes the code simpler to understand and modify. Another good reason to use the application block is that it makes the code more readable if many coders are using the same block instead you find yourself reading every line of code written by the &lt;/span&gt;&lt;a href="http://www.codersource.net/Programming_Application_Architecture_azam.aspx" target="_top"&gt;&lt;span style="font-family:arial;"&gt;developer&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; and trying to understand his coding style of accessing the database.&lt;br /&gt;Messages Class:&lt;br /&gt;Just like the &lt;/span&gt;&lt;a href="http://www.codersource.net/Programming_Application_Architecture_azam.aspx" target="_top"&gt;&lt;span style="font-family:arial;"&gt;Data Access&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; Application Block every frequently used operation should be converted into a class for easier access. This includes Cache Block, Exception Handling Block etc. I will talk about the Messages class whose purpose is to alarm the user with a message about the operation that he has performed.&lt;br /&gt;Sometimes you want to print a message "Data has been successfully entered" if the transaction was successful and "&lt;/span&gt;&lt;a href="http://www.codersource.net/Programming_Application_Architecture_azam.aspx" target="_top"&gt;&lt;span style="font-family:arial;"&gt;Data&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; not entered" when, the transaction was a failure.&lt;br /&gt;Most of the developers perform this task by simply adding the if-else block in the presentation layer.&lt;br /&gt;bool isDataInserted = code.AddCodeSample(txtTitle,txtDescription);&lt;br /&gt;if(isDataInserted){&lt;br /&gt;// Data inserted successfully&lt;br /&gt;}else{&lt;br /&gt;// Data not inserted&lt;br /&gt;}&lt;br /&gt;This is a common approach used by developers to alarm the user of his operation. The problem with this approach is we are repeating code, meaning that each of the event that is inserted, deleted, updated, selecting, editing will have the same kind operation with a different message and we will be writing same 4-5 lines everywhere. Hence, its a good idea to make a class whose main purpose is to return messages. You can call this class DBMessages.&lt;br /&gt;// message returned after the insert operation&lt;br /&gt;public static string InsertMessages(bool isAdded){&lt;br /&gt;if(isAdded){&lt;br /&gt;return "Inserted";&lt;br /&gt;}else{&lt;br /&gt;return "Not Inserted";&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;// message returned after the Update Operation&lt;br /&gt;public static string UpdateMessages(bool isUpdated){&lt;br /&gt;if(isUpdated){&lt;br /&gt;return "Updated";&lt;br /&gt;}else{&lt;br /&gt;return "Not Updated";&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;As you see now you only have to write a single line of code to get the message. Here lblMessage is a label control.&lt;br /&gt;    lblMessage.Text = DBMessages.InsertMessages(isAdded);&lt;br /&gt;Using this approach you can also modify your message in one place and it will be changed everywhere.&lt;br /&gt;Tips for the Presentation Layer:&lt;br /&gt;Presentation layer design should always be consistent since this layer will be the one that will change often. Consistent design can come in the form of the Cascading Style Sheets and User Controls. By using Cascading Style Sheets your page has a consistent look and feel. A simple change in the Cascading Style Sheet will bring changes to all the pages without even touching them.&lt;br /&gt;User controls is another way for making sections that are easily changed. If on the other hand if they are not marked as a user controls we will have to go to each page and manually change it which, is a pain.  &lt;br /&gt;Conclusion:&lt;br /&gt;If the architecture of the application is made correct. The rest of the coding (Implementation Phase) becomes really easy.&lt;br /&gt; &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-1038357014527900628?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/1038357014527900628/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=1038357014527900628' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/1038357014527900628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/1038357014527900628'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2007/10/3-tierintroduction.html' title='3-TierIntroduction'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-3699639160689635853</id><published>2007-10-27T03:11:00.001-07:00</published><updated>2007-10-27T03:11:42.770-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Application Domains'/><title type='text'>Application Domains</title><content type='html'>&lt;span style="font-family:arial;"&gt;When we launch the Notepad program in Windows, the program executes inside of a container known as a process. We can launch multiple instances of Notepad, and each instance will run in a dedicated process. Using the Task Manager application, we can see a list of all processes currently executing in the system.&lt;br /&gt;A process contains the executable code and data of a program inside memory it has reserved from the operating system. There will be at least one thread executing instructions inside of the process, and in most cases there are multiple threads. If the program opens any files or other resources, those resources will belong to the process.&lt;br /&gt;A process is also boundary. Erroneous code inside of a process cannot corrupt areas outside of the current process. It is easy to communicate inside of a process, but special techniques are required to communicate from one process to another. Each process also runs under a specific security context which can dictate what the process can do on the machine and network. &lt;br /&gt;A process is the smallest unit of isolation available on the Windows operating system. This could pose a problem for an ISP who wants to host hundreds of ASP.NET applications on a single server. The ISP will want to isolate each ASP.NET application to prevent one application from interfering with another company’s application on the same server, but the relative cost of launching and executing a process for hundreds of applications may be prohibitive.&lt;br /&gt;Introducing the Application Domain&lt;br /&gt;.NET introduces the concept of an application domain, or AppDomain. Like a process, the AppDomain is both a container and a boundary. The .NET runtime uses an AppDomain as a container for code and data, just like the operating system uses a process as a container for code and data. As the operating system uses a process to isolate misbehaving code, the .NET runtime uses an AppDomain to isolate code inside of a secure boundary.&lt;br /&gt;Note, however, that the application domain is not a secure boundary when the application runs with full trust. Applications running with full trust can execute native code and circumvent all security checks by the .NET runtime. ASP.NET applications run with full trust by default.&lt;br /&gt;An AppDomain belongs to only a single process, but single process can hold multiple AppDomains. An AppDomain is relatively cheap to create (compared to a process), and has relatively less overhead to maintain than a process. For these reasons, an AppDomain is a great solution for the ISP who is hosting hundreds of applications. Each application can exist inside an isolated AppDomain, and many of these AppDomains can exist inside of a single process – a cost savings.&lt;br /&gt;AppDomains And You&lt;br /&gt;You’ve created two ASP.NET applications on the same server, and have not done any special configuration. What is happening?&lt;br /&gt;A single ASP.NET worker process will host both of the ASP.NET applications. On Windows XP and Windows 2000 this process is named aspnet_wp.exe, and the process runs under the security context of the local ASPNET account. On Windows 2003 the worker process has the name w3wp.exe and runs under the NETWORK SERVICE account by default.&lt;br /&gt;An object lives in one AppDomain. Each ASP.NET application will have it’s own set of global variables: Cache, Application, and Session objects are not shared. Even though the code for both of the applications resides inside the same process, the unit of isolation is the .NET AppDomain. If there are classes with shared or static members, and those classes exist in both applications, each AppDomain will have it’s own copy of the static fields – the data is not shared. The code and data for each application is safely isolated and inside of a boundary provided by the AppDomain&lt;br /&gt;In order to communicate or pass objects between AppDomains, you’ll need to look at techniques in .NET for communication across boundaries, such as .NET remoting or web services.&lt;br /&gt;Note again: the one caveat to the idea of an AppDomain as a boundary is that ASP.NET applications will run with full trust by default. Fully trusted code can execute native code, and native code can essentially have access to anything inside the process. You’ll need to run applications with partial trust to restrict access to unmanged code and verify all managed code to secure AppDomains.&lt;br /&gt;Shadow Copies and Restarts&lt;br /&gt;Once an assembly is loaded into an AppDomain, there is no way to remove the assembly from the AppDomain. It is possible, however, to remove an AppDomain from a process.&lt;br /&gt;If you copy an updated dll into an application’s bin subdirectory, the ASP.NET runtime recognizes there is new code to execute. Since ASP.NET cannot swap the dll into the existing AppDomain , it starts a new AppDomain. The old application domain is “drain stopped”, that is, existing requests are allowed to finish executing, and once they are all finished the AppDomain can unload. The new AppDomain starts with the new code and begins taking all new requests.&lt;br /&gt;Typically, when a dll loads into a process, the process locks the dll and you cannot overwrite the file on disk. However, AppDomains have a feature known as Shadow Copy that allows assemblies to remain unlocked and replaceable on disk.&lt;br /&gt;The runtime initializes ASP.NET with Shadow Copy enabled for the bin directory. The AppDomain will copy any dll it needs from the bin directory to a temporary location before locking and loading the dll into memory. Shadow Copy allows us to overwrite any dll in the bin directory during an update without taking the web application offline.&lt;br /&gt;Master Of Your Domain&lt;br /&gt;Application domains replace the OS process as the unit of isolation for .NET code. An understanding of application domains will give you an idea of the work taking place behind the scenes of an ASP.NET application. Using the CurrentDomain property of the AppDomain class you can inspect properties about the AppDomain your code is executing in, including the Shadow Copy settings we discussed in this article&lt;br /&gt; &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-3699639160689635853?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/3699639160689635853/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=3699639160689635853' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/3699639160689635853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/3699639160689635853'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2007/10/application-domains.html' title='Application Domains'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-2942802945341715439</id><published>2007-10-27T03:08:00.000-07:00</published><updated>2007-10-27T03:09:18.982-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ado.net'/><title type='text'>ADO.Net</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;ADO.NET Overview&lt;br /&gt;Most applications handle data, whether in the form of a database, text file, spreadsheet, whatever — the majority of modern day programs need access to an information store.&lt;br /&gt;Now when Visual Basic 3.0 came along with its new and groovy data access capabilities, people were amazed. Suddenly a mass of Access desktop applications sprung up and the world was at peace.&lt;br /&gt;Today, people are taking advantage of the latest data access technologies to improve scalability and boost interoperability. But it all needs speeding up - faster, faster!&lt;br /&gt;And there's a chance that the tools we use today just won't be able to keep up with this demand. That's why with the .NET move, Microsoft have unveiled ADO.NET — its "evolutionary" step in data access technologies that promises the world and infinitely more.&lt;br /&gt;But what exactly does it deliver?&lt;br /&gt;ADO.NET brings along with it four, much-publicised advantages:&lt;br /&gt;Interoperability - All data in ADO.NET is transported in XML format, meaning it's simply a structured text document that can be read by anyone on any platform.&lt;br /&gt;Scalability - The client/server model is out. ADO.NET promotes the use of disconnected datasets, with automatic connection pooling bundled as part of the package.&lt;br /&gt;Productivity - You can't just pick it up and run, but ADO.NET can certainly improve your overall development time. For example, "Typed DataSets" help you work quicker and produce more bug-free code.&lt;br /&gt;Performance - Because ADO.NET is mainly about disconnected datasets, the database server is no longer a bottleneck and hence applications should incur a performance boost&lt;br /&gt;In ADO.NET, functionality is split into two key class groups — content components and managed-provider components.&lt;br /&gt;The content components essentially hold actual data and include the DataSet, DataTable, DataView, DataRow, DataColumn and DataRelation classes.&lt;br /&gt;We also have the managed-provider components, which actually talk to the database to assist in data retrievals and updates. Such objects include the connection, command and data reader.&lt;br /&gt;Also, the managed-provider components are split into two key groups — one designed for regular data sources, with another finely tuned specifically for SQL Server.&lt;br /&gt;ADO.NET bundles with a bunch of content components. The most important are:&lt;br /&gt;DataSet — This is a lot like the old Recordset object, except that it can hold multiple "tables" of data. You can also setup internal data constraints and relationships.&lt;br /&gt;DataView — The DataView is similar to a regular database view. You can essentially use this object to filter tables inside the DataSet object.&lt;br /&gt;Currently, there are two key sets of managed provider components — one designed for general data access (in System.Data.OleDb) and one fine-tuned for SQL Server (in System.Data.SqlClient).&lt;br /&gt;Both of these comply with the standard data implementations defined in the System.Data.Common namespace.&lt;br /&gt;So, what are the key managed-provider components?&lt;br /&gt;Connection — OleDbConnection + SQLConnection — Like classic ADO, this object implements properties such as the connection string and state. We also have the typical .Open and .Close, plus .BeginTransaction returning an object to control a database transaction. Note that you no longer have a .Execute method on the Connection object.&lt;br /&gt;Command — OleDbCommand + SqlCommand — This is the pipeline to the backend data. You can use the command to either .ExecuteNonQuery, which will action an SQL statement (such as a DELETE command) upon the data — or .ExecuteReader, which links straight in to the Data Reader object.&lt;br /&gt;Data Reader — OleDbDataReader + SqlDataReader — This object essentially takes a stream of data from the Command object and allows you to read it. It's like a forward-only Recordset and is very efficient. However this uses a server-side cursor, so you should avoid it too much as it naturally requires an open connection.&lt;br /&gt;Data Adapter — OleDbDataAdapter + SqlDataAdapter — The Data Adapter object provides an all-in-one stop for your data. It essentially serves as a middle man, going through your connection to retrieve data, then passing that into a DataSet. You can then pass the DataSet back to the Data Adapter, which will go and update the database. The SQL statements for each command are specified in the InsertCommand, UpdateCommand, InsertCommand and DeleteCommand properties.&lt;br /&gt;Sample code using each of these objects will be given later&lt;br /&gt;As more and more companies move toward XML as the standard for cross-platform communication, Microsoft is making an active effort to use this structure to power many of its new technologies.&lt;br /&gt;One application of this is in ADO.NET — where literally all data is intrinsically stored in such a format.&lt;br /&gt;And you can easily tap into this store by getting your information into a DataSet — then accessing the.ReadXml, .WriteXml and .GetXml functions.&lt;br /&gt;In addition, you can parse XML programmatically using the System.Xml.XmlDocument object.&lt;br /&gt;&lt;br /&gt; &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6593678539754314140-2942802945341715439?l=get-yoursolution.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://get-yoursolution.blogspot.com/feeds/2942802945341715439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6593678539754314140&amp;postID=2942802945341715439' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/2942802945341715439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6593678539754314140/posts/default/2942802945341715439'/><link rel='alternate' type='text/html' href='http://get-yoursolution.blogspot.com/2007/10/adonet.html' title='ADO.Net'/><author><name>Hi</name><uri>http://www.blogger.com/profile/11792862754668750943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6593678539754314140.post-8675976611049097175</id><published>2007-10-27T02:55:00.001-07:00</published><updated>2007-10-27T03:00:30.344-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Asp.net'/><title type='text'>About C#.Net</title><content type='html'>&lt;span style="font-family:arial;"&gt;Q1. What are all the different access specifiers in C#? Access modifiers are PublicPrivateInternalProtected           &lt;br /&gt;Q2. What are delegates? Delegates are just like function pointers in C++, except that they are much safer to use due to their type safety. A delegate defines a function without implementing it and another class then provides the implementation. Events in C# are based on delegates, with the originator defining one or more callback functions.&lt;br /&gt;Q3. What do you mean by type safety? Type-safe code accesses only the memory locations it is authorized to access. (For this discussion, type safety specifically refers to memory type safety and should not be confused with type safety in a broader respect.) For example, type-safe code cannot read values from another object's private fields. It accesses types only in well-defined, allowable ways.During just-in-time (JIT) compilation, an optional verification process examines the metadata and Microsoft intermediate language (MSIL) of a method to be JIT-compiled into native machine code to verify that they are type safe.&lt;br /&gt;Q4. What is function overloading and function overriding with example?&lt;br /&gt;Function overloading – function with same name with diff. signature                                        in same class&lt;br /&gt;Overloading allows a class to have several different methods of the same name as long as they accept a different list of parameters. It isn't the name of the parameters that matter either—it is their data types. Collectively, the data types of the parameters are called the method signature.&lt;br /&gt;Private intQOH As IntegerPublic ReadOnly Property QOH() As Integer  Get      Return intQOH    End Get  End Property&lt;br /&gt;  Public Sub Buy()    intQOH += 1  End Sub&lt;br /&gt;This code simply adds a new property and method to the class. The method allows us to indicate that we've purchased a new copy of the book. It is somewhat limiting in that it only indicates the purchase of a single copy, so we might want another version of the method that accepts a parameter. Add the following code to the class:&lt;br /&gt;Public Sub Buy(ByVal Quantity As Integer)intQOH += QuantityEnd Sub&lt;br /&gt;overriding is the preferred method of altering or replacing a method on a base class because overriding is done with the permission of the base class designer.&lt;br /&gt;In order to specify that a method can be overridden, that is, altered or replaced, by a subclass, the author of the method must use the Overridable keyword as part of the method declaration.&lt;br /&gt;For instance, as we design the Book class we may realize that some subclasses in the future may need a different pricing scheme. To enable this, we can add the Overridable keyword to the Price declaration in the Book class:&lt;br /&gt;  Public Overridable Property Price() As Single    Get      Return sngPrice    End Get&lt;br /&gt;   Set(ByVal Value As Single      sngPrice = Value    End Set  End Property&lt;br /&gt;This doesn't change any behavior in either the Book or UsedBook classes as they stand, but it does mean that the UsedBook class can now implement its own version of the Price property if we so desire. With used books, we may want to lower the price after they've been on the shelf for a while, so the Price implementation might be different. In the UsedBook class, add the following code:&lt;br /&gt;  Public Overrides Property Price() As Single    Get&lt;br /&gt;      If DateDiff(DateInterval.Day, dtPurchased, Now) &gt; 365 Then&lt;br /&gt;        Return MyBase.Price / 2&lt;br /&gt;      Else&lt;br /&gt;        Return MyBase.Price&lt;br /&gt;      End If&lt;br /&gt;    End Get&lt;br /&gt;    Set(ByVal Value As Single)&lt;br /&gt;      MyBase.Price = Value&lt;br /&gt;    End Set&lt;br /&gt;  End Property&lt;br /&gt;First, notice the use of the Overrides keyword in the method declaration. This is required to cause overriding to occur. Also, notice that we are altering the behavior of the existing method, not completely replacing it. The new code makes use of the MyBase keyword to invoke the Price property of the base class to store and retrieve the price value. In fact, storing the price value is handled entirely by the base class:&lt;br /&gt;    Set(ByVal Value As Single)&lt;br /&gt;      MyBase.Price = Value&lt;br /&gt;    End Set&lt;br /&gt;The overridden base method must have the same signature as the override method.&lt;br /&gt;Q5. How do we override a function in c#? Write an example. &lt;br /&gt;using System;&lt;br /&gt;class TestClass&lt;br /&gt;{&lt;br /&gt;   public class Dimensions&lt;br /&gt;   {&lt;br /&gt;      public const double pi = Math.PI;&lt;br /&gt;      protected double x, y;&lt;br /&gt;      public Dimensions()&lt;br /&gt;      {&lt;br /&gt;      }&lt;br /&gt;      public Dimensions (double x, double y)&lt;br /&gt;      {&lt;br /&gt;         this.x = x;&lt;br /&gt;         this.y = y;&lt;br /&gt;      }&lt;br /&gt;      public virtual double Area()&lt;br /&gt;      {&lt;br /&gt;         return x*y;&lt;br /&gt;      }&lt;br /&gt;   }&lt;br /&gt;   public class Circle: Dimensions&lt;br /&gt;   {&lt;br /&gt;      public Circle(double r): base(r, 0)&lt;br /&gt;      {&lt;br /&gt;      }&lt;br /&gt;      public override double Area()&lt;br /&gt;      {&lt;br /&gt;         return pi * x * x;&lt;br /&gt;      }&lt;br /&gt;   }&lt;br /&gt;  class Sphere: Dimensions&lt;br /&gt;   {&lt;br /&gt;      public Sphere(double r): base(r, 0)&lt;br /&gt;      {&lt;br /&gt;      }&lt;br /&gt;      public override double Area()&lt;br /&gt;      {&lt;br /&gt;         return 4 * pi * x * x;&lt;br /&gt;      }&lt;br /&gt;   }&lt;br /&gt;   class Cylinder: Dimensions&lt;br /&gt;   {&lt;br /&gt;      public Cylinder(double r, double h): base(r, h)&lt;br /&gt;      {&lt;br /&gt;      }&lt;br /&gt;      public override double Area()&lt;br /&gt;      {&lt;br /&gt;         return 2*pi*x*x + 2*pi*x*y;&lt;br /&gt;      }&lt;br /&gt;   }&lt;br /&gt;   public static void Main() &lt;br /&gt;   {&lt;br /&gt;      double r = 3.0, h = 5.0;&lt;br /&gt;      Dimensions c = new Circle(r);&lt;br /&gt;      Dimensions s = new Sphere(r);&lt;br /&gt;      Dimensions l = new Cylinder(r, h);&lt;br /&gt;      // Display results:&lt;br /&gt;      Console.WriteLine("Area of Circle   = {0:F2}", c.Area());&lt;br /&gt;      Console.WriteLine("Area of Sphere   = {0:F2}", s.Area());&lt;br /&gt;      Console.WriteLine("Area of Cylinder = {0:F2}", l.Area());&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;Q6. If there are two interfaces having a same function which have same signature and we are implementing both the interfaces in C# class then how will we define the methods in our C# class?  Interface name dot method name will give you the access to particular method.&lt;br /&gt;Public interface I1{&lt;br /&gt;      Public int ABC{&lt;br /&gt;                               }&lt;br /&gt;}&lt;br /&gt;Public interface I2{&lt;br /&gt;      Public int ABC{&lt;br /&gt;                           }&lt;br /&gt;}&lt;br /&gt;public class MNC:I1,I2{&lt;br /&gt;{&lt;br /&gt;      public int I1.ABC{&lt;br /&gt;}&lt;br /&gt;public int I2.ABC{&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;Q7. How to get the name of a person who gets 2nd maximum salary in an Organization from Employee table?&lt;br /&gt;select empname,salary from employee a&lt;br /&gt;where &amp;amp;n=(select count(*) from employee b&lt;br /&gt;where b.salary&gt;a.salary)&lt;br /&gt;Q8. How to get the name,numbers of a person who had more than one phones?&lt;br /&gt;select empname,phoneno from employee e,employeephone p where e.empid in (select empid&lt;br /&gt;from employeephone  group by empid having count(empid)&gt;1) and e.empid=p.empid&lt;br /&gt;Q9. What is diff protected and protected internal and usage?&lt;br /&gt;Protected keyword is a member access modifier. A protected member is accessible from within the class in which it is declared, and from within any class derived from the class that declared this member.&lt;br /&gt;A protected member of a base class is accessible in a derived class only if the access takes place through the derived class type. For example, consider the following code segment:&lt;br /&gt;class A&lt;br /&gt;{&lt;br /&gt;   protected int x = 123;&lt;br /&gt;}&lt;br /&gt;class B : A&lt;br /&gt;{&lt;br /&gt;   void F()&lt;br /&gt;  {&lt;br /&gt;      A a = new A(); &lt;br /&gt;      B b = new B(); &lt;br /&gt;      a.x = 10;   // Error&lt;br /&gt;      b.x = 10;   // OK&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;Protected Internal – mainly used for use of whole assembly. And derived class. Generally we are not going to use. &lt;br /&gt;Q10. we defined one page_load event in aspx page and same page_load event in code behind how will program run?&lt;br /&gt;Code behind code will run first.&lt;br /&gt;Q11. one scenario was given of building, office, rooms, furniture, chairs etc. he wanted the class diagram for this.   &lt;br /&gt;Q12. Diff between props and methods when to use what?&lt;br /&gt;Properties are used to set and get a value to a object.Methods are used to implement your business logic.&lt;br /&gt;Q13. one array is there indexed 1 to 10.holding values 1 to 10.&lt;br /&gt;now we make one value 0.now shuffle the array.now he wants the original value that was in place of 0.?&lt;br /&gt;For I = o to ubound(arrayname)&lt;br /&gt;If I &lt;&gt; arrayname(i) then&lt;br /&gt;  Msgbox missed value is + I&lt;br /&gt;End if&lt;br /&gt;Next&lt;br /&gt;Q14. you  have a dataset 100 get records from 5 – 20 from it without for loop ?&lt;br /&gt;public &lt;/span&gt;&lt;a href="ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpref/html/frlrfsystemdatadatarowclasstopic.htm"&gt;&lt;span style="font-family:arial;"&gt;DataRow&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;[] Select(&lt;br /&gt;   &lt;/span&gt;&lt;a href="ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpref/html/frlrfsystemstringclasstopic.htm"&gt;&lt;span style="font-family:arial;"&gt;string&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; filterExpression,&lt;br /&gt;   &lt;/span&gt;&lt;a href="ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpref/html/frlrfsystemstringclasstopic.htm"&gt;&lt;span style="font-family:arial;"&gt;string&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; sort,&lt;br /&gt;   &lt;/span&gt;&lt;a href="ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpref/html/frlrfsystemdatadataviewrowstateclasstopic.htm"&gt;&lt;span style="font-family:arial;"&gt;DataViewRowState&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; recordStates&lt;br /&gt;);&lt;br /&gt;here rowstate will be Added  CurrentRows  Deleted  ModifiedCurrent  ModifiedOriginal  None  OriginalRows  Unchanged&lt;br /&gt;example&lt;br /&gt;private static void GetRowsByFilter()&lt;br /&gt;{&lt;br /&gt;   &lt;br /&gt;    DataTable customerTable = new DataTable( "Customers" );&lt;br /&gt;    // Add columns&lt;br /&gt;    customerTable.Columns.Add( "id", typeof(int) );&lt;br /&gt;    customerTable.Columns.Add( "name", typeof(string) );&lt;br /&gt;    // Set PrimaryKey&lt;br /&gt;    customerTable.Columns[ "id" ].Unique = true;&lt;br /&gt;    customerTable.PrimaryKey = new DataColumn[] { customerTable.Columns["id"] };&lt;br /&gt;    // Add ten rows&lt;br /&gt;    for( int id=1; id&lt;=10; id++ )&lt;br /&gt;    {&lt;br /&gt;        customerTable.Rows.Add(&lt;br /&gt;            new object[] { id, string.Format("customer{0}", id) } );&lt;br /&gt;    }&lt;br /&gt;    customerTable.AcceptChanges();&lt;br /&gt;    // Add another ten rows&lt;br /&gt;    for( int id=11; id&lt;=20; id++ )&lt;br /&gt;    {&lt;br /&gt;        customerTable.Rows.Add(&lt;br /&gt;            new object[] { id, string.Format("customer{0}", id) } );&lt;br /&gt;    }&lt;br /&gt;    string strExpr;&lt;br /&gt;    string strSort;&lt;br /&gt;   &lt;br /&gt;    strExpr =  “id between 5 to 20 “; \\"id &gt; 5";&lt;br /&gt;    // Sort descending by column named CompanyName.&lt;br /&gt;    strSort = "name DESC";&lt;br /&gt;    // Use the Select method to find all rows matching the filter.&lt;br /&gt;    DataRow[] foundRows =&lt;br /&gt;        customerTable.Select( strExpr, strSort, DataViewRowState.Added );&lt;br /&gt;   &lt;br /&gt;    PrintRows( foundRows, "filtered rows" );&lt;br /&gt;    foundRows = customerTable.Select();&lt;br /&gt;    PrintRows( foundRows, "all rows" );&lt;br /&gt;}&lt;br /&gt;private static void PrintRows( DataRow[] rows, string label )&lt;br /&gt;{&lt;br /&gt;    Console.WriteLine( "\n{0}", label );&lt;br /&gt;    if( rows.Length &lt;= 0 )&lt;br /&gt;    {&lt;br /&gt;        Console.WriteLine( "no rows found" );&lt;br /&gt;        return;&lt;br /&gt;    }&lt;br /&gt;    foreach( DataRow r in rows )&lt;br /&gt;    {&lt;br /&gt;        foreach( DataColumn c in r.Table.Columns )&lt;br /&gt;        {&lt;br /&gt;            Console.Write( "\t {0}", r[c] );&lt;br /&gt;        }&lt;br /&gt;        Console.WriteLine();&lt;br /&gt;    }&lt;br /&gt;} &lt;br /&gt;Q15. What is the difference between remoting &amp;amp; web services ? &lt;br /&gt;  &lt;/span&gt;&lt;a name="table01"&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;ASP.NET Web Services&lt;br /&gt;.NET Remoting&lt;br /&gt;Protocol&lt;br /&gt;Can be accessed only over HTTP&lt;br /&gt;Can be accessed over any protocol (including TCP, HTTP, SMTP and so on)&lt;br /&gt;State Management&lt;br /&gt;Web services work in a stateless environment&lt;br /&gt;Provide support for both stateful and stateless environments through Singleton and SingleCall objects&lt;br /&gt;Type System&lt;br /&gt;Web services support only the datatypes defined in the XSD type system, limiting the number of objects that can be serialized.&lt;br /&gt;Using binary communication, .NET Remoting can provide support for rich type system&lt;br /&gt;Interoperability&lt;br /&gt;Web services support interoperability across platforms, and are ideal for heterogeneous environments.&lt;br /&gt;.NET remoting requires the client be built using .NET, enforcing homogenous environment.&lt;br /&gt;Reliability&lt;br /&gt;Highly reliable due to the fact that Web services are always hosted in IIS&lt;br /&gt;Can also take advantage of IIS for fault isolation. If IIS is not used, application needs to provide plumbing for ensuring the reliability of the application.&lt;br /&gt;Extensibility&lt;br /&gt;Provides extensibility by allowing us to intercept the SOAP messages during the serialization and deserialization stages.&lt;br /&gt;Very extensible by allowing us to customize the different components of the .NET remoting framework.&lt;br /&gt;Ease-of-Programming&lt;br /&gt;Easy-to-create and deploy.&lt;br /&gt;Complex to program.&lt;br /&gt;&lt;br /&gt;Q16.what do you mean by Singleton and SingleCall objects  where you will use?    Q17.How to Intercepting soap messages in a webservices?   Q18.What do you mean by serialization and deserialization?   Q19. I have one XML data in cache in a ASP page. This XML file has to be saved to the database. I have a routine to save this xml. The question is – after saving the xml data it has to be cleared from the cache ? &lt;br /&gt;For this we have two solutions&lt;br /&gt;by using Cache Object&lt;br /&gt;using Outputcache page directives by passing parameters&lt;br /&gt;&lt;br /&gt;Using Cache Object.&lt;br /&gt;The System.Web.Caching namespace provides classes for caching frequently used data on the server. This includes the &lt;/span&gt;&lt;a href="ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpref/html/frlrfsystemwebcachingcacheclasstopic.htm"&gt;&lt;span style="font-family:arial;"&gt;Cache&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; class, a dictionary that allows you to store arbitrary data objects, such as hash tables and data sets. It also provides expiration functionality for those objects, and methods that allow you to add and removed the objects. You can also add the objects with a dependency upon other files or cache entries, and perform a callback to notify your application when an object is removed from the Cache.&lt;br /&gt;.add().remove()&lt;br /&gt;Cache.Insert("MyData1", connectionString, new CacheDependency(Server.MapPath(&lt;/span&gt;&lt;a href="file://myServer/myConfig.xml"&gt;&lt;span style="font-family:arial;"&gt;\\myServer\myConfig.xml&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;))); &lt;br /&gt;Using OutputCache Page directive&lt;br /&gt;&lt;%@ OutputCache Duration="#ofseconds" Location="Any  Client  Downstream  Server  None" Shared="True  False" VaryByControl="controlname" VaryByCustom="browser  customstring" VaryByHeader="headers" VaryByParam="parametername" %&gt;&lt;br /&gt;Duration&lt;br /&gt;The time, in seconds, that the page or user control is cached. Setting this attribute on a page or user control establishes an expiration policy for HTTP responses from the object and will automatically cache the page or user control output.&lt;br /&gt;Note   This attribute is required. If you do not include it, a parser error occurs.&lt;br /&gt;Location&lt;br /&gt;One of the OutputCacheLocation enumeration values. The default is Any.&lt;br /&gt;CAUTION   This attribute is not supported for @ OutputCache directives included in user controls (.ascx files).&lt;br /&gt;Shared&lt;br /&gt;A Boolean value that determines whether user control output can be shared with multiple pages. The default is false. For more information, see the Remarks section.&lt;br /&gt;Note   This attribute is not supported for @ OutputCache directives included in ASP.NET pages (.aspx files).&lt;br /&gt;VaryByCustom&lt;br /&gt;Any text that represents custom output caching requirements. If this attribute is given a value of browser, the cache is varied by browser name and major version information. If a custom string is entered, you must override the HttpApplication.GetVaryByCustomString method in your application's Global.asax file.&lt;br /&gt;VaryByHeader&lt;br /&gt;A semicolon-separated list of HTTP headers used to vary the output cache. When this attribute is set to multiple headers, the output cache contains a different version of the requested document for each specified header.&lt;br /&gt;Note   Setting the VaryByHeader attribute enables caching items in all HTTP 1.1 caches, not just the ASP.NET cache. This attribute is not supported for @ OutputCache directives in user controls.&lt;br /&gt;VaryByParam&lt;br /&gt;A semicolon-separated list of strings used to vary the output cache. By default, these strings correspond to a query string value sent with GET method attributes, or a parameter sent using the POST method. When this attribute is set to multiple parameters, the output cache contains a different version of the requested document for each specified parameter. Possible values include none, *, and any valid query string or POST parameter name.&lt;br /&gt;CAUTION   This attribute is required when you output cache ASP.NET pages. It is required for user controls as well unless you have included a VaryByControl attribute in the control's @ OutputCache directive. A parser error occurs if you fail to include it. If you do not want to specify a parameter to vary cached content, set the value to none. If you want to vary the output cache by all parameter values, set the attribute to *.&lt;br /&gt;VaryByControl&lt;br /&gt;A semicolon-separated list of strings used to vary a user control's output cache. These strings represent the ID property values of ASP.NET server controls declared in the user control. For more information, see Caching Portions of an ASP.NET Page.&lt;br /&gt;Note   This attribute is required in a user control @ OutputCache directive unless you have included a VaryByParam attribute. This attribute is not supported for @ OutputCache directives in ASP.NET pages.  &lt;br /&gt;Q20. What is MSDTC? Explain on that.&lt;br /&gt;Microsoft® SQL Server™ 2000 Data Transformation Services (DTS) is a set of graphical tools and programmable objects that lets you extract, transform, and consolidate data from disparate sources into single or multiple destinations.&lt;br /&gt;Importing and exporting data.&lt;br /&gt;DTS can import data from a text file or an OLE DB data source (for example, a Microsoft Access 2000 database) into SQL Server. Alternatively, data can be exported from SQL Server to an OLE DB data destination (for example, a Microsoft Excel 2000 spreadsheet). DTS also allows high-speed data loading from text files into SQL Server tables.&lt;br /&gt;Transforming data.&lt;br /&gt;DTS Designer includes a Transform Data task that allows you to select data from a data source connection, map the columns of data to a set of transformations, and send the transformed data to a destination connection. DTS Designer also includes a Data Driven Query task that allows you to map data to parameterized queries.&lt;br /&gt;Copying database objects.&lt;br /&gt;With DTS, you can transfer indexes, views, logins, stored procedures, triggers, rules, defaults, constraints, and user-defined data types in addition to the data. In addition, you can generate the scripts to copy the database objects.&lt;br /&gt;Note  There are restrictions on this capability. For more information, see &lt;/span&gt;&lt;a href="mk:@MSITStore:C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Books/dtssql.chm::/dts_elemtsk2_27xn.htm"&gt;&lt;span style="font-family:arial;"&gt;Copy SQL Server Objects Task&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;.&lt;br /&gt;Sending and receiving messages to and from other users and packages.&lt;br /&gt;DTS includes a Send Mail task that allows you to send an e-mail if a package step succeeds or fails. DTS also includes an Execute Package task that allows one package to run another as a package step, and a Message Queue task that allows you to use Message Queuing to send and receive messages between packages.&lt;br /&gt;Executing a set of Transact-SQL statements or Microsoft ActiveX® scripts against a data source.&lt;br /&gt;The Execute SQL and ActiveX Script tasks allow you to write your own SQL statements and scripting code and execute them as a step in a package workflow.&lt;br /&gt;Q21.I have a table with one column which has many records which are not distinct. I need to find the distinct values from that column and number of times it’s repeated.&lt;br /&gt;     GROUP BY   HAVING    &lt;br /&gt;Q22.Can you pass SOAP messages through remoting?&lt;br /&gt;       Yes. IHTTP   Interface  Q23. what is an assembly ?&lt;br /&gt;Q24.what is CLR?&lt;br /&gt;Q25.What is static Constructor?&lt;br /&gt;Without initializing any thing to make use the variable &lt;br /&gt;Q26.How to implement Multiple Inheritence in C#? &lt;br /&gt;Q27. Iterface IPrint()&lt;br /&gt;      {&lt;br /&gt;            String Display();&lt;br /&gt;      {&lt;br /&gt;   Iterface IWrite()&lt;br /&gt;      {&lt;br /&gt;            String Display();&lt;br /&gt;      {&lt;br /&gt;   Class PrintDoc:IPrint,IWrite&lt;br /&gt;      {&lt;br /&gt;            //Here is implementation&lt;br /&gt;      }&lt;br /&gt;how to implement the Display in the class printDoc (How to resolve the naming Conflict)?&lt;br /&gt;   Class PrintDoc:IPrint,IWrite&lt;br /&gt;      {&lt;br /&gt;            //Here is implementation&lt;br /&gt;            Public Int IPrint.Display()&lt;br /&gt;            {&lt;br /&gt;            }&lt;br /&gt;            Public Int IWrite.Display()&lt;br /&gt;            {&lt;br /&gt;            } &lt;br /&gt;      }&lt;br /&gt;Q28.&lt;br /&gt;Class Token()&lt;br /&gt;     {&lt;br /&gt;            Display()&lt;br /&gt;            {&lt;br /&gt;                  //Implementation goes here&lt;br /&gt;            }&lt;br /&gt;      }&lt;br /&gt;   Calss IdentifierToken:Token&lt;br /&gt;      {&lt;br /&gt;            new Display()    &lt;br /&gt;      //What is the use of new keyword&lt;br /&gt;METHOD OVERLOADING AND HIDING BASE CLASS METHOD&lt;br /&gt;            {&lt;br /&gt;                  //Implementation goes here&lt;br /&gt;            }&lt;br /&gt;      }&lt;br /&gt;      Static Void Method(Token t)&lt;br /&gt;      {&lt;br /&gt;            Console.Write(t.Display());&lt;br /&gt;      }&lt;br /&gt;      Public static Void Main()&lt;br /&gt;      {&lt;br /&gt;            IdentifierToken Variable=new IdentifierToken();&lt;br /&gt;            Method(Variable);  &lt;br /&gt;//Which Class Method is called here  &lt;br /&gt;DERIVED CLASS   &lt;br /&gt;Q29.&lt;br /&gt;Class Token()&lt;br /&gt;     {&lt;br /&gt;            Public Virtual String Display()&lt;br /&gt;            {&lt;br /&gt;                  //Implementation goes here&lt;br /&gt;            }&lt;br /&gt;      }&lt;br /&gt;  Calss IdentifierToken:Token&lt;br /&gt;      {&lt;br /&gt;            Public Override String Display()&lt;br /&gt;            {&lt;br /&gt;                  //Implementation goes here&lt;br /&gt;            }&lt;br /&gt;      }&lt;br /&gt;      Static Void Method(Token t)&lt;br /&gt;      {&lt;br /&gt;            Console.Write(t.Display());&lt;br /&gt;      }&lt;br /&gt;      Public static Void Main()&lt;br /&gt;      {&lt;br /&gt;            IdentifierToken Variable=new IdentifierToken();&lt;br /&gt;            Method(Variable);  //Which Class Method is called here      &lt;br /&gt;      }  &lt;br /&gt;Q30. Difference between Readonly and constant. ?&lt;br /&gt;Constants fields are used to store values that do not change during the runtime of a program. A good example of a constant would be PI(3.14) which will not change in any circumstance. Once we specify a field as constant a value can be assigned to it only during initialization and cannot be changed aftwerwards.The syntax for declaring a constant is const datatype variable name = value;&lt;br /&gt; &lt;/span&gt;&lt;a name="table02"&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;Const&lt;br /&gt;Readonly&lt;br /&gt;1&lt;br /&gt;Constant fields can be assigned a value only during variable initialization.&lt;br /&gt;For example compiling the following code will result in an error&lt;br /&gt;using System;&lt;br /&gt;class Circle&lt;br /&gt;{&lt;br /&gt;  const float PI=3.14;&lt;br /&gt;  Circle()&lt;br /&gt;  {&lt;br /&gt;       PI=3.147;&lt;br /&gt;  }}   &lt;br /&gt;Readonly fields can be assigned a value either during variable initialization or in a constructor.&lt;br /&gt;The following code will compile without an error,since readonly fields can be assigned a value in constructor.&lt;br /&gt;using System;&lt;br /&gt;class Circle&lt;br /&gt;{&lt;br /&gt;  redonly float PI;&lt;br /&gt;  Circle()&lt;br /&gt;  {&lt;br /&gt;       PI=3.147;&lt;br /&gt;  }&lt;br /&gt;} &lt;br /&gt;2&lt;br /&gt;The value assigned to a constant field should be known in the compile time.So we cannot assign a object reference to a constant field.For example compiling the following code will result in an error&lt;br /&gt;using System;&lt;br /&gt;class Test&lt;br /&gt;{&lt;br /&gt;  const object obj =new object();&lt;br /&gt;  static void Main()&lt;br /&gt;  {&lt;br /&gt;  }&lt;br /&gt;}      &lt;br /&gt;The value assigned to a readonly field need no be known at compile time. So we can assign an object reference to a readonly field in a constructor.The following code will compile without an error &lt;br /&gt;using System;&lt;br /&gt;class Test&lt;br /&gt;{&lt;br /&gt;  readonly object obj;&lt;br /&gt;  Test()&lt;br /&gt;  {&lt;br /&gt;       obj=new object(); &lt;br /&gt;  }&lt;br /&gt;  static void Main()&lt;br /&gt;  {&lt;br /&gt;  }&lt;br /&gt;}    &lt;br /&gt;3&lt;br /&gt;Constant fields are always static and cannot be accessed using instances of classes.. The following code shows how to access a constant &lt;br /&gt;using System;&lt;br /&gt;class Circle&lt;br /&gt;{&lt;br /&gt;  const float PI=3.14;&lt;br /&gt;  Circle()&lt;br /&gt;  {&lt;br /&gt;       PI=3.147;&lt;br /&gt;  }  &lt;br /&gt;}&lt;br /&gt;class Test&lt;br /&gt;{&lt;br /&gt;  static void Main()&lt;br /&gt;  {&lt;br /&gt;   Console.WriteLine("PI = {0}",Circle.PI);&lt;br /&gt;  }&lt;br /&gt;}  &lt;br /&gt;Readonly fields are not static by default and can be used with instances of classes. The following code shows how to access a readonly field  &lt;br /&gt;using System;&lt;br /&gt;class Circle&lt;br /&gt;{&lt;br /&gt;  readonly float PI=3.14;&lt;br /&gt;  Circle()&lt;br /&gt;  {&lt;br /&gt;       PI=3.147;&lt;br /&gt;  }  &lt;br /&gt;}&lt;br /&gt;class Test&lt;br /&gt;{&lt;br /&gt;  static void Main()&lt;br /&gt;{&lt;br /&gt;   Circle C = new Circle();&lt;br /&gt;   Console.WriteLine("PI = {0}",C.PI);&lt;br /&gt;  }&lt;br /&gt;}  &lt;br /&gt;&lt;br /&gt;Q31. Difference between instance and static constructors. ?   Q32 .when a static constructor is called.?        &lt;br /&gt;When class initialized &lt;br /&gt;Q33.What are the series of steps that happen on execution of a query in a Query Analyzer?&lt;br /&gt;The basic steps that SQL Server uses to process a single SELECT statement are:&lt;br /&gt;The parser scans the SELECT statement and breaks it into logical units such as keywords, expressions, operators, and identifiers.&lt;br /&gt;A query tree, sometimes called a sequence tree, is built describing the logical steps needed to transform the source data into the format needed by the result set.&lt;br /&gt;The query optimizer analyzes all the ways the source tables can be accessed and selects the series of steps that returns the results fastest while consuming fewer resources. The query tree is updated to record this exact series of steps, and the final, optimized version of the query tree is called the execution plan.&lt;br /&gt;The relational engine begins executing the execution plan. As steps that need data from the base tables are processed, the relational engine uses OLE DB to request that the storage engine pass up data from the rowsets requested from the relational engine.&lt;br /&gt;The relational engine processes the data returned from the storage engine into the format defined for the result set, and returns the result set to the client.&lt;br /&gt;&lt;br /&gt;Q34.What are Clustered and Non-clustered indexes?  When do u use each of them?  What is the data that is stored on applying either a clustered or a non-clustered index?  He basically asked questions related to the architecture of indexes.&lt;br /&gt;Clustered Indexes&lt;br /&gt;Clustered indexes have one row in sysindexes with indid = 1. The pages in the data chain and the rows in them are ordered on the value of the clustered index key. All inserts are made at the point the key value in the inserted row fits in the ordering sequence.&lt;br /&gt;Microsoft® SQL Server™ 2000 indexes are organized as B-trees. Each page in an index holds a page header followed by index rows. Each index row contains a key value and a pointer to either a lower-level page or a data row. Each page in an index is called an index node. The top node of the B-tree is called the root node. The bottom layer of nodes in the index are called the leaf nodes. The pages in each level of the index are linked together in a doubly-linked list. In a clustered index, the data pages make up the leaf nodes. Any index levels between the root and the leaves are collectively known as intermediate levels.&lt;br /&gt;For a clustered index, sysindexes.root points to the top of the clustered index. SQL Server navigates down the index to find the row corresponding to a clustered index key. To find a range of keys, SQL Server navigates through the index to find the starting key value in the range, and then scans through the data pages using the previous or next pointers. To find the first page in the chain of data pages, SQL Server follows the leftmost pointers from the root node of the index.&lt;br /&gt;This illustration shows the structure of a clustered index.&lt;br /&gt;Nonclustered Indexes&lt;br /&gt;Nonclustered indexes have the same B-tree structure as clustered indexes, with two significant differences:&lt;br /&gt;The data rows are not sorted and stored in order based on their nonclustered keys.&lt;br /&gt;The leaf layer of a nonclustered index does not consist of the data pages.&lt;br /&gt;Instead, the leaf nodes contain index rows. Each index row contains the nonclustered key value and one or more row locators that point to the data row (or rows if the index is not unique) having the key value.&lt;br /&gt;Nonclustered indexes can be defined on a table with a clustered index, a heap, or an indexed view. In Microsoft® SQL Server™ 2000, the row locators in nonclustered index rows have two forms:&lt;br /&gt;If the table is a heap (does not have a clustered index), the row locator is a pointer to the row. The pointer is built from the file identifier (ID), page number, and number of the row on the page. The entire pointer is known as a Row ID.&lt;br /&gt;If the table does have a clustered index, or the index is on an indexed view, the row locator is the clustered index key for the row. If the clustered index is not a unique index, SQL Server 2000 makes duplicate keys unique by adding an internally generated value. This value is not visible to users; it is used to make the key unique for use in nonclustered indexes. SQL Server retrieves the data row by searching the clustered index using the clustered index key stored in the leaf row of the nonclustered index.&lt;br /&gt;Because nonclustered indexes store clustered index keys as their row locators, it is important to keep clustered index keys as small as possible. Do not choose large columns as the keys to clustered indexes if a table also has nonclustered indexes.&lt;br /&gt;Q35.There is table that only has only non-clustered index.  Now, to the table a new clustered is applied.  What will happen to the data in the non-clustered before and after applying the clustered index.  Will it be the same or not?&lt;br /&gt;DATA won’t be changed but the previous nonclusted indexes which directly pointing to database is dropped and new cluster index is created and new data file also creates.&lt;br /&gt;Q36.What are functions in SQL Server?  Why do we use them?  What are the different types of user defined function that we have?&lt;br /&gt;Functions are subroutines made up of one or more Transact-SQL statements that can be used to encapsulate code for reuse. Microsoft® SQL Server™ 2000 does not limit users to the built-in functions defined as part of the Transact-SQL language, but allows users to create their own user-defined functions.&lt;br /&gt;User-defined functions are created using the CREATE FUNCTION statement, modified using the ALTER FUNCTION statement, and removed using the DROP FUNCTION statement. Each fully qualified user-defined function name (database_name.owner_name.function_name) must be unique.&lt;br /&gt;You must have been granted CREATE FUNCTION permissions to create, alter, or drop user-defined functions. Users other than the owner must be granted appropriate permissions on a function before they can use it in a Transact-SQL statement. To create or alter tables with references to user-defined functions in the CHECK constraint, DEFAULT clause, or computed column definition, you must also have REFERENCES permission on the functions.&lt;br /&gt;Transact-SQL errors that cause a statement to be canceled and continue with the next statement in the module (such as triggers or stored procedures) are treated differently inside a function. In functions, such errors cause the execution of the function to stop. This in turn causes the statement that invoked the function to be canceled.&lt;br /&gt;SQL Server 2000 supports three types of user-defined functions:&lt;br /&gt;Scalar functions&lt;br /&gt;Inline table-valued functions&lt;br /&gt;Multistatement table-valued functions&lt;br /&gt;A user-defined function takes zero or more input parameters and returns either a scalar value or a table. A function can have a maximum of 1024 input parameters. When a parameter of the function has a default value, the keyword default DEFAULT must be specified when calling the function to get the default value. This behavior is different from parameters with default values in stored procedures in which omitting the parameter also implies the default value. User-defined functions do not support output parameters.&lt;br /&gt;Scalar functions return a single data value of the type defined in a RETURNS clause. All scalar data types, including bigint and sql_variant, can be used. The timestamp data type, user-defined data type, and nonscalar types, such as table or cursor, are not supported. The body of the function, defined in a BEGIN...END block, contains the series of Transact-SQL statements that return the value. The return type can be any data type except text, ntext, image, cursor, and timestamp.&lt;br /&gt;Table-valued functions return a table. For an inline table-valued function, there is no function body; the table is the result set of a single SELECT statement. For a multistatement table-valued function, the function body, defined in a BEGIN...END block, contains the TRANSACT-SQL statements that build and insert rows into the table that will be returned. For more information about inline table-valued functions, see &lt;/span&gt;&lt;a href="mk:@MSITStore:C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Books/createdb.chm::/cm_8_des_08_73lf.htm"&gt;&lt;span style="font-family:arial;"&gt;Inline User-Defined Functions&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;. For more information about table-valued functions, see &lt;/span&gt;&lt;a href="mk:@MSITStore:C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Books/createdb.chm::/cm_8_des_08_361x.htm"&gt;&lt;span style="font-family:arial;"&gt;User-Defined Functions That Return a table Data Type&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;.&lt;br /&gt;The statements in a BEGIN...END block cannot have any side effects. Function side effects are any permanent changes to the state of a resource that has a scope outside the function such as a modification to a database table. The only changes that can be made by the statements in the function are changes to objects local to the function, such as local cursors or variables. Modifications to database tables, operations on cursors that are not local to the function, sending e-mail, attempting a catalog modification, and generating a result set that is returned to the user are examples of actions that cannot be performed in a function.&lt;br /&gt;The types of statements that are valid in a function include:&lt;br /&gt;DECLARE statements can be used to define data variables and cursors that are local to the function.&lt;br /&gt;Assignments of values to objects local to the function, such as using SET to assign values to scalar and table local variables.&lt;br /&gt;Cursor operations that reference local cursors that are declared, opened, closed, and deallocated in the function. FETCH statements that return data to the client are not allowed. Only FETCH statements that assign values to local variables using the INTO clause are allowed.&lt;br /&gt;Control-of-flow statements.&lt;br /&gt;SELECT statements containing select lists with expressions that assign values to variables that are local to the function.&lt;br /&gt;UPDATE, INSERT, and DELETE statements modifying table variables that are local to the function.&lt;br /&gt;EXECUTE statements calling an extended stored procedure.&lt;br /&gt;The number of times that a function specified in a query is actually executed can vary between execution plans built by the optimizer. An example is a function invoked by a subquery in a WHERE clause. The number of times the subquery and its function is executed can vary with different access paths chosen by the optimizer.&lt;br /&gt;Built-in functions that can return different data on each call are not allowed in user-defined functions. The built-in functions not allowed in user-defined functions are:&lt;br /&gt;@@CONNECTIONS&lt;/span&gt;&lt;a name="table03"&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;@@PACK_SENT&lt;br /&gt;GETDATE&lt;br /&gt;@@CPU_BUSY&lt;br /&gt;@@PACKET_ERRORS&lt;br /&gt;GetUTCDate&lt;br /&gt;@@IDLE&lt;br /&gt;@@TIMETICKS&lt;br /&gt;NEWID&lt;br /&gt;@@IO_BUSY&lt;br /&gt;@@TOTAL_ERRORS&lt;br /&gt;RAND&lt;br /&gt;@@MAX_CONNECTIONS&lt;br /&gt;@@TOTAL_READ&lt;br /&gt;TEXTPTR&lt;br /&gt;@@PACK_RECEIVED&lt;br /&gt;@@TOTAL_WRITE&lt;br /&gt; &lt;br /&gt;Schema-Bound Functions&lt;br /&gt;CREATE FUNCTION supports a SCHEMABINDING clause that binds the function to the schema of any objects it references, such as tables, views, and other user-defined functions. An attempt to alter or drop any object referenced by a schema-bound function fails.&lt;br /&gt;These conditions must be met before you can specify SCHEMABINDING in CREATE FUNCTION:&lt;br /&gt;All views and user-defined functions referenced by the function must be schema-bound.&lt;br /&gt;All objects referenced by the function must be in the same database as the function. The objects must be referenced using either one-part or two-part names.&lt;br /&gt;You must have REFERENCES permission on all objects (tables, views, and user-defined functions) referenced in the function.&lt;br /&gt;You can use ALTER FUNCTION to remove the schema binding. The ALTER FUNCTION statement should redefine the function without specifying WITH SCHEMABINDING.&lt;br /&gt;When calling a scalar user-defined function, you must supply at least a two-part name:&lt;br /&gt;SELECT *, MyUser.MyScalarFunction()&lt;br /&gt;FROM MyTable&lt;br /&gt;Table-valued functions can be called by using a one-part name:&lt;br /&gt;SELECT *&lt;br /&gt;FROM MyTableFunction()&lt;br /&gt;However, when you call SQL Server built-in functions that return a table, you must add the prefix :: to the name of the function:&lt;br /&gt;SELECT * FROM ::fn_helpcollations()&lt;br /&gt;A scalar function can be referenced any place an expression of the same data type returned by the function is allowed in a Transact-SQL statement, including computed columns and CHECK constraint definitions. For example, this statement creates a simple function that returns a decimal:&lt;br /&gt;CREATE FUNCTION CubicVolume&lt;br /&gt;-- Input dimensions in centimeters&lt;br /&gt;   (@CubeLength decimal(4,1), @CubeWidth decimal(4,1),&lt;br /&gt;    @CubeHeight decimal(4,1) )&lt;br /&gt;RETURNS decimal(12,3) -- Cubic Centimeters.&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt;   RETURN ( @CubeLength * @CubeWidth * @CubeHeight )&lt;br /&gt;END&lt;br /&gt;This function can then be used anywhere an integer expression is allowed, such as in a computed column for a table:&lt;br /&gt;CREATE TABLE Bricks&lt;br /&gt;   (&lt;br /&gt;    BrickPartNmbr   int PRIMARY KEY,&lt;br /&gt;   BrickColor      nchar(20),&lt;br /&gt;    BrickHeight     decimal(4,1),&lt;br /&gt;    BrickLength     decimal(4,1),&lt;br /&gt;    BrickWidth      decimal(4,1),&lt;br /&gt;    BrickVolume AS&lt;br /&gt;              (&lt;br /&gt;               dbo.CubicVolume(BrickHeight,&lt;br /&gt;                         BrickLength, BrickWidth)&lt;br /&gt;              )&lt;br /&gt;   )&lt;br /&gt;dbo.CubicVolume is an example of a user-defined function that returns a scalar value. The RETURNS clause defines a scalar data type for the value returned by the function. The BEGIN...END block contains one or more Transact-SQL statements that implement the function. Each RETURN statement in the function must have an argument that returns a data value that has the data type specified in the RETURNS clause, or a data type that can be implicitly converted to the type specified in RETURNS. The value of the RETURN argument is the value returned by the function.&lt;br /&gt;Q37. what is fill factor in indexes ?&lt;br /&gt;           CREATE NONCLUSTERED INDEX zip_ind&lt;br /&gt;          ON authors (zip)&lt;br /&gt;      WITH FILLFACTOR = 100&lt;br /&gt;When you create a clustered index, the data in the table is stored in the data pages of the database according to the order of the values in the indexed columns. When new rows of data are inserted into the table or the values in the indexed columns are changed, Microsoft® SQL Server™ 2000 may have to reorganize the storage of the data in the table to make room for the new row and maintain the ordered storage of the data. This also applies to nonclustered indexes. When data is added or changed, SQL Server may have to reorganize the storage of the data in the nonclustered index pages. When a new row is added to a full index page, SQL Server moves approximately half the rows to a new page to make room for the new row. This reorganization is known as a &lt;/span&gt;&lt;a href="mk:@MSITStore:C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Books/createdb.chm::/cm_8_des_05_9ak5.htm"&gt;&lt;span style="font-family:arial;"&gt;page split&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;. Page splitting can impair performance and fragment the storage of the data in a table.&lt;br /&gt;When creating an index, you can specify a &lt;/span&gt;&lt;a href="mk:@MSITStore:C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Books/createdb.chm::/cm_8_des_05_9ak5.htm"&gt;&lt;span style="font-family:arial;"&gt;fill factor&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; to leave extra gaps and reserve a percentage of free space on each &lt;/span&gt;&lt;a href="mk:@MSITStore:C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Books/createdb.chm::/cm_8_des_05_9ak5.htm"&gt;&lt;span style="font-family:arial;"&gt;leaf level&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; page of the index to accommodate future expansion in the storage of the table's data and reduce the potential for page splits. The fill factor value is a percentage from 0 to 100 that specifies how much to fill the data pages after the index is created. A value of 100 means the pages will be full and will take the least amount of storage space. This setting should be used only when there will be no changes to the data, for example, on a read-only table. A lower value leaves more empty space on the data pages, which reduces the need to split data pages as indexes grow but requires more storage space. This setting is more appropriate when there will be changes to the data in the table.&lt;br /&gt;The fill factor option is provided for fine-tuning performance. However, the server-wide default fill factor, specified using the sp_configure system stored procedure, is the best choice in the majority of situations. &lt;br /&gt;Even for an application oriented for many insert and update operations, the number of database reads typically outnumber database writes by a factor of 5 to 10. Therefore, specifying a fill factor other than the default can degrade database read performance by an amount inversely proportional to the fill factor setting. For example, a fill factor value of 50 percent can cause database read performance to degrade by two times.&lt;br /&gt;It is useful to set the fill factor option to another value only when a new index is created on a table with existing data, and then only when future changes in that data can be accurately predicted.&lt;br /&gt;The fill factor is implemented only when the index is created; it is not maintained after the index is created as data is added, deleted, or updated in the table. Trying to maintain the extra space on the data pages would defeat the purpose of originally using the fill factor because SQL Server would have to perform page splits to maintain the percentage of free space, specified by the fill factor, on each page as data is entered. Therefore, if the data in the table is significantly modified and new data added, the empty space in the data pages can fill. In this situation, the index can be re-created and the fill factor specified again to redistribute the data.&lt;br /&gt;Q38.What are stored procedures and why do we use them?&lt;br /&gt;Pre Complied Group of T-SQL statement to with conditions&lt;br /&gt;A. Use a simple procedure with a complex SELECT&lt;br /&gt;This stored procedure returns all authors (first and last names supplied), their titles, and their publishers from a four-table join. This stored procedure does not use any parameters.&lt;br /&gt;USE pubs&lt;br /&gt;IF EXISTS (SELECT name FROM sysobjects&lt;br /&gt;         WHERE name = 'au_info_all' AND type = 'P')&lt;br /&gt;   DROP PROCEDURE au_info_all&lt;br /&gt;GO&lt;br /&gt;CREATE PROCEDURE au_info_all&lt;br /&gt;AS&lt;br /&gt;SELECT au_lname, au_fname, title, pub_name&lt;br /&gt;   FROM authors a INNER JOIN titleauthor ta&lt;br /&gt;      ON a.au_id = ta.au_id INNER JOIN titles t&lt;br /&gt;      ON t.title_id = ta.title_id INNER JOIN publishers p&lt;br /&gt;      ON t.pub_id = p.pub_id&lt;br /&gt;GO&lt;br /&gt;The au_info_all stored procedure can be executed in these ways:&lt;br /&gt;EXECUTE au_info_all&lt;br /&gt;-- Or&lt;br /&gt;EXEC au_info_all&lt;br /&gt;Or, if this procedure is the first statement within the batch:&lt;br /&gt;au_info_all&lt;br /&gt;B. Use a simple procedure with parameters&lt;br /&gt;This stored procedure returns only the specified authors (first and last names supplied), their titles, and their publishers from a four-table join. This stored procedure accepts exact matches for the parameters passed.&lt;br /&gt;USE pubs&lt;br /&gt;IF EXISTS (SELECT name FROM sysobjects&lt;br /&gt;         WHERE name = 'au_info' AND type = 'P')&lt;br /&gt;   DROP PROCEDURE au_info&lt;br /&gt;GO&lt;br /&gt;USE pubs&lt;br /&gt;GO&lt;br /&gt;CREATE PROCEDURE au_info&lt;br /&gt;   @lastname varchar(40),&lt;br /&gt;   @firstname varchar(20)&lt;br /&gt;AS&lt;br /&gt;SELECT au_lname, au_fname, title, pub_name&lt;br /&gt;   FROM authors a INNER JOIN titleauthor ta&lt;br /&gt;      ON a.au_id = ta.au_id INNER JOIN titles t&lt;br /&gt;      ON t.title_id = ta.title_id INNER JOIN publishers p&lt;br /&gt;      ON t.pub_id = p.pub_id&lt;br /&gt;   WHERE  au_fname = @firstname&lt;br /&gt;      AND au_lname = @lastname&lt;br /&gt;GO&lt;br /&gt;The au_info stored procedure can be executed in these ways:&lt;br /&gt;EXECUTE au_info 'Dull', 'Ann'&lt;br /&gt;-- Or&lt;br /&gt;EXECUTE au_info @lastname = 'Dull', @firstname = 'Ann'&lt;br /&gt;-- Or&lt;br /&gt;EXECUTE au_info @firstname = 'Ann', @lastname = 'Dull'&lt;br /&gt;-- Or&lt;br /&gt;EXEC au_info 'Dull', 'Ann'&lt;br /&gt;-- Or&lt;br /&gt;EXEC au_info @lastname = 'Dull', @firstname = 'Ann'&lt;br /&gt;-- Or&lt;br /&gt;EXEC au_info @firstname = 'Ann', @lastname = 'Dull'&lt;br /&gt;Or, if this procedure is the first statement within the batch:&lt;br /&gt;au_info 'Dull', 'Ann'&lt;br /&gt;-- Or&lt;br /&gt;au_info @lastname = 'Dull', @firstname = 'Ann'&lt;br /&gt;-- Or&lt;br /&gt;au_info @firstname = 'Ann', @lastname = 'Dull'&lt;br /&gt;C. Use a simple procedure with wildcard parameters&lt;br /&gt;This stored procedure returns only the specified authors (first and last names supplied), their titles, and their publishers from a four-table join. This stored procedure pattern matches the parameters passed or, if not supplied, uses the preset defaults.&lt;br /&gt;USE pubs&lt;br /&gt;IF EXISTS (SELECT name FROM sysobjects&lt;br /&gt;      WHERE name = 'au_info2' AND type = 'P')&lt;br /&gt;   DROP PROCEDURE au_info2&lt;br /&gt;GO&lt;br /&gt;USE pubs&lt;br /&gt;GO&lt;br /&gt;CREATE PROCEDURE au_info2&lt;br /&gt;   @lastname varchar(30) = 'D%',&lt;br /&gt;   @firstname varchar(18) = '%'&lt;br /&gt;AS&lt;br /&gt;SELECT au_lname, au_fname, title, pub_name&lt;br /&gt;FROM authors a INNER JOIN titleauthor ta&lt;br /&gt;   ON a.au_id = ta.au_id INNER JOIN titles t&lt;br /&gt;   ON t.title_id = ta.title_id INNER JOIN publishers p&lt;br /&gt;   ON t.pub_id = p.pub_id&lt;br /&gt;WHERE au_fname LIKE @firstname&lt;br /&gt;   AND au_lname LIKE @lastname&lt;br /&gt;GO&lt;br /&gt;The au_info2 stored procedure can be executed in many combinations. Only a few combinations are shown here:&lt;br /&gt;EXECUTE au_info2&lt;br /&gt;-- Or&lt;br /&gt;EXECUTE au_info2 'Wh%'&lt;br /&gt;-- Or&lt;br /&gt;EXECUTE au_info2 @firstname = 'A%'&lt;br /&gt;-- Or&lt;br /&gt;EXECUTE au_info2 '[CK]ars[OE]n'&lt;br /&gt;-- Or&lt;br /&gt;EXECUTE au_info2 'Hunter', 'Sheryl'&lt;br /&gt;-- Or&lt;br /&gt;EXECUTE au_info2 'H%', 'S%'&lt;br /&gt;D. Use OUTPUT parameters&lt;br /&gt;OUTPUT parameters allow an external procedure, a batch, or more than one Transact-SQL statements to access a value set during the procedure execution. In this example, a stored procedure (titles_sum) is created and allows one optional input parameter and one output parameter.&lt;br /&gt;First, create the procedure:&lt;br /&gt;USE pubs&lt;br /&gt;GO&lt;br /&gt;IF EXISTS(SELECT name FROM sysobjects&lt;br /&gt;      WHERE name = 'titles_sum' AND type = 'P')&lt;br /&gt;   DROP PROCEDURE titles_sum&lt;br /&gt;GO&lt;br /&gt;USE pubs&lt;br /&gt;GO&lt;br /&gt;CREATE PROCEDURE titles_sum @@TITLE varchar(40) = '%', @@SUM money OUTPUT&lt;br /&gt;AS&lt;br /&gt;SELECT 'Title Name' = title&lt;br /&gt;FROM titles&lt;br /&gt;WHERE title LIKE @@TITLE&lt;br /&gt;SELECT @@SUM = SUM(price)&lt;br /&gt;FROM titles&lt;br /&gt;WHERE title LIKE @@TITLE&lt;br /&gt;GO&lt;br /&gt;Next, use the OUTPUT parameter with control-of-flow language. &lt;br /&gt;Note  The OUTPUT variable must be defined during the table creation as well as during use of the variable.&lt;br /&gt;The parameter name and variable name do not have to match; however, the data type and parameter positioning must match (unless @@SUM = variable is used).&lt;br /&gt;DECLARE @@TOTALCOST money&lt;br /&gt;EXECUTE titles_sum 'The%', @@TOTALCOST OUTPUT&lt;br /&gt;IF @@TOTALCOST &lt; 200&lt;br /&gt;BEGIN&lt;br /&gt;   PRINT ' '&lt;br /&gt;  PRINT 'All of these titles can be purchased for less than $200.'&lt;br /&gt;END&lt;br /&gt;ELSE&lt;br /&gt;   SELECT 'The total cost of these titles is $'&lt;br /&gt;         + RTRIM(CAST(@@TOTALCOST AS varchar(20)))&lt;br /&gt;Here is the result set:&lt;br /&gt;Title Name                                                              &lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;The Busy Executive's Database Guide&lt;br /&gt;The Gourmet Microwave&lt;br /&gt;The Psychology of Computer Cooking&lt;br /&gt;(3 row(s) affected)&lt;br /&gt;Warning, null value eliminated from aggregate.&lt;br /&gt;All of these titles can be purchased for less than $200.&lt;br /&gt;E. Use an OUTPUT cursor parameter&lt;br /&gt;OUTPUT cursor parameters are used to pass a cursor that is local to a stored procedure back to the calling batch, stored procedure, or trigger.&lt;br /&gt;First, create the procedure that declares and then opens a cursor on the titles table:&lt;br /&gt;USE pubs&lt;br /&gt;IF EXISTS (SELECT name FROM sysobjects&lt;br /&gt;      WHERE name = 'titles_cursor' and type = 'P')&lt;br /&gt;DROP PROCEDURE titles_cursor&lt;br /&gt;GO&lt;br /&gt;CREATE PROCEDURE titles_cursor @titles_cursor CURSOR VARYING OUTPUT&lt;br /&gt;AS&lt;br /&gt;SET @titles_cursor = CURSOR&lt;br /&gt;FORWARD_ONLY STATIC FOR&lt;br /&gt;SELECT *&lt;br /&gt;FROM titles&lt;br /&gt;OPEN @titles_cursor&lt;br /&gt;GO&lt;br /&gt;Next, execute a batch that declares a local cursor variable, executes the procedure to assign the cursor to the local variable, and then fetches the rows from the cursor.&lt;br /&gt;USE pubs&lt;br /&gt;GO&lt;br /&gt;DECLARE @MyCursor CURSOR&lt;br /&gt;EXEC titles_cursor @titles_cursor = @MyCursor OUTPUT&lt;br /&gt;WHILE (@@FETCH_STATUS = 0)&lt;br /&gt;BEGIN&lt;br /&gt;   FETCH NEXT FROM @MyCursor&lt;br /&gt;END&lt;br /&gt;CLOSE @MyCursor&lt;br /&gt;DEALLOCATE @MyCursor&lt;br /&gt;GO&lt;br /&gt;F. Use the WITH RECOMPILE option&lt;br /&gt;The WITH RECOMPILE clause is helpful when the parameters supplied to the procedure will not be typical, and when a new execution plan should not be cached or stored in memory.&lt;br /&gt;USE pubs&lt;br /&gt;IF EXISTS (SELECT name FROM sysobjects&lt;br /&gt;      WHERE name = 'titles_by_author' AND type = 'P')&lt;br /&gt;   DROP PROCEDURE titles_by_author&lt;br /&gt;GO&lt;br /&gt;CREATE PROCEDURE titles_by_author @@LNAME_PATTERN varchar(30) = '%'&lt;br /&gt;WITH RECOMPILE&lt;br /&gt;AS&lt;br /&gt;SELECT RTRIM(au_fname) + ' ' + RTRIM(au_lname) AS 'Authors full name',&lt;br /&gt;   title AS Title&lt;br /&gt;FROM authors a INNER JOIN titleauthor ta&lt;br /&gt;   ON a.au_id = ta.au_id INNER JOIN titles t&lt;br /&gt;   ON ta.title_id = t.title_id&lt;br /&gt;WHERE au_lname LIKE @@LNAME_PATTERN&lt;br /&gt;GO&lt;br /&gt;G. Use the WITH ENCRYPTION option&lt;br /&gt;The WITH ENCRYPTION clause hides the text of a stored procedure from users. This example creates an encrypted procedure, uses the sp_helptext system stored procedure to get information on that encrypted procedure, and then attempts to get information on that procedure directly from the syscomments table.&lt;br /&gt;IF EXISTS (SELECT name FROM sysobjects&lt;br /&gt;      WHERE name = 'encrypt_this' AND type = 'P')&lt;br /&gt;   DROP PROCEDURE encrypt_this&lt;br /&gt;GO&lt;br /&gt;USE pubs&lt;br /&gt;GO&lt;br /&gt;CREATE PROCEDURE encrypt_this&lt;br /&gt;WITH ENCRYPTION&lt;br /&gt;AS&lt;br /&gt;SELECT *&lt;br /&gt;FROM authors&lt;br /&gt;GO&lt;br /&gt;EXEC sp_helptext encrypt_this&lt;br /&gt;Here is the result set:&lt;br /&gt;The object's comments have been encrypted.&lt;br /&gt;Next, select the identification number and text of the encrypted stored procedure contents.&lt;br /&gt;SELECT c.id, c.text&lt;br /&gt;FROM syscomments c INNER JOIN sysobjects o&lt;br /&gt;   ON c.id = o.id&lt;br /&gt;WHERE o.name = 'encrypt_this'&lt;br /&gt;Here is the result set:&lt;br /&gt;Note  The text column output is shown on a separate line. When executed, this information appears on the same line as the id column information.&lt;br /&gt;id         text                                                       &lt;br /&gt;---------- ------------------------------------------------------------&lt;br /&gt;1413580074 ?????????????????????????????????e??????????????????????????????????????????????????????????????????????????&lt;br /&gt;(1 row(s) affected)&lt;br /&gt;H. Create a user-defined system stored procedure&lt;br /&gt;This example creates a procedure to display all the tables and their corresponding indexes with a table name beginning with the string emp. If not specified, this procedure returns all tables (and indexes) with a table name beginning with sys.&lt;br /&gt;IF EXISTS (SELECT name FROM sysobjects&lt;br /&gt;      WHERE name = 'sp_showindexes' AND type = 'P')&lt;br /&gt;  DROP PROCEDURE sp_showindexes&lt;br /&gt;GO&lt;br /&gt;USE master&lt;br /&gt;GO&lt;br /&gt;CREATE PROCEDURE sp_showindexes&lt;br /&gt;   @@TABLE varchar(30) = 'sys%'&lt;br /&gt;AS&lt;br /&gt;SELECT o.name AS TABLE_NAME,&lt;br /&gt;   i.name AS INDEX_NAME,&lt;br /&gt;   indid AS INDEX_ID&lt;br /&gt;FROM sysindexes i INNER JOIN sysobjects o&lt;br /&gt;   ON o.id = i.id&lt;br /&gt;WHERE o.name LIKE @@TABLE&lt;br /&gt;GO        &lt;br /&gt;USE pubs&lt;br /&gt;EXEC sp_showindexes 'emp%'&lt;br /&gt;GO&lt;br /&gt;Here is the result set:&lt;br /&gt;TABLE_NAME       INDEX_NAME       INDEX_ID&lt;br /&gt;---------------- ---------------- ----------------&lt;br /&gt;employee         employee_ind     1&lt;br /&gt;employee         PK_emp_id        2&lt;br /&gt;(2 row(s) affected)&lt;br /&gt;I. Use deferred name resolution&lt;br /&gt;This example shows four procedures and the various ways that deferred name resolution can be used. Each stored procedure is created, although the table or column referenced does not exist at compile time.&lt;br /&gt;IF EXISTS (SELECT name FROM sysobjects&lt;br /&gt;      WHERE name = 'proc1' AND type = 'P')&lt;br /&gt;   DROP PROCEDURE proc1&lt;br /&gt;GO&lt;br /&gt;-- Creating a procedure on a nonexistent table.&lt;br /&gt;USE pubs&lt;br /&gt;GO&lt;br /&gt;CREATE PROCEDURE proc1&lt;br /&gt;AS&lt;br /&gt;   SELECT *&lt;br /&gt;   FROM does_not_exist&lt;br /&gt;GO &lt;br /&gt;-- Here is the statement to actually see the text of the procedure.&lt;br /&gt;SELECT o.id, c.text&lt;br /&gt;FROM sysobjects o INNER JOIN syscomments c&lt;br /&gt;   ON o.id = c.id&lt;br /&gt;WHERE o.type = 'P' AND o.name = 'proc1'&lt;br /&gt;GO&lt;br /&gt;USE master&lt;br /&gt;GO&lt;br /&gt;IF EXISTS (SELECT name FROM sysobjects&lt;br /&gt;      WHERE name = 'proc2' AND type = 'P')&lt;br /&gt;   DROP PROCEDURE proc2&lt;br /&gt;GO&lt;br /&gt;-- Creating a procedure that attempts to retrieve information from a&lt;br /&gt;-- nonexistent column in an existing table.&lt;br /&gt;USE pubs&lt;br /&gt;GO&lt;br /&gt;CREATE PROCEDURE proc2&lt;br /&gt;AS&lt;br /&gt;   DECLARE @middle_init char(1)&lt;br /&gt;   SET @middle_init = NULL&lt;br /&gt;   SELECT au_id, middle_initial = @middle_init&lt;br /&gt;   FROM authors&lt;br /&gt;GO &lt;br /&gt;-- Here is the statement to actually see the text of the procedure.&lt;br /&gt;SELECT o.id, c.text&lt;br /&gt;FROM sysobjects o INNER JOIN syscomments c&lt;br /&gt;   ON o.id = c.id&lt;br /&gt;WHERE o.type = 'P' and o.name = 'proc2'&lt;br /&gt;Q39.What are the differences between functions and stored procedures?   &lt;br /&gt;Q40.What are cursors and why do we use them?  How do you declare a cursor?  How do you declare a simplest cursor?&lt;br /&gt;Operations in a relational database act on a complete set of rows. The set of rows returned by a SELECT statement consists of all the rows that satisfy the conditions in the WHERE clause of the statement. This complete set of rows returned by the statement is known as the result set. Applications, especially interactive online applications, cannot always work effectively with the entire result set as a unit. These applications need a mechanism to work with one row or a small block of rows at a time. Cursors are an extension to result sets that provide that mechanism.&lt;br /&gt;Cursor process&lt;br /&gt;Associate a cursor with the result set of a Transact-SQL statement, and define characteristics of the cursor, such as whether the rows in the cursor can be updated.&lt;br /&gt;Execute the Transact-SQL statement to populate the cursor.&lt;br /&gt;Retrieve the rows in the cursor you want to see. The operation to retrieve one row or one block of rows from a cursor is called a fetch. Performing a series of fetches to retrieve rows in either a forward or backward direction is called scrolling.&lt;br /&gt;Optionally, perform modification operations (update or delete) on the row at the current position in the cursor.&lt;br /&gt;Close the cursor.&lt;br /&gt;DECLARE titles_cursor CURSOR FOR&lt;br /&gt;   SELECT t.title&lt;br /&gt;   FROM titleauthor ta, titles t&lt;br /&gt;   WHERE ta.title_id = t.title_id AND&lt;br /&gt;   ta.au_id = @au_id   -- Variable value from the outer cursor&lt;br /&gt;   OPEN titles_cursor&lt;br /&gt;   FETCH NEXT FROM titles_cursor INTO @title&lt;br /&gt;   IF @@FETCH_STATUS &lt;&gt; 0&lt;br /&gt;      PRINT "         &lt;&lt;no&gt;&gt;"     &lt;br /&gt;   WHILE @@FETCH_STATUS = 0&lt;br /&gt;   BEGIN&lt;br /&gt;     &lt;br /&gt;      SELECT @message = "         " + @title&lt;br /&gt;      PRINT @message&lt;br /&gt;      FETCH NEXT FROM titles_cursor INTO @title&lt;br /&gt;  &lt;br /&gt;   END&lt;br /&gt;   CLOSE titles_cursor&lt;br /&gt;   DEALLOCATE titles_cursor&lt;br /&gt;Cursor Types&lt;br /&gt;Static cursors &lt;br /&gt;The complete result set of a static cursor is built in tempdb when the cursor is opened. A static cursor always displays the result set as it was when the cursor was opened. The cursor does not reflect any changes made in the database that affect either the membership of the result set or changes to the values in the columns of the rows that make up the result set. A static cursor does not display new rows inserted in the database after the cursor was opened, even if they match the search conditions of the cursor SELECT statement. If rows making up the result set are updated by other users, the new data values are not displayed in the static cursor. The static cursor displays rows deleted from the database after the cursor was opened. No UPDATE, INSERT, or DELETE operations are reflected in a static cursor (unless the cursor is closed and reopened), not even modifications made using the same connection that opened the cursor.Microsoft® SQL Server™ static cursors are always read-only.Because the result set of a static cursor is stored in a work table in tempdb, the size of the rows in the result set cannot exceed the maximum row size for a SQL Server table.&lt;br /&gt;Dynamic cursors &lt;br /&gt;Dynamic cursors are the opposite of static cursors. Dynamic cursors reflect all changes made to the rows in their result set when scrolling through the cursor. The data values, order, and membership of the rows in the result set can change on each fetch. All UPDATE, INSERT, and DELETE statements made by all users are visible through the cursor. Updates are visible immediately if they are made through the cursor using either an API function such as SQLSetPos or the Transact-SQL WHERE CURRENT OF clause. Updates made outside the cursor are not visible until they are committed, unless the cursor transaction isolation level is set to read uncommitted.&lt;br /&gt;Forward-only cursors&lt;br /&gt;A forward-only cursor does not support scrolling; it supports only fetching the rows serially from the start to the end of the cursor. The rows are not retrieved from the database until they are fetched. The effects of all INSERT, UPDATE, and DELETE statements made by the current user or committed by other users that affect rows in the result set are visible as the rows are fetched from the cursor. Because the cursor cannot be scrolled backward, however, changes made to rows in the database after the row was fetched are not visible through the cursor, except for the case where a value used to determine the location of the row within the result set is modified, such as updating a column covered by a clustered index.&lt;br /&gt;Although the database API cursor models consider a forward-only cursor to be a distinct type of cursor, Microsoft® SQL Server™ 2000 does not. SQL Server considers both forward-only and scroll as options that can be applied to static, keyset-driven, and dynamic cursors. Transact-SQL cursors support forward-only static, keyset-driven, and dynamic cursors. The database API cursor models assume that static, keyset-driven, and dynamic cursors are always scrollable. When a database API cursor attribute or property is set to forward-only, SQL Server implements this as a forward-only dynamic cursor.&lt;br /&gt;Keyset-driven cursors &lt;br /&gt;The membership and order of rows in a keyset-driven cursor are fixed when the cursor is opened. Keyset-driven cursors are controlled by a set of unique identifiers (keys) known as the keyset. The keys are built from a set of columns that uniquely identify the rows in the result set. The keyset is the set of the key values from all the rows that qualified for the SELECT statement at the time the cursor was opened. The keyset for a keyset-driven cursor is built in tempdb when the cursor is opened.&lt;br /&gt;Changes to data values in nonkeyset columns (made by the cursor owner or committed by other users) are visible as the user scrolls through the cursor. Inserts to the database made outside the cursor are not visible in the cursor unless the cursor is closed and reopened. Inserts made through the cursor using an API function such as the ODBC SQLSetPos function are visible at the end of the cursor. @@FETCH_STATUS returns a "row missing" status when an attempt is made to fetch a row deleted after the cursor was opened. An update to a key column operates like a delete of the old key value followed by an insert of the new key value. The new key value is not visible if the update was not made through the cursor; it is visible at the end of the cursor if the update was made through the cursor using either an API function such as SQLSetPos or the Transact-SQL WHERE CURRENT OF clause and the SELECT statement did not contain a JOIN condition in the FROM clause. The new key value is not visible if the insert contained a remote table in the FROM clause. Attempts to retrieve the old key value get the same missing row fetch status as a deleted row.&lt;br /&gt;&lt;br /&gt;Q41.Suppose, I have a dynamic cursor attached to table in a database.  I have another means by which I will modify the table.  What do you think will the values in the cursor be, when use the cursor?&lt;br /&gt;When you move next record in cursor new inserted values fetched into cursor.&lt;br /&gt;&lt;br /&gt;Q42.What are joins?  What are the different kinds of joins?  What will happen to the rows the left outer join when there are no matching rows in the left table?  What is the difference between inner and outer joins?&lt;br /&gt;Join conditions can be specified in either the FROM or WHERE clauses; specifying them in the FROM clause is recommended. WHERE and HAVING clauses can also contain search conditions to further filter the rows selected by the join conditions.&lt;br /&gt;Joins can be categorized as:&lt;br /&gt;Inner joins (the typical join operation, which uses some comparison operator like = or &lt;&gt;). These include equi-joins and natural joins.&lt;br /&gt;Inner joins use a comparison operator to match rows from two tables based on the values in common columns from each table. For example, retrieving all rows where the student identification number is the same in both the students and courses tables.&lt;br /&gt;Outer joins. Outer joins can be a left, a right, or full outer join.&lt;br /&gt;Outer joins are specified with one of the following sets of keywords when they are specified in the FROM clause:&lt;br /&gt;LEFT JOIN or LEFT OUTER JOIN&lt;br /&gt;The result set of a left outer join includes all the rows from the left table specified in the LEFT OUTER clause, not just the ones in which the joined columns match. When a row in the left table has no matching rows in the right table, the associated result set row contains null values for all select list columns coming from the right table.&lt;br /&gt;RIGHT JOIN or RIGHT OUTER JOIN.&lt;br /&gt;A right outer join is the reverse of a left outer join. All rows from the right table are returned. Null values are returned for the left table any time a right table row has no matching row in the left table.&lt;br /&gt;FULL JOIN or FULL OUTER JOIN.&lt;br /&gt;A full outer join returns all rows in both the left and right tables. Any time a row has no match in the other table, the select list columns from the other table contain null values. When there is a match between the tables, the entire result set row contains data values from the base tables.&lt;br /&gt;Cross joins.&lt;br /&gt;Cross joins return all rows from the left table, each row from the left table is combined with all rows from the right table. Cross joins are also called Cartesian products.&lt;br /&gt;For example, here is an inner join retrieving the authors who live in the same city and state as a publisher:&lt;br /&gt;USE pubs&lt;br /&gt;SELECT a.au_fname, a.au_lname, p.pub_name&lt;br /&gt;FROM authors AS a INNER JOIN publishers AS p&lt;br /&gt;   ON a.city = p.city&lt;br /&gt;   AND a.state = p.state&lt;br /&gt;ORDER BY a.au_lname ASC, a.au_fname ASC&lt;br /&gt;Microsoft® SQL Server™ 2000 uses these SQL-92 keywords for outer joins specified in a FROM clause:&lt;br /&gt;LEFT OUTER JOIN or LEFT JOIN&lt;br /&gt;RIGHT OUTER JOIN or RIGHT JOIN&lt;br /&gt;FULL OUTER JOIN or FULL JOIN&lt;br /&gt;SQL Server supports both the SQL-92 outer join syntax and a legacy syntax for specifying outer joins based on using the *= and =* operators in the WHERE clause. The SQL-92 syntax is recommended because it is not subject to the ambiguity that sometimes results from the legacy Transact-SQL outer joins.&lt;br /&gt;Using Left Outer Joins&lt;br /&gt;Consider a join of the authors table and the publishers table on their city columns. The results show only the authors who live in cities in which a publisher is located (in this case, Abraham Bennet and Cheryl Carson).&lt;br /&gt;To include all authors in the results, regardless of whether a publisher is located in the same city, use an SQL-92 left outer join. The following is the query and results of the Transact-SQL left outer join:&lt;br /&gt;USE pubs&lt;br /&gt;SELECT a.au_fname, a.au_lname, p.pub_name&lt;br /&gt;FROM authors a LEFT OUTER JOIN publishers p&lt;br /&gt;   ON a.city = p.city&lt;br /&gt;ORDER BY p.pub_name ASC, a.au_lname ASC, a.au_fname ASC&lt;br /&gt;Here is the result set:&lt;br /&gt;au_fname             au_lname                       pub_name         &lt;br /&gt;-------------------- ------------------------------ -----------------&lt;br /&gt;Reginald             Blotchet-Halls                 NULL&lt;br /&gt;Michel               DeFrance                       NULL&lt;br /&gt;Innes                del Castillo                   NULL&lt;br /&gt;Ann                  Dull                           NULL&lt;br /&gt;Marjorie             Green                          NULL&lt;br /&gt;Morningstar          Greene                         NULL&lt;br /&gt;Burt                 Gringlesby                     NULL&lt;br /&gt;Sheryl               Hunter                         NULL&lt;br /&gt;Livia                Karsen                         NULL&lt;br /&gt;Charlene             Locksley                       NULL&lt;br /&gt;Stearns              MacFeather                     NULL&lt;br /&gt;Heather              McBadden                       NULL&lt;br /&gt;Michael              O'Leary                        NULL&lt;br /&gt;Sylvia               Panteley                       NULL&lt;br /&gt;Albert               Ringer                         NULL&lt;br /&gt;Anne                 Ringer                         NULL&lt;br /&gt;Meander              Smith                          NULL&lt;br /&gt;Dean                 Straight                       NULL&lt;br /&gt;Dirk                 Stringer                       NULL&lt;br /&gt;Johnson              White                          NULL&lt;br /&gt;Akiko                Yokomoto                       NULL&lt;br /&gt;Abraham              Bennet                         Algodata Infosystems&lt;br /&gt;Cheryl               Carson                         Algodata Infosystems&lt;br /&gt;(23 row(s) affected)&lt;br /&gt;The LEFT OUTER JOIN includes all rows in the authors table in the results, whether or not there is a match on the city column in the publishers table. Notice that in the results there is no matching data for most of the authors listed; therefore, these rows contain null values in the pub_name column.&lt;br /&gt;Using Right Outer Joins&lt;br /&gt;Consider a join of the authors table and the publishers table on their city columns. The results show only the authors who live in cities where a publisher is located (in this case, Abraham Bennet and Cheryl Carson). The SQL-92 right outer join operator, RIGHT OUTER JOIN, indicates all rows in the second table are to be included in the results, regardless of whether there is matching data in the first table.&lt;br /&gt;To include all publishers in the results, regardless of whether a city has a publisher located in the same city, use an SQL-92 right outer join. Here is the Transact-SQL query and results of the right outer join:&lt;br /&gt;USE pubs&lt;br /&gt;SELECT a.au_fname, a.au_lname, p.pub_name&lt;br /&gt;FROM authors AS a RIGHT OUTER JOIN publishers AS p&lt;br /&gt;   ON a.city = p.city&lt;br /&gt;ORDER BY p.pub_name ASC, a.au_lname ASC, a.au_fname ASC&lt;br /&gt;Here is the result set:&lt;br /&gt;au_fname             au_lname                 pub_name            &lt;br /&gt;-------------------- ------------------------ --------------------&lt;br /&gt;Abraham              Bennet                   Algodata Infosystems&lt;br /&gt;Cheryl               Carson                   Algodata Infosystems&lt;br /&gt;NULL                 NULL                     Binnet &amp;amp; Hardley&lt;br /&gt;NULL                 NULL                     Five Lakes Publishing&lt;br /&gt;NULL                 NULL                     GGG&amp;amp;G&lt;br /&gt;NULL                 NULL                     Lucerne Publishing&lt;br /&gt;NULL                 NULL                     New Moon Books&lt;br /&gt;NULL                 NULL                     Ramona Publishers&lt;br /&gt;NULL                 NULL                     Scootney Books&lt;br /&gt;(9 row(s) affected)&lt;br /&gt;An outer join can be further restricted by using a predicate (such as comparing the join to a constant). This example contains the same right outer join, but eliminates all titles that have sold fewer than 50 copies:&lt;br /&gt;USE pubs&lt;br /&gt;SELECT s.stor_id, s.qty, t.title&lt;br /&gt;FROM sales s RIGHT OUTER JOIN titles t&lt;br /&gt;   ON s.title_id = t.title_id&lt;br /&gt;   AND s.qty &gt; 50&lt;br /&gt;ORDER BY s.stor_id ASC&lt;br /&gt;Here is the result set:&lt;br /&gt;stor_id qty    title                                                    &lt;br /&gt;------- ------ ---------------------------------------------------------&lt;br /&gt;(null) (null) But Is It User Friendly?                                  &lt;br /&gt;(null) (null) Computer Phobic AND Non-Phobic Individuals: Behavior&lt;br /&gt;            Variations                 &lt;br /&gt;(null) (null) Cooking with Computers: Surreptitious Balance Sheets      &lt;br /&gt;(null) (null) Emotional Security: A New Algorithm                       &lt;br /&gt;(null) (null) Fifty Years in Buckingham Palace Kitchens                 &lt;br /&gt;7066   75     Is Anger the Enemy?                                       &lt;br /&gt;(null) (null) Life Without Fear                                         &lt;br /&gt;(null) (null) Net Etiquette                                             &lt;br /&gt;(null) (null) Onions, Leeks, and Garlic: Cooking Secrets of the&lt;br /&gt;            Mediterranean                 &lt;br /&gt;(null) (null) Prolonged Data Deprivation: Four Case Studies             &lt;br /&gt;(null) (null) Secrets of Silicon Valley                                 &lt;br /&gt;(null) (null) Silicon Valley Gastronomic Treats                         &lt;br /&gt;(null) (null) Straight Talk About Computers                             &lt;br /&gt;(null) (null) Sushi, Anyone?                                            &lt;br /&gt;(null) (null) The Busy Executive's Database Guide                       &lt;br /&gt;(null) (null) The Gourmet Microwave                                     &lt;br /&gt;(null) (null) The Psychology of Computer Cooking                        &lt;br /&gt;(null) (null) You Can Combat Computer Stress!                            &lt;br /&gt;(18 row(s) affected)&lt;br /&gt;For more information about predicates, see &lt;/span&gt;&lt;a href="javascript:hhobj_1.Click()"&gt;&lt;span style="font-family:arial;"&gt;WHERE&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;.&lt;br /&gt;Using Full Outer Joins&lt;br /&gt;To retain the nonmatching information by including nonmatching rows in the results of a join, use a full outer join. Microsoft® SQL Server™ 2000 provides the full outer join operator, FULL OUTER JOIN, which includes all rows from both tables, regardless of whether or not the other table has a matching value.&lt;br /&gt;Consider a join of the authors table and the publishers table on their city columns. The results show only the authors who live in cities in which a publisher is located (in this case, Abraham Bennet and Cheryl Carson). The SQL-92 FULL OUTER JOIN operator indicates that all rows from both tables are to be included in the results, regardless of whether there is matching data in the tables.&lt;br /&gt;To include all publishers and all authors in the results, regardless of whether a city has a publisher located in the same city, or whether a publisher is located in the same city, use a full outer join. The following is the query and results of the Transact-SQL full outer join:&lt;br /&gt;USE pubs&lt;br /&gt;SELECT a.au_fname, a.au_lname, p.pub_name&lt;br /&gt;FROM authors a FULL OUTER JOIN publishers p&lt;br /&gt;   ON a.city = p.city&lt;br /&gt;ORDER BY p.pub_name ASC, a.au_lname ASC, a.au_fname ASC&lt;br /&gt;Here is the result set:&lt;br /&gt;au_fname             au_lname                     pub_name            &lt;br /&gt;-------------------- ---------------------------- --------------------&lt;br /&gt;Reginald             Blotchet-Halls               NULL&lt;br /&gt;Michel               DeFrance                     NULL&lt;br /&gt;Innes                del Castillo                 NULL&lt;br /&gt;Ann                  Dull                         NULL&lt;br /&gt;Marjorie             Green                        NULL&lt;br /&gt;Morningstar          Greene                       NULL&lt;br /&gt;Burt                 Gringlesby                   NULL&lt;br /&gt;Sheryl               Hunter                       NULL&lt;br /&gt;Livia                Karsen                       NULL&lt;br /&gt;Charlene             Locksley                     NULL&lt;br /&gt;Stearns              MacFeather                   NULL&lt;br /&gt;Heather              McBadden                     NULL&lt;br /&gt;Michael              O'Leary                      NULL&lt;br /&gt;Sylvia               Panteley                     NULL&lt;br /&gt;Albert               Ringer                       NULL&lt;br /&gt;Anne                 Ringer                       NULL&lt;br /&gt;Meander              Smith                        NULL&lt;br /&gt;Dean                 Straight                     NULL&lt;br /&gt;Dirk                 Stringer                    NULL&lt;br /&gt;Johnson              White                        NULL&lt;br /&gt;Akiko                Yokomoto                     NULL&lt;br /&gt;Abraham              Bennet                       Algodata Infosystems&lt;br /&gt;Cheryl               Carson                       Algodata Infosystems&lt;br /&gt;NULL                 NULL                         Binnet &amp;amp; Hardley&lt;br /&gt;NULL                 NULL                         Five Lakes Publishing&lt;br /&gt;NULL                 NULL                         GGG&amp;amp;G&lt;br /&gt;NULL                 NULL                         Lucerne Publishing&lt;br /&gt;NULL                 NULL                         New Moon Books&lt;br /&gt;NULL                 NULL                         Ramona Publishers&lt;br /&gt;NULL                 NULL                         Scootney Books&lt;br /&gt;(30 row(s) affected)&lt;br /&gt;A cross join that does not have a WHERE clause produces the Cartesian product of the tables involved in the join. The size of a Cartesian product result set is the number of rows in the first table multiplied by the number of rows in the second table. This is an example of a Transact-SQL cross join:&lt;br /&gt;USE pubs&lt;br /&gt;SELECT au_fname, au_lname, pub_name&lt;br /&gt;FROM authors CROSS JOIN publishers&lt;br /&gt;ORDER BY au_lname DESC&lt;br /&gt;The result set contains 184 rows (authors has 23 rows and publishers has 8; 23 multiplied by 8 equals 184).&lt;br /&gt;However, if a WHERE clause is added, the cross join behaves as an inner join. For example, these Transact-SQL queries produce the same result set:&lt;br /&gt;USE pubs&lt;br /&gt;SELECT au_fname, au_lname, pub_name&lt;br /&gt;FROM authors CROSS JOIN publishers&lt;br /&gt;WHERE authors.city = publishers.city&lt;br /&gt;ORDER BY au_lname DESC&lt;br /&gt;-- Or&lt;br /&gt;USE pubs&lt;br /&gt;SELECT au_fname, au_lname, pub_name&lt;br /&gt;FROM authors INNER JOIN publishers&lt;br /&gt;ON authors.city = publishers.city&lt;br /&gt;ORDER BY au_lname DESC&lt;br /&gt;A table can be joined to itself in a self-join. For example, you can use a self-join to find out the authors in Oakland, California who live in the same ZIP Code area.&lt;br /&gt;Because this query involves a join of the authors table with itself, the authors table appears in two roles. To distinguish these roles, you must give the authors table two different aliases  (au1 and au2) in the FROM clause. These aliases are used to qualify the column names in the rest of the query. This is an example of the self-join Transact-SQL statement:&lt;br /&gt;USE pubs&lt;br /&gt;SELECT au1.au_fname, au1.au_lname, au2.au_fname, au2.au_lname&lt;br /&gt;FROM authors au1 INNER JOIN authors au2&lt;br /&gt;   ON au1.zip = au2.zip&lt;br /&gt;WHERE au1.city = 'Oakland'&lt;br /&gt;ORDER BY au1.au_fname ASC, au1.au_lname ASC&lt;br /&gt;Null Values and Joins&lt;br /&gt;When there are null values in the columns of the tables being joined, the null values do not match each other. The presence of null values in a column from one of the tables being joined can be returned only by using an outer join (unless the WHERE clause excludes null values).&lt;br /&gt;Here are two tables that each have NULL in the column that will participate in the join:&lt;br /&gt;table1                          table2&lt;br /&gt;a           b                   c            d&lt;br /&gt;-------     ------              -------      ------&lt;br /&gt;      1        one                 NULL         two&lt;br /&gt;   NULL      three                    4        four&lt;br /&gt;      4      join4&lt;br /&gt;A join that compares the values in column a against column c does not get a match on the columns that have values of NULL:&lt;br /&gt;SELECT *&lt;br /&gt;FROM table1 t1 JOIN table2 t2&lt;br /&gt;   ON t1.a = t2.c&lt;br /&gt;ORDER BY t1.a&lt;br /&gt;Only one row with 4 in column a and c is returned:&lt;br /&gt;a           b      c           d     &lt;br /&gt;----------- ------ ----------- ------&lt;br /&gt;4           join4  4           four   &lt;br /&gt;(1 row(s) affected)&lt;br /&gt;Null values returned from a base table are also difficult to distinguish from the null values returned from an outer join. For example, this SELECT statement does a left outer join on these two tables:&lt;br /&gt;SELECT *&lt;br /&gt;FROM table1 t1 LEFT OUTER JOIN table2 t2&lt;br /&gt;   ON t1.a = t2.c&lt;br /&gt;ORDER BY t1.a&lt;br /&gt;Here is the result set:&lt;br /&gt;a           b      c           d     &lt;br /&gt;----------- ------ ----------- ------&lt;br /&gt;NULL        three  NULL        NULL&lt;br /&gt;1           one    NULL        NULL&lt;br /&gt;4           join4  4           four   &lt;br /&gt;(3 row(s) affected)&lt;br /&gt;The results do not make it easy to distinguish a NULL in the data from a NULL that represents a failure to join. When null values are present in data being joined, it is usually preferable to omit them from the results by using a regular join.&lt;br /&gt;&lt;br /&gt;Q43.What are ‘jobs’ in SQL Server?  How do we create one?&lt;br /&gt;A job is a specified series of operations performed sequentially by SQL Server Agent. A job can perform a wide range of activities, including running Transact-SQL scripts, command line applications, and Microsoft® ActiveX® scripts. Jobs can be created to run tasks that are often repeated or schedulable, and they can automatically notify users of job status by generating alerts.&lt;br /&gt;&lt;br /&gt;Q44.What are the different types of Back-ups possible in SQL Server and how would you do that?&lt;br /&gt;Full backup A full database backup basically copies all the pages from a database onto a backup device, which can be a local or network disk file, a local tape drive, or even a named pipe.&lt;br /&gt;Differential backup A differential backup copies only the extents that were changed since the last full backup was made. The extents are copied onto a specified backup device. SQL Server can quickly tell which extents need to be backed up by examining the bits on the DCM pages for each data file in the database. Each time a full backup is made, all the bits are cleared to 0. When any page in an extent is changed, its corresponding bit in the DCM page is changed to 1.&lt;br /&gt;Log backup In most cases, a log backup copies all the log records that have been written to the transaction log since the last full or log backup was made. However, the exact behavior of the BACKUP LOG command depends on your database's recovery mode setting. I'll discuss recovery modes shortly.&lt;br /&gt;&lt;br /&gt;Q46.What is Candidate key, alternate key and composite key?&lt;br /&gt;      A candidate key is one that can identify each row of a table uniquely. Generally a candidate key becomes the primary key of the table. If the table has more than one candidate key, one of them will become the primary key, and the rest are called alternate keys. A key formed by combining at least two or more columns is called composite key.&lt;br /&gt;&lt;br /&gt;Q47.What are the different error handling mechanisms we have in vb.net compared to VB 6.0?&lt;br /&gt;Visual Basic 6.0 error handling mechanism&lt;br /&gt;.NET Framework provides structured exception handling, using the Try, Catch, Finally, and Throw keywords in Visual Basic .NET. This type of error handling has been available, in some fashion, in C++ for a number of years. With the release of the .NET common language runtime, this type of error handling is available to all the .NET languages including, Visual Basic .NET.&lt;br /&gt;Visual Basic 6.0 requires you to jump around within procedures, in order to handle errors. The On Error Goto, Resume, and Resume Next statements all involve jumping forwards or backwards in code. The standard Visual Basic 6.0 error-handling techniques involve at least one jump, and often more, within a procedure (one forward to the error handling block, and a second back to a common procedure exit point.)&lt;br /&gt;If you follow good programming practices in Visual Basic 6.0, including ensuring that your procedures have only a single exit point, the most convenient place to put that exit point is in the middle of procedures (before the error-handling block), making it easy to forget the important Exit Sub or Exit Function.&lt;br /&gt;There is no way to push and pop error handlers in Visual Basic 6.0. If you want to preserve the current error trap, set up a different one, and then return back to the first one. You must remember to include the correct On Error Goto… statement every time you want to change handlers.&lt;br /&gt;Visual Basic 6.0 includes only a single Err object. If an error occurs, and you don't handle that error immediately, you may have permanently lost the error information before you get a chance to handle the error.&lt;br /&gt;The Visual Basic 6.0 documentation includes almost no coverage of the types of errors (that is, the error numbers) you might receive because of an action you've taken in your code. Your only recourse is to experiment, see what error numbers you can generate by triggering errors while testing, and trap those specific errors in your code.&lt;br /&gt;Visual Basic developers were perfectly capable of using the Err.Raise method to raise errors back to calling procedures, this technique never became a standard. Many developers creating code that is called by others simply return an error value to indicate success or failure, instead of raising an error on failure. Because it's possible (and easy) to simply disregard error values returned from procedures you call, in too many cases, code that fails for any reason at runtime never raises the appropriate errors back to its callers.&lt;br /&gt;DOT Net error handling mechanism&lt;br /&gt;Error handling in .NET is based on the Exception class, which contains information about not only the current error, but a linked list of errors that may have triggered the current error.&lt;br /&gt;You can inherit from the Exception class, creating your own exceptions that have the same functionality as the base class, or you can create extended functionality as necessary. Because your code can trap for specific exceptions, creating your own Exception class gives you a lot of flexibility.&lt;br /&gt;Because every class in the .NET framework throws exceptions when it encounters runtime errors, developers will get in the habit of trapping for exceptions and handling them. This makes it more likely that exceptions you throw from within your components will be successfully handled.&lt;br /&gt;You can nest Try/Catch blocks within the Try, Catch, or Finally blocks. This gives developers the capability of managing exception handling to any level of granularity that they require.&lt;br /&gt;&lt;br /&gt;Q48. What are virtual destructors?&lt;br /&gt;     A virtual destructor is an essential entity if you use inheritance. Virtual destructor is declared in a base class. It guarantees that for all classes derived from the base class all destructors: 1) will be called and 2) will be called in proper order. It makes available a polymorphic behavior. Take a look at the snippet below:&lt;br /&gt;#include "stdio.h"&lt;br /&gt;class BaseClass&lt;br /&gt;{&lt;br /&gt;      int id;&lt;br /&gt;public:&lt;br /&gt;      BaseClass() { printf("BaseClass()\n"); }&lt;br /&gt;      virtual ~BaseClass() { printf("~BaseClass()\n"); } //    !!!&lt;br /&gt;};&lt;br /&gt;class Class1 : public BaseClass&lt;br /&gt;{&lt;br /&gt;      int id;&lt;br /&gt;public:&lt;br /&gt;      Class1() { printf("Class1()\n"); }&lt;br /&gt;      ~Class1() { printf("~Class1()\n"); }&lt;br /&gt;};&lt;br /&gt;class Class2 : public Class1&lt;br /&gt;{&lt;br /&gt;      int id;&lt;br /&gt;public:&lt;br /&gt;      Class2() { printf("Class2()\n"); }&lt;br /&gt;      ~Class2() { printf("~Class2()\n"); }&lt;br /&gt;}; &lt;br /&gt;int main(int argc, char* argv[])&lt;br /&gt;{&lt;br /&gt;      BaseClass *p = new Class2;&lt;br /&gt;      delete p;&lt;br /&gt;      return 0;&lt;br /&gt;}&lt;br /&gt;     The output in case without virtual destructor is:&lt;br /&gt;BaseClass()&lt;br /&gt;Class1()&lt;br /&gt;Class2()&lt;br /&gt;~BaseClass()&lt;br /&gt;     But the output in case with virtual destructor differs:&lt;br /&gt;BaseClass()&lt;br /&gt;Class1()&lt;br /&gt;Class2()&lt;br /&gt;~Class2()&lt;br /&gt;~Class1()&lt;br /&gt;~BaseClass()&lt;br /&gt;&lt;br /&gt;Q49. what is use of ‘USING’ in sub or function ?&lt;br /&gt;The using statement defines a scope at the end of which an object will be disposed.&lt;br /&gt;using (expression  type identifier = initializer) statement&lt;br /&gt;where:&lt;br /&gt;expression&lt;br /&gt;An expression you want to call Dispose on upon exiting the using statement.&lt;br /&gt;type&lt;br /&gt;The type of identifier.&lt;br /&gt;identifier&lt;br /&gt;The name, or identifier, of the type type. It is possible to define more than one identifier of type type. Precede each identifier = initializer with a comma.&lt;br /&gt;initializer&lt;br /&gt;An expression that creates an object.&lt;br /&gt;statement&lt;br /&gt;The embedded statement or statements to executed.&lt;br /&gt;Remarks&lt;br /&gt;You create an instance in a using statement to ensure that Dispose is called on the object when the using statement is exited. A using statement can be exited either when the end of the using statement is reached or if, for example, an exception is thrown and control leaves the statement block before the end of the statement.&lt;br /&gt;The object you instantiate must implement the System.IDisposable interface.&lt;br /&gt;Example&lt;br /&gt;// cs_using_statement.cs&lt;br /&gt;// compile with /reference:System.Drawing.dll&lt;br /&gt;using System.Drawing;&lt;br /&gt;class a&lt;br /&gt;{&lt;br /&gt;   public static void Main()&lt;br /&gt;   {&lt;br /&gt;      using (Font MyFont = new Font("Arial", 10.0f), MyFont2 = new Font("Arial", 10.0f))&lt;br /&gt;      {&lt;br /&gt;         // use MyFont and MyFont2&lt;br /&gt;      }   // compiler will call Dispose on MyFont and MyFont2&lt;br /&gt;      Font MyFont3 = new Font("Arial", 10.0f);&lt;br /&gt;      using (MyFont3)&lt;br /&gt;      {&lt;br /&gt;         // use MyFont3&lt;br /&gt;      }   // compiler will call Dispose on MyFont3&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Q50. What are abstract, virtual, static, friend, interface keywords?  When do we use each and what does each mean? And related questions.&lt;br /&gt;Abstract:&lt;br /&gt;The abstract modifier is used to indicate that a class is incomplete and that it is intended to be used only as a base class. An abstract class differs from a non-abstract class in the following ways:&lt;br /&gt;An abstract class cannot be instantiated directly, and it is a compile-time error to use the new operator on an abstract class. While it is possible to have variables and values whose compile-time types are abstract, such variables and values will necessarily either be null or contain references to instances of non-abstract classes derived from the abstract types.&lt;br /&gt;An abstract class is permitted (but not required) to contain abstract members.&lt;br /&gt;An abstract class cannot be sealed.&lt;br /&gt;When a non-abstract class is derived from an abstract class, the non-abstract class must include actual implementations of all inherited abstract members, thereby overriding those abstract members. In the example&lt;br /&gt;abstract class A&lt;br /&gt;{&lt;br /&gt;   public abstract void F();&lt;br /&gt;}&lt;br /&gt;abstract class B: A&lt;br /&gt;{&lt;br /&gt;   public void G() {}&lt;br /&gt;}&lt;br /&gt;class C: B&lt;br /&gt;{&lt;br /&gt;   public override void F() {&lt;br /&gt;      // actual implementation of F&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;the abstract class A introduces an abstract method F. Class B introduces an additional method G, but since it doesn't provide an implementation of F, B must also be declared abstract. Class C overrides F and provides an actual implementation. Since there are no abstract members in C, C is permitted (but not required) to be non-abstract.&lt;br /&gt;Virtual&lt;br /&gt;The virtual keyword is used to modify a method or property declaration, in which case the method or the property is called a virtual member. The implementation of a virtual member can be changed by an &lt;/span&gt;&lt;a href="ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/csref/html/vclrfoverridepg.htm"&gt;&lt;span style="font-family:arial;"&gt;overriding member&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; in a derived class. &lt;br /&gt;When a virtual method is invoked, the run-time type of the object is checked for an overriding member. The overriding member in the most derived class is called, which might be the original member, if no derived class has overridden the member. &lt;br /&gt;By default, methods are non-virtual. You cannot override a non-virtual method.&lt;br /&gt;You cannot use the virtual modifier with the following modifiers:&lt;br /&gt;static   abstract   override&lt;br /&gt;Virtual properties behave like abstract methods, except for the differences in declaration and invocation syntax.&lt;br /&gt;It is an error to use the virtual modifier on a static property.&lt;br /&gt;A virtual inherited property can be overridden in a derived class by including a property declaration that uses the override modifier.&lt;br /&gt;For more information on virtual methods, see 10.5.3 Virtual methods.&lt;br /&gt;Example&lt;br /&gt;In this example, the class Dimensions contains the two coordinates x, y, and the Area() virtual method. Different shape classes such as Circle, Cylinder, and Sphere inherit the Dimensions class, and the surface area is calculated for each figure. Each derived class has it own override implementation of Area(). The program calculates and displays the proper area for each figure by invoking the proper implementation of Area() according to the object associated with the method.&lt;br /&gt;// cs_virtual_keyword.cs&lt;br /&gt;// Virtual and override&lt;br /&gt;using System;&lt;br /&gt;class TestClass&lt;br /&gt;{&lt;br /&gt;   public class Dimensions&lt;br /&gt;   {&lt;br /&gt;      public const double pi = Math.PI;&lt;br /&gt;      protected double x, y;&lt;br /&gt;      public Dimensions()&lt;br /&gt;      {&lt;br /&gt;      }&lt;br /&gt;      public Dimensions (double x, double y)&lt;br /&gt;      {&lt;br /&gt;         this.x = x;&lt;br /&gt;         this.y = y;&lt;br /&gt;      }&lt;br /&gt;      public virtual double Area()&lt;br /&gt;      {&lt;br /&gt;         return x*y;&lt;br /&gt;      }&lt;br /&gt;   }&lt;br /&gt;   public class Circle: Dimensions&lt;br /&gt;   {&lt;br /&gt;      public Circle(double r): base(r, 0)&lt;br /&gt;      {&lt;br /&gt;      }&lt;br /&gt;      public override double Area()&lt;br /&gt;      {&lt;br /&gt;         return pi * x * x;&lt;br /&gt;      }&lt;br /&gt;   }&lt;br /&gt;   class Sphere: Dimensions&lt;br /&gt;   {&lt;br /&gt;      public Sphere(double r): base(r, 0)&lt;br /&gt;      {&lt;br /&gt;      }&lt;br /&gt;      public override double Area()&lt;br /&gt;      {&lt;br /&gt;         return 4 * pi * x * x;&lt;br /&gt;      }&lt;br /&gt;   }&lt;br /&gt;   class Cylinder: Dimensions&lt;br /&gt;   {&lt;br /&gt;      public Cylinder(double r, double h): base(r, h)&lt;br /&gt;      {&lt;br /&gt;      }&lt;br /&gt;      public override double Area()&lt;br /&gt;      {&lt;br /&gt;         return 2*pi*x*x + 2*pi*x*y;&lt;br /&gt;      }&lt;br /&gt;   }&lt;br /&gt;   public static void Main() &lt;br /&gt;   {&lt;br /&gt;      double r = 3.0, h = 5.0;&lt;br /&gt;      Dimensions c = new Circle(r);&lt;br /&gt;      Dimensions s = new Sphere(r);&lt;br /&gt;      Dimensions l = new Cylinder(r, h);&lt;br /&gt;      // Display results:&lt;br /&gt;      Console.WriteLine("Area of Circle   = {0:F2}", c.Area());&lt;br /&gt;      Console.WriteLine("Area of Sphere   = {0:F2}", s.Area());&lt;br /&gt;      Console.WriteLine("Area of Cylinder = {0:F2}", l.Area());&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;Output&lt;br /&gt;Area of Circle   = 28.27&lt;br /&gt;Area of Sphere   = 113.10&lt;br /&gt;Area of Cylinder = 150.80&lt;br /&gt;In the preceding example, notice that the inherited classes Circle, Sphere, and Cylinder are all using constructors that initialize the base class, for example:&lt;br /&gt;public Cylinder(double r, double h): base(r, h) {}&lt;br /&gt;This is analogous to the C++ initialization list.&lt;br /&gt;&lt;/span&gt;&lt;a name="B0000001"&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;Virtual methods&lt;br /&gt;When an instance method declaration includes a virtual modifier, that method is said to be a virtual method. When no virtual modifier is present, the method is said to be a non-virtual method.&lt;br /&gt;The implementation of a non-virtual method is invariant: The implementation is the same whether the method is invoked on an instance of the class in which it is declared or an instance of a derived class. In contrast, the implementation of a virtual method can be superseded by derived classes. The process of superseding the implementation of an inherited virtual method is known as overriding that method &lt;/span&gt;&lt;a href="ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/csspec/html/vclrfcsharpspec_10_5_4.htm"&gt;&lt;span style="font-family:arial;"&gt;(Section 10.5.4)&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;.&lt;br /&gt;In a virtual method invocation, the run-time type of the instance for which that invocation takes place determines the actual method implementation to invoke. In a non-virtual method invocation, the compile-time type of the instance is the determining factor. In precise terms, when a method named N is invoked with an argument list A on an instance with a compile-time type C and a run-time type R (where R is either C or a class derived from C), the invocation is processed as follows:&lt;br /&gt;First, overload resolution is applied to C, N, and A, to select a specific method M from the set of methods declared in and inherited by C. This is described in &lt;/span&gt;&lt;a href="ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/csspec/html/vclrfcsharpspec_7_5_5_1.htm"&gt;&lt;span style="font-family:arial;"&gt;Section 7.5.5.1&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;.&lt;br /&gt;Then, if M is a non-virtual method, M is invoked.&lt;br /&gt;Otherwise, M is a virtual method, and the most derived implementation of M with respect to R is invoked.&lt;br /&gt;For every virtual method declared in or inherited by a class, there exists a most derived implementation of the method with respect to that class. The most derived implementation of a virtual method M with respect to a class R is determined as follows:&lt;br /&gt;If R contains the introducing virtual declaration of M, then this is the most derived implementation of M.&lt;br /&gt;Otherwise, if R contains an override of M, then this is the most derived implementation of M.&lt;br /&gt;Otherwise, the most derived implementation of M with respect to R is the same as the most derived implementation of M with respect to the direct base class of R.&lt;br /&gt;The following example illustrates the differences between virtual and non-virtual methods:&lt;br /&gt;using System;&lt;br /&gt;class A&lt;br /&gt;{&lt;br /&gt;   public void F() { Console.WriteLine("A.F"); }&lt;br /&gt;   public virtual void G() { Console.WriteLine("A.G"); }&lt;br /&gt;}&lt;br /&gt;class B: A&lt;br /&gt;{&lt;br /&gt;   new public void F() { Console.WriteLine("B.F"); }&lt;br /&gt;   public override void G() { Console.WriteLine("B.G"); }&lt;br /&gt;}&lt;br /&gt;class Test&lt;br /&gt;{&lt;br /&gt;   static void Main() {&lt;br /&gt;      B b = new B();&lt;br /&gt;      A a = b;&lt;br /&gt;      a.F();&lt;br /&gt;      b.F();&lt;br /&gt;      a.G();&lt;br /&gt;      b.G();&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;In the example, A introduces a non-virtual method F and a virtual method G. The class B introduces a new non-virtual method F, thus hiding the inherited F, and also overrides the inherited method G. The example produces the output:&lt;br /&gt;A.F&lt;br /&gt;B.F&lt;br /&gt;B.G&lt;br /&gt;B.G&lt;br /&gt;Notice that the statement a.G() invokes B.G, not A.G. This is because the run-time type of the instance (which is B), not the compile-time type of the instance (which is A), determines the actual method implementation to invoke.&lt;br /&gt;Because methods are allowed to hide inherited methods, it is possible for a class to contain several virtual methods with the same signature. This does not present an ambiguity problem, since all but the most derived method are hidden. In the example&lt;br /&gt;using System;&lt;br /&gt;class A&lt;br /&gt;{&lt;br /&gt;   public virtual void F() { Console.WriteLine("A.F"); }&lt;br /&gt;}&lt;br /&gt;class B: A&lt;br /&gt;{&lt;br /&gt;   public override void F() { Console.WriteLine("B.F"); }&lt;br /&gt;}&lt;br /&gt;class C: B&lt;br /&gt;{&lt;br /&gt;   new public virtual void F() { Console.WriteLine("C.F"); }&lt;br /&gt;}&lt;br /&gt;class D: C&lt;br /&gt;{&lt;br /&gt;   public override void F() { Console.WriteLine("D.F"); }&lt;br /&gt;}&lt;br /&gt;class Test&lt;br /&gt;{&lt;br /&gt;   static void Main() {&lt;br /&gt;      D d = new D();&lt;br /&gt;      A a = d;&lt;br /&gt;      B b = d;&lt;br /&gt;      C c = d;&lt;br /&gt;      a.F();&lt;br /&gt;      b.F();&lt;br /&gt;      c.F();&lt;br /&gt;      d.F();&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;the C and D classes contain two virtual methods with the same signature: The one introduced by A and the one introduced by C. The method introduced by C hides the method inherited from A. Thus, the override declaration in D overrides the method introduced by C, and it is not possible for D to override the method introduced by A. The example produces the output:&lt;br /&gt;B.F&lt;br /&gt;B.F&lt;br /&gt;D.F&lt;br /&gt;D.F&lt;br /&gt;Note that it is possible to invoke the hidden virtual method by accessing an instance of D through a less derived type in which the method is not hidden.&lt;br /&gt;Static&lt;br /&gt;Use the static modifier to declare a static member, which belongs to the type itself rather than to a specific object. The static modifier can be used with fields, methods, properties, operators, events and constructors, but cannot be used with indexers, destructors, or types.&lt;br /&gt;Remarks&lt;br /&gt;A constant or type declaration is implicitly a static member.&lt;br /&gt;A static member cannot be referenced through an instance. Instead, it is referenced through the type name. For example, consider the following class:&lt;br /&gt;      public class MyBaseC&lt;br /&gt;      {&lt;br /&gt;         public struct MyStruct {&lt;br /&gt;            public static int x = 100;&lt;br /&gt;         }&lt;br /&gt;      }&lt;br /&gt;To refer to the static member x, use the fully qualified name (unless it is accessible from the same scope):&lt;br /&gt;MyBaseC.MyStruct.x&lt;br /&gt;While an instance of a class contains a separate copy of all instance fields of the class, there is only one copy of each static field.&lt;br /&gt;It is not possible to use this to reference static methods or property accessors.&lt;br /&gt;Note   The static keyword is more limited in use than in C++. To compare with the C++ keyword, see static in the C++ Language Reference.&lt;br /&gt;To demonstrate instance members, consider a class that represents a company employee. Assume that the class contains a method to count employees and a field to store the number of employees. Both the method and the field do not belong to any instance employee. Instead they belong to the company class. Therefore, they should be declared as static members of the class.&lt;br /&gt;Interfaces&lt;br /&gt;Interfaces, like classes, define a set of properties, methods, and events. But unlike classes, interfaces do not provide implementation. They are implemented by classes, and defined as separate entities from classes.&lt;br /&gt;An interface represents a contract, in that a class that implements an interface must implement every aspect of that interface exactly as it is defined.&lt;br /&gt;With interfaces, you can define features as small groups of closely related members. You can develop enhanced implementations for your interfaces without jeopardizing existing code, thus minimizing compatibility problems. You can also add new features at any time by developing additional interfaces and implementations.&lt;br /&gt;Although interface implementations can evolve, interfaces themselves cannot be changed once published. Changes to a published interface may break existing code. If you think of an interface as a contract, it is clear that both sides of the contract have a role to play. The publisher of an interface agrees never to change that interface, and the implementer agrees to implement the interface exactly as it was designed.&lt;br /&gt;Versions of Visual Basic prior to Visual Basic .NET could consume interfaces but not create them directly. Visual Basic .NET allows you to define true interfaces using the Interface statement, and to implement interfaces with an improved version of the Implements keyword.&lt;br /&gt;&lt;br /&gt;Q51. What is a static constructor?&lt;br /&gt;A static constructor is used to initialize a class and is called automatically to initialize the class before the static members are accessed.   A static constructor is only called once throughout the application's lifetime. The static constructor method is called when any of the defining class' members are first accessed. The constructor is called once only.&lt;br /&gt;public class myClass {&lt;br /&gt;     // a constructor method has the same name as that of the class containing it&lt;br /&gt;     // constructors have no return types&lt;br /&gt;     static myClass() {&lt;br /&gt;         &lt;br /&gt;     }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Q52. What is shared keyword?  Should we have only shared methods in a shared class?&lt;br /&gt;The Shared keyword indicates that one or more declared programming elements are shared. Shared elements are not associated with a specific instance of a class or structure. You can access them by qualifying them either with the class or structure name, or with the variable name of a specific instance of the class or structure.&lt;br /&gt;&lt;br /&gt;Q53. What are namespaces and why do we use them?&lt;br /&gt;Namespaces organize the objects defined in an assembly. Assemblies can contain multiple namespaces, which can in turn contain other namespaces. Namespaces prevent ambiguity and simplify references when using large groups of objects such as class libraries.&lt;br /&gt;For example, Visual Studio .NET defines the ListBox class in the System.Windows.Forms namespace. The following code fragment shows how to declare a variable using the fully qualified name for this class:&lt;br /&gt;Dim LBox As System.Windows.Forms.ListBox&lt;br /&gt;Namespaces address a problem sometimes known as namespace pollution, in which the developer of a class library is hampered by the use of similar names in another library. These conflicts with existing components are sometimes called name collisions.&lt;br /&gt;For example, if you create a new class named ListBox, you can use it inside your project without qualification. However, if you want to use the Visual Studio .NET ListBox class in the same project, you must use a fully qualified reference to make the reference unique. If the reference is not unique, Visual Basic .NET produces an error stating that the name is ambiguous. The following code example demonstrates how to declare these objects:&lt;br /&gt;'   Define a new object based on your ListBox class.&lt;br /&gt;Dim LBC as New ListBox&lt;br /&gt;'   Define a new Windows.Forms ListBox control.&lt;br /&gt;Dim MyLB as New System.Windows.Forms.ListBox &lt;br /&gt;&lt;br /&gt;Q54. What is Garbage collector?  What is the namespace we use to work with it?&lt;br /&gt;The .NET Framework's garbage collector manages the allocation and release of memory for your application. Each time you use the new operator to create an object, the runtime allocates memory for the object from the managed heap. As long as address space is available in the managed heap, the runtime continues to allocate space for new objects. However, memory is not infinite. Eventually the garbage collector must perform a collection in order to free some memory. The garbage collector's optimizing engine determines the best time to perform a collection, based upon the allocations being made. When the garbage collector performs a collection, it checks for objects in the managed heap that are no longer being used by the application and performs the necessary operations to reclaim their memory.&lt;br /&gt;System.GC is the name space we use&lt;br /&gt;&lt;br /&gt;Q55. What is the use of GC?  What does it primarily do?&lt;br /&gt;Controls the system garbage collector, a service that automatically reclaims unused memory.&lt;br /&gt;&lt;br /&gt;Q56. What is the namespace used to create controls?&lt;br /&gt;System.web.UI.Usercontrols&lt;br /&gt;System.Web.UI.WebControls&lt;br /&gt;System.Windows.Forms.&lt;br /&gt;&lt;br /&gt;Q57. What is GAC?  What are the different ways to put an assembly in GAC?&lt;br /&gt;The global assembly cache stores assemblies specifically designated to be shared by several applications on the computer.&lt;br /&gt;You should share assemblies by installing them into the global assembly cache only when you need to. As a general guideline, keep assembly dependencies private, and locate assemblies in the application directory unless sharing an assembly is explicitly required. In addition, it is not necessary to install assemblies into the global assembly cache to make them accessible to COM interop or unmanaged code.&lt;br /&gt;There are two ways to install an assembly into the global assembly cache:&lt;br /&gt;Using Microsoft Windows Installer 2.0.&lt;br /&gt;This is the recommended and most common way to add assemblies to the global assembly cache. The installer provides reference counting of assemblies in the global assembly cache, plus other benefits.&lt;br /&gt;Using the Global Assembly Cache tool (Gacutil.exe).&lt;br /&gt;You can use Gacutil.exe to add strong-named assemblies to the global assembly cache and to view the contents of the global assembly cache.&lt;br /&gt;Note   Gacutil.exe is only for development purposes and should not be used to install production assemblies into the global assembly cache.&lt;br /&gt;To install a strong-named assembly into the global assembly cache&lt;br /&gt;At the command prompt, type the following command:&lt;br /&gt;gacutil –I &lt;assembly&gt;&lt;br /&gt;In this command, assembly name is the name of the assembly to install in the global assembly cache.&lt;br /&gt;The following example installs an assembly with the file name hello.dll into the global assembly cache.&lt;br /&gt;gacutil -i hello.dll&lt;br /&gt;In deployment scenarios, use Windows Installer 2.0 to install assemblies into the global assembly cache. Use Windows Explorer or the Global Assembly Cache tool only in development scenarios, because they do not provide assembly reference counting and other features provided when using the Windows Installer.&lt;br /&gt;&lt;br /&gt;Q58. I have a webmethod in a webservice that has to return the data from a particular table?  What are the different ways you would try achieving this?  Specifically, whether you would use datareader or a dataset and why?&lt;br /&gt;Webservices purely depend on xml Dataset will used to thru XML output.&lt;br /&gt;Dataset GetXML method&lt;br /&gt;Returns the XML representation of the data stored in the &lt;/span&gt;&lt;a href="ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpref/html/frlrfsystemdatadatasetclasstopic.htm"&gt;&lt;span style="font-family:arial;"&gt;DataSet&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;.&lt;br /&gt;&lt;br /&gt;Q59. What are all the different types of formatters available? What kind of formatters would you use for remoting purposes and for webservices and why?&lt;br /&gt;The .NET serialization formatters encode and decode the messages between .NET applications and application domains. There are two native formatters in the .NET runtime, namely Binary (System.Runtime.Serialization.Formatters.Binary) and SOAP (System.Runtime.Serialization.Formatters.Soap). &lt;br /&gt;&lt;br /&gt;Q60. What is SOAP?&lt;br /&gt;SOAP is a lightweight and simple XML-based protocol that is designed to exchange structured and typed information on the Web. The purpose of SOAP is to enable rich and automated Web services based on a shared and open Web infrastructure. SOAP can be used in combination with a variety of existing Internet protocols and formats, and can support a wide range of applications from messaging systems to RPC. &lt;br /&gt;Q61. What is COM?  What is the basic interface that has to be supported to be called a COM implementation?&lt;br /&gt;The Microsoft Component Object Model (COM) is a platform-independent, distributed, object-oriented system for creating binary software components that can interact. COM is the foundation technology for Microsoft's OLE (compound documents), ActiveX® (Internet-enabled components), as well as others.&lt;br /&gt;To understand COM (and therefore all COM-based technologies), it is crucial to understand that it is not an object-oriented language but a standard. Nor does COM specify how an application should be structured; language, structure, and implementation details are left to the application programmer. Rather, COM specifies an object model and programming requirements that enable COM objects (also called COM components, or sometimes simply objects) to interact with other objects. These objects can be within a single process, in other processes, and can even be on remote machines. They can have been written in other languages, and they may be structurally quite dissimilar, which is why COM is referred to as a binary standard—a standard that applies after a program has been translated to binary machine code.&lt;br /&gt;COM defines the essential nature of a COM object. In general, a software object is made up of a set of data and the functions that manipulate the data. A COM object is one in which access to an object's data is achieved exclusively through one or more sets of related functions. These function sets are called interfaces, and the functions of an interface are called methods. Further, COM requires that the only way to gain access to the methods of an interface is through a pointer to the interface.   &lt;br /&gt;Q62. Is the COM architecture same as .Net architecture?  What is the difference between them (if at all there is)?    &lt;br /&gt;Q63. How would you use a COM component in a .Net environment?&lt;br /&gt;There two ways of doing this.&lt;br /&gt;1.tlbImp.exe util from command prompt&lt;br /&gt;2.using add ref. Com tab&lt;br /&gt;&lt;br /&gt;Q64.What are CCW and RCW?&lt;br /&gt;RCW - The common language runtime exposes COM objects through a proxy called the runtime callable wrapper (RCW). Although the RCW appears to be an ordinary object to .NET clients, its primary function is to marshal calls between a .NET client and a COM object.&lt;br /&gt;The runtime creates exactly one RCW for each COM object, regardless of the number of references that exist on that object. As the following illustration shows, any number of managed clients can hold a reference to the COM objects that expose INew and INewer interfaces. The runtime maintains a single RCW for each object.&lt;br /&gt;Accessing COM objects through the runtime callable wrapper&lt;br /&gt;Using metadata derived from a type library, the runtime creates both the COM object being called and a wrapper for that object. Each RCW maintains a cache of interface pointers on the COM object it wraps and releases its reference on the COM object when the RCW is no longer needed. The runtime performs garbage collection on the RCW.&lt;br /&gt;Among other activities, the RCW marshals data between managed and unmanaged code, on behalf of the wrapped object. Specifically, the RCW provides marshaling for method arguments and method return values whenever the client and server have different representations of the data passed between them.&lt;br /&gt;The standard wrapper enforces built-in marshaling rules. For example, when a .NET client passes a String type as part of an argument to a managed object, the wrapper converts the string to a BSTR type. Should the COM object return a BSTR to its managed caller, the caller receives a string. Both the client and the server send and receive data that is familiar to them. Other types require no conversion. For instance, a standard wrapper will always pass a 4-byte integer between managed and unmanaged code without converting the type.&lt;br /&gt;CCW&lt;br /&gt;When a COM client calls a .NET object, the common language runtime creates the managed object and a COM callable wrapper (CCW) for the object. Unable to reference a .NET object directly, COM clients use the CCW as a proxy for the managed object.&lt;br /&gt;The runtime creates exactly one CCW for a managed object, regardless of the number of COM clients requesting its services. As the following illustration shows, multiple COM clients can hold a reference to the CCW that exposes the INew interface. The CCW, in turn, holds a single reference to the managed object that implements the interface and is garbage collected. Both COM and .NET clients can make requests on the same managed object simultaneously.&lt;br /&gt;Accessing .NET objects through COM callable wrapper&lt;br /&gt;COM callable wrappers are invisible to other classes running within the .NET Framework. Their primary purpose is to marshal calls between managed and unmanaged code; however, CCWs also manage the object identity and object lifetime of the managed objects they wrap.&lt;br /&gt;Object Identity&lt;br /&gt;The runtime allocates memory for the .NET object from its garbage-collected heap, which enables the runtime to move the object around in memory as necessary. In contrast, the runtime allocates memory for the CCW from a noncollected heap, making it possible for COM clients to reference the wrapper directly.&lt;br /&gt;Object Lifetime&lt;br /&gt;Unlike the .NET client it wraps, the CCW is reference-counted in traditional COM fashion. When the reference count on the CCW reaches zero, the wrapper releases its reference on the managed object. A managed object with no remaining references is collected during the next garbage-collection cycle.&lt;br /&gt;&lt;br /&gt;Q65. What is the difference between arrays and Arraylist?&lt;br /&gt;The difference lies in thatfact that the size of an array is fixed through-out its lifetime, while an ArrayList object dy-namically grows and shrinks as needed.Another difference is that an ArrayList is notdeclared to store a particular type, since it re-ally keeps a list of references to the Objectclass. Thus, a reference to any object can beadded to an ArrayList object.A side effectis that a primitive value has to be stored in a wrapper class before it can be added into an ArrayList object&lt;br /&gt;Q66. I have a listbox in an ASP.Net page.  I need to populate the list box with the values of the employee name from employee table.  What are the ways one would go ahead in achieving this?&lt;br /&gt;&lt;select id="DropDownList1" name="DropDownList1" runat="server"&gt;&lt;/select&gt;&lt;br /&gt;SqlConnection mycn;&lt;br /&gt;SqlDataAdapter myda;&lt;br /&gt;DataSet ds;&lt;br /&gt;String strConn;&lt;br /&gt;private void Page_Load(object sender, System.EventArgs e)&lt;br /&gt;{&lt;br /&gt;      if (!IsPostBack)&lt;br /&gt;      {&lt;br /&gt;            strConn="Data Source=localhost;uid=sa;pwd=;Initial Catalog=northwind";&lt;br /&gt;            mycn = new SqlConnection(strConn);&lt;br /&gt;            myda = new SqlDataAdapter ("Select * FROM CategoryTable ", mycn);&lt;br /&gt;            ds = new DataSet();&lt;br /&gt;            myda.Fill (ds,"Table");&lt;br /&gt;            DropDownList1.DataSource =ds.Tables [0] ;&lt;br /&gt;            DropDownList1.DataTextField =ds.Tables[0].Columns["CategoryName"].ColumnName.ToString();&lt;br /&gt;            DropDownList1.DataValueField =ds.Tables[0].Columns["CategoryId"].ColumnName.ToString();&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:" + ds.Tables[0].Rows[i]["CategoryColor"].ToString () );&lt;br /&gt;            }&lt;br /&gt;      }&lt;br /&gt;}&lt;br /&gt;&lt;select id="listBox1" size="10" runat="server"&gt;&lt;/select&gt;&lt;br /&gt;C#&lt;br /&gt;SqlConnection mycn;&lt;br /&gt;SqlDataAdapter myda;&lt;br /&gt;DataSet ds;&lt;br /&gt;String strConn;&lt;br /&gt;private void Page_Load(object sender, System.EventArgs e)&lt;br /&gt;{&lt;br /&gt;      if (!IsPostBack)&lt;br /&gt;      {&lt;br /&gt;            strConn="Data Source=localhost;uid=sa;pwd=;Initial Catalog=northwind";&lt;br /&gt;            mycn = new SqlConnection(strConn);&lt;br /&gt;            myda = new SqlDataAdapter ("Select * FROM Products ", mycn);&lt;br /&gt;            ds = new DataSet();&lt;br /&gt;            myda.Fill (ds,"Table");&lt;br /&gt;            for(int i = 0 ;i &lt; ds.Tables[0].Rows.Count - 1;i++)&lt;br /&gt;            {&lt;br /&gt;                  listBox1.Items.Add (new ListItem(ds.Tables[0].Rows[i]["UnitPrice"].ToString(),&lt;br /&gt;                  ds.Tables[0].Rows[i]["ProductID"].ToString()));&lt;br /&gt;                  if(Convert.ToDouble(ds.Tables[0].Rows[i]["UnitPrice"].ToString()) &lt;= 25 )&lt;br /&gt;                  {&lt;br /&gt;                        listBox1.Items[i].Attributes.Add("style", "color:red");&lt;br /&gt;                  }&lt;br /&gt;                  else&lt;br /&gt;                  {&lt;br /&gt;                        listBox1.Items[i].Attributes.Add("style", "color:green");&lt;br /&gt;                  }&lt;br /&gt;            }&lt;br /&gt;      }&lt;br /&gt;} &lt;br /&gt;To the same employee table, there is another ASP.Net page which does the updation of the table.  Now, (refer to question 1), Will I be able to get the updated records in the list?  What is the way, then, to get the updated records to the listbox?&lt;br /&gt;private void UpdateDataSet(DataSet myDataSet){&lt;br /&gt;   // Check for changes with the HasChanges method first.&lt;br /&gt;   if(!myDataSet.HasChanges(DataRowState.Modified)) return;&lt;br /&gt;   // Create temporary DataSet variable.&lt;br /&gt;   DataSet xDataSet;&lt;br /&gt;   // GetChanges for modified rows only.&lt;br /&gt;   xDataSet = myDataSet.GetChanges(DataRowState.Modified);&lt;br /&gt;   // Check the DataSet for errors.&lt;br /&gt;   if(xDataSet.HasErrors){&lt;br /&gt;      // Insert code to resolve errors.&lt;br /&gt;   }&lt;br /&gt;   // After fixing errors, update the data source with the DataAdapter&lt;br /&gt;   // used to create the DataSet.&lt;br /&gt;   myOleDbDataAdapter.Update(xDataSet);&lt;br /&gt;}&lt;br /&gt;Q67.What are the different ways you would consider sending data across pages in ASP (i.e between 1.asp to 2.asp)? &lt;br /&gt;1.sessions&lt;br /&gt;2.cookies&lt;br /&gt;3.viewstate&lt;br /&gt;Q68.What is viewstate?  Why is it used?  Suppose I navigate from 1.aspx to 2.aspx page.  Is the viewstate available at 2.aspx?&lt;br /&gt;Microsoft ASP.NET Web Forms pages are capable of maintaining their own state across multiple client round trips. When a property is set for a control, the ASP.NET saves the property value as part of the control's state. To the application, this makes it appear that the page's lifetime spans multiple client requests. This page-level state is known as the view state of the page. In Web Forms pages, their view state is sent by the server as a hidden variable in a form, as part of every response to the client, and is returned to the server by the client as part of a postback. In this article we will see how View State is implemented in ASP.NET for state management and we will also see how effectively you can use this object in your web form.&lt;br /&gt;Problems with ViewState&lt;br /&gt;Viewstate has lots of advantages and as well as disadvantages, so you need to weigh carefully before making the decision to use it. As I told you early, view state doesnt require any server resources for its operation. It is passed to the client during every postback as an hidden element. Since it is added with every page, it adds few Kbytes to the page. This effects the loading of the page in the client. Other main problem with Viewstate is, since it is passed as plain text to the client. Anybody can tamper this value, because of this you shouldnt store any important data in the viewstate. View state is one of the most important features of ASP.NET, not so much because of its technical relevance, but more because it makes the magic of the Web Forms model possible. However, if used carelessly, view state can easily become a burden. Although ViewState is freely accessible in a hidden field called __VIEWSTATE, the view state information is not clear text. By default, a machine-specific authentication code is calculated on the data and appended to the view state string. The resulting text is then Base64 encoded only, but not encrypted. In order to make the view state more secure, the ASP.NET @Page directive supports an attribute called EnableViewStateMac whose only purpose is detecting any possible attempt at corrupting original data.&lt;br /&gt;Implementation of ViewState&lt;br /&gt;StateBag implements the view state and manages the information that ASP.NET pages and embedded controls persist across successive posts of the same page instance. The class works like a dictionary object and implements the IStateManager interface. The Page and the Control base classes expose the view state through the ViewState property. So you can add or remove items from StateBag as you would with any dictionary object:&lt;br /&gt;                                               ViewState("FontSize") = value&lt;br /&gt;    You should start writing to the view state only after the Init event is fired for a page request. You can read from the view state during any stage of the page lifecycle, but not after the page enters rendering mode—that is, after the PreRender event is fired.    The contents of the StateBag collection are first serialized to a string, then Base64 encoded, and finally assigned to a hidden field in the page that is served to the client. The view state for the page is a cumulative property that results from the contents of the ViewState property of the page plus the view state of all the controls hosted in the page.&lt;br /&gt;Decision on ViewState Usage&lt;br /&gt;As We 've discussed here, the view state represents the state of the page and its controls just before the page is rendered in HTML. When the page posts back, the view state is recovered from the hidden field, deserialized, and used to initialize the server controls in the page and the page itself. However, this is only half the story.&lt;br /&gt;After loading the view state, the page reads client-side information through the Request object and uses those values to override most of the settings for the server controls. In general, the two operations are neatly separated and take place independently. In particular, though, the second operation—reading from Request.Form—in many situations ends up just overriding the settings read out of the view state. In this particular case the view state is only an extra overhead. For example consider the following case, we have one textbox in the page and a link button. If you are typing the some  values in to the textbox and the posting the page using linkbutton. After postback, value in the textbox is retained though you enable or disable the viewstate. In this case you shouldnt enable viewstate for this textbox. Viewstate value is overridden by request.form values, since loadpostdata fires after loadviewstate view event in the Page lifecycle.&lt;br /&gt;But if you consider that readonly property of textbox  is set to False by default. Then in the Page_Load if you are trying to change its readonly property to true based on certain condition. So after setting readonly property in Page_Load and if it is posted back by clicking linkbutton. To retain its readonly property across postback, we need to enable viewstate for this property. Otherwise this property wont be retained across postback.&lt;br /&gt;Viewstate in DataGrid&lt;br /&gt;If you have Set EnableViewState to true for a DataGrid which is having thousands of record. Then you will end up having viewstate size more than 10 KBytes. But if you disable viewstate, you will not be able to fire any events in DataGrid. Postback and acting on postback relies on Viewstate. So if it is readonly datagrid and if you are not going to use paging and sorting provided by datagrid, then you can disable viewstate. But if you want use above mentioned feature of DataGrid, then you can not disable ViewState in DataGrid. So to avoid excessive load on client machine because of viewstate . You can disable viewstate for each item in DataGrid. Disabling can be done in two ways, one way is disabling each itemtemplate columns viewstate to false.&lt;br /&gt;&lt;asp:templatecolumn headertext="ProductID"&gt;        &lt;itemtemplate&gt;             &lt;asp:textbox id="ProductID" runat="server" enableviewstate="False"&gt;             &lt;/asp:TextBox&gt;         &lt;/itemtemplate&gt;  &lt;/asp:TemplateColumn&gt;&lt;br /&gt;Other way is by disabling viewstate for each datagrid item in Pre-Render event handler.&lt;br /&gt;Private Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles                                                                                                           MyBase.PreRender                Dim dgi As DataGridItem                For Each dgi In DataGrid1.Items                            dgi.EnableViewState = False                 Next  End Sub&lt;br /&gt;Conclusion&lt;br /&gt;The view state is a key element of an ASP.NET page because it is the primary means to persist the state of the Web server controls. Whenever the page posts back, the state is restored, updated using the current form parameters, then used to run the postback event handler. Normally, the view state is a hashed string encoded as Base64 and stored in a hidden field called __VIEWSTATE. In this way, the view state is not cached on the client, but simply transported back and forth with potential issues both for security and performance. Since it is performance overhead, you need to decide properly when and where you should use viewstate in your webform. &lt;br /&gt;Q69.What is server.transfer,response.redirect,server.execute?&lt;br /&gt;Server.Transfer (Path)&lt;br /&gt;The Transfer method allows you to transfer from inside one ASP page to another ASP page. All of the state information that has been created for the first (calling) ASP page will be transferred to the second (called) ASP page. This transfered information includes all objects and variables that have been given a value in an Application or Session scope, and all items in the Request collections. For example, the second ASP page will have the same SessionID as the first ASP page.&lt;br /&gt;When the second (called) ASP page completes its tasks, you do not return to the first (calling) ASP page.&lt;br /&gt;In contrast, the Execute method allows you to call another ASP page, and when the called page has completed its tasks, you return to the calling ASP page.&lt;br /&gt;There is one mandatory argument.&lt;br /&gt;Path&lt;br /&gt;The Path argument is a string specifying either the absolute or relative path of the ASP page being called. The file name must be included in the path. The entire Path must be enclosed inside a pair of quotes.&lt;br /&gt;In this example, the first ASP page (CallingAsp.asp) has no output.&lt;br /&gt;Code:&lt;br /&gt;----------CallingAsp.asp----------&lt;br /&gt;&lt;%&lt;br /&gt;Application("name") = "Application Maker"&lt;br /&gt;Application("publishdate") = "05/15/01"&lt;br /&gt;Application("author") = "DevGuru"&lt;br /&gt;Set Application("Obj1") = Server.CreateObject("ADODB.Connection")&lt;br /&gt;Server.Transfer("CalledAsp.asp")&lt;br /&gt;%&gt;&lt;br /&gt;----------CalledAsp.asp----------&lt;br /&gt;&lt;%;&lt;br /&gt;Response.Write "Output from CalledAsp.asp"&lt;br /&gt;For Each Item in Application.Contents&lt;br /&gt;    If IsObject( Application.Contents(Item)) Then&lt;br /&gt;      Response.Write Item &amp;amp; " is an object.&lt;br /&gt;"&lt;br /&gt;    Else&lt;br /&gt;      Response.Write Item &amp;amp; "=" &amp;amp; Application.Contents(Item) &amp;amp; "&lt;br /&gt;"&lt;br /&gt;    End If&lt;br /&gt;Next&lt;br /&gt;%&gt;&lt;br /&gt;Output:&lt;br /&gt;Output from CalledAsp.asp&lt;br /&gt;name=Application Maker&lt;br /&gt;publishdate=05/15/01&lt;br /&gt;author=DevGuru&lt;br /&gt;OBJ1 is an object.&lt;br /&gt;Server.Execute(Path)&lt;br /&gt;The Execute method allows you to call another ASP page from inside an ASP page. When the called ASP page completes its tasks, you are then returned to the calling ASP page. The overall effect is very similar to a function or subroutine call. Any text or output from the called ASP page will be displayed on the calling ASP page. The Execute method is a more useful alternative to using server-side includes. &lt;br /&gt;In contrast, the Transfer method allows you to transfer from one ASP page to another without returning to the calling ASP page.&lt;br /&gt;There is one mandatory argument.&lt;br /&gt;Path&lt;br /&gt;The Path argument is a string specifying either the absolute or relative path of the ASP page being called. The file name must be included in the path. The entire Path must be enclosed inside a pair of quotes. The Path argument cannot include a query string, however, any query string that was available to the calling ASP page will be available to the called ASP page.&lt;br /&gt;Code:&lt;br /&gt;----------CallingAsp.asp----------&lt;br /&gt;&lt;html&gt;&lt;br /&gt;&lt;body&gt;&lt;br /&gt;How now &lt;%Server.Execute("CalledAsp.asp")%&gt; cow?&lt;br /&gt;&lt;/body&gt;&lt;br /&gt;&lt;/html&gt;&lt;br /&gt;----------CalledAsp.asp----------&lt;br /&gt;&lt;%&lt;br /&gt;Response.Write "pink"&lt;br /&gt;%&gt;&lt;br /&gt;Output:&lt;br /&gt;How now pink cow?&lt;br /&gt;Response.Redirect(URL)&lt;br /&gt;The Redirect method stops processing the current script and attempts to connect the client to a different URL. This is accomplished by adding an HTTP redirection header to the output stream that is being sent from the server to the client. Unfortunately, if page content has already been sent to the client and if a proxy server lies between the server and the client, an error message can be generated. Therefore it is advisable to set Response.Buffer to true and to call Response.Clear just before calling Redirect.&lt;br /&gt;Note in ASP 2.0, the buffering default setting is false and in ASP 3.0, the buffering default setting is true.&lt;br /&gt;There is one mandatory argument.&lt;br /&gt;URL&lt;br /&gt;The URL argument is the Uniform Resource Locator (URL) that the browser is redirected to.&lt;br /&gt;Code:&lt;br /&gt;--------------File1.asp---------------&lt;br /&gt;&lt;% Response.Buffer = true %&gt;&lt;br /&gt;&lt;html&gt;&lt;br /&gt;&lt;body&gt;&lt;br /&gt;&lt;%&lt;br /&gt;Response.Write "This is File1.asp and switching to File2.asp"&lt;br /&gt;Response.Clear&lt;br /&gt;Response.Redirect "File2.asp"&lt;br /&gt;%&gt;&lt;br /&gt;&lt;/body&gt;&lt;br /&gt;&lt;/html&gt;&lt;br /&gt;--------------File2.asp-----------------&lt;br /&gt;&lt;html&gt;&lt;br /&gt;&lt;body&gt;&lt;br /&gt;&lt;%&lt;br /&gt;Response.Write "This is File2.asp"&lt;br /&gt;%&gt;&lt;br /&gt;&lt;/body&gt;&lt;br /&gt;&lt;/html&gt; &lt;br /&gt;Output:&lt;br /&gt;File1 is written and then the browser will load File2:&lt;br /&gt;------------File1.asp------------------&lt;br /&gt;This is File1.asp and switching to File2.asp&lt;br /&gt;------------File2.asp-------------------&lt;br /&gt;This is File2.asp&lt;br /&gt;&lt;br /&gt;Q70.What is the difference between a datareader and a dataset?&lt;br /&gt;A datareader like a dataset is an object that:&lt;br /&gt;1- reads one record at a time.&lt;br /&gt;2- gives the values of that records&lt;br /&gt;3- Detroy the memory allocation of the record&lt;br /&gt;4- returns to step 1&lt;br /&gt;And thats the only thing that it does.  Therefore it is very small object&lt;br /&gt;that consumes very little memory and is optimize to do it very fast. &lt;br /&gt;Also it uses a connection called readonly, forwardonly. These are not&lt;br /&gt;options that you set when you define the conection object.  The datareader&lt;br /&gt;(I presume, since this happends inside the object) adds this attributes to the conection.  Therefore since the SQL Server does not have to provide record locking (becasue you are not suppose to be updating this information)&lt;br /&gt;will provide the records faster.&lt;br /&gt;A Dataset on the other hand will:&lt;br /&gt;1.  Create a schema that define structure of the data&lt;br /&gt;2.  Provide memory space to store all the records of a table that resulst from the select&lt;br /&gt;3.  Provide memory to store more than one table&lt;br /&gt;4.  Provide logic to relate the records on one table with the records on another&lt;br /&gt;5.  Identify the primary key of the records obtained (to do so it comunicates with the sql server to obtain the key of the record.&lt;br /&gt;6.  Provide mecanism to update and delete the records on the table&lt;br /&gt;7.  Since the dataset runs disconected and the rercords in question can be changed from another process at the same time, the dataset will store the original value of the record and compare that value with the value on the database before updating the record.  If the record was changed then the update will not proceed and you receive an error message.&lt;br /&gt;8.  Many other things that I dont remember.&lt;br /&gt;&lt;br /&gt;Q71.I need to populate data into a dataset from an SQL server.  How would you do that?  Give the sequences of steps in achieving this.&lt;br /&gt;SqlConnection mycn;&lt;br /&gt;SqlDataAdapter myda;&lt;br /&gt;DataSet ds;&lt;br /&gt;String strConn;&lt;br /&gt;private void Page_Load(object sender, System.EventArgs e)&lt;br /&gt;{&lt;br /&gt;      if (!IsPostBack)&lt;br /&gt;      {&lt;br /&gt;            strConn="Data Source=localhost;uid=sa;pwd=;Initial Catalog=northwind";&lt;br /&gt;            mycn = new SqlConnection(strConn);&lt;br /&gt;            myda = new SqlDataAdapter ("Select * FROM Products ", mycn);&lt;br /&gt;            ds = new DataSet();&lt;br /&gt;            myda.Fill (ds,"Table");&lt;br /&gt;            for(int i = 0 ;i &lt; ds.Tables[0].Rows.Count - 1;i++)&lt;br /&gt;            {&lt;br /&gt;                  listBox1.Items.Add (new ListItem(ds.Tables[0].Rows[i]["UnitPrice"].ToString(),&lt;br /&gt;                  ds.Tables[0].Rows[i]["ProductID"].ToString()));&lt;br /&gt;                  if(Convert.ToDouble(ds.Tables[0].Rows[i]["UnitPrice"].ToString()) &lt;= 25 )&lt;br /&gt;                  {&lt;br /&gt;                        listBox1.Items[i].Attributes.Add("style", "color:red");&lt;br /&gt;                  }&lt;br /&gt;                  else&lt;br /&gt;                  {&lt;br /&gt;                        listBox1.Items[i].Attributes.Add("style", "color:green");&lt;br /&gt;                  }&lt;br /&gt;            }&lt;br /&gt;      }&lt;br /&gt;} &lt;br /&gt;Q73.What is a dataadapter and is it a must to have it when filling records to dataset? (and its related questions)&lt;br /&gt;The SqlDataAdapter, serves as a bridge between a DataSet and SQL Server for retrieving and saving data. The SqlDataAdapter provides this bridge by mapping Fill, which changes the data in the DataSet to match the data in the data source, and Update, which changes the data in the data source to match the data in the DataSet, using the appropriate Transact-SQL statements against the data source.&lt;br /&gt;When the SqlDataAdapter fills a DataSet, it will create the necessary tables and columns for the returned data if they do not already exist. However, primary key information will not be included in the implicitly created schema unless the MissingSchemaAction property is set to AddWithKey. You may also have the SqlDataAdapter create the schema of the DataSet, including primary key information, before filling it with data using FillSchema. For more information, see Adding Existing Constraints to a DataSet.&lt;br /&gt;SqlDataAdapter is used in conjunction with SqlConnection and SqlCommand to increase performance when connecting to a Microsoft SQL Server database.&lt;br /&gt;The SqlDataAdapter also includes the SelectCommand, InsertCommand, DeleteCommand, UpdateCommand, and TableMappings properties to facilitate the loading and updating of data.&lt;br /&gt;When an instance of SqlDataAdapter is created, the read/write properties are set to initial values. For a list of these values, see the SqlDataAdapter constructor.&lt;br /&gt;Example&lt;br /&gt;[Visual Basic, C#] The following example uses the SqlCommand, SqlDataAdapter and SqlConnection, to select records from a database, and populate a DataSet with the selected rows. The filled DataSet is then returned. To accomplish this, the method is passed an initialized DataSet, a connection string, and a query string that is a Transact-SQL SELECT statement.&lt;br /&gt;[Visual Basic]&lt;br /&gt;Public Function SelectSqlSrvRows(dataSet As DataSet, connection As String, query As String) As DataSet&lt;br /&gt;    Dim conn As New SqlConnection(connection)&lt;br /&gt;    Dim adapter As New SqlDataAdapter()&lt;br /&gt;    adapter.SelectCommand = new SqlCommand(query, conn)&lt;br /&gt;    adapter.Fill(dataset)&lt;br /&gt;    Return dataset&lt;br /&gt;End Function&lt;br /&gt;[C#]&lt;br /&gt;public DataSet SelectSqlSrvRows(DataSet dataset,string connection,string query)&lt;br /&gt;{&lt;br /&gt;    SqlConnection conn = new SqlConnection(connection);&lt;br /&gt;    SqlDataAdapter adapter = new SqlDataAdapter();&lt;br /&gt;    adapter.SelectCommand = new SqlCommand(query, conn);&lt;br /&gt;    adapter.Fill(dataset);&lt;br /&gt;    return dataset;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Q74.How would you define a connection string when you are connecting to an SQL server using ADO.Net?&lt;br /&gt;Private Sub btnConnect_Click( _&lt;br /&gt;ByVal sender As System.Object, _&lt;br /&gt;ByVal e As System.EventArgs) Handles btnConnect.Click&lt;br /&gt;    Dim oConn As SqlClient.SqlConnection&lt;br /&gt;    Dim strConn As String&lt;br /&gt;    Try&lt;br /&gt;        ' Create the Connection object&lt;br /&gt;        oConn = New SqlClient.SqlConnection()&lt;br /&gt;        ' Build the connection string     &lt;br /&gt;        strConn &amp;amp;= "Data Source=(local);"&lt;br /&gt;        strConn &amp;amp;= "Initial Catalog=Northwind;"&lt;br /&gt;        strConn &amp;amp;= "User ID=sa;"&lt;br /&gt;        strConn &amp;amp;= "Password=;"&lt;br /&gt;        ' Set the Connection String&lt;br /&gt;        oConn.ConnectionString = strConn&lt;br /&gt;        ' Open the Connection&lt;br /&gt;        oConn.Open()&lt;br /&gt;        MessageBox.Show("Connection Open", _&lt;br /&gt;         "btnConnect_Click()")&lt;br /&gt;        ' Close the Connection&lt;br /&gt;        oConn.Close()&lt;br /&gt;    Catch oExcept As Exception&lt;br /&gt;        MessageBox.Show(oExcept.Message, _&lt;br /&gt;         "btnConnect_Click()")&lt;br /&gt;    End Try&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Q75.What are the different ways by which one can update a table in SQL Server using ADO.Net?&lt;br /&gt;Dataadapeter.update&lt;br /&gt;Conn.execute &lt;br /&gt;Q76. A table has a primary field which is an auto-identity field .It has 200 rows of data. Write a SQL query which returns all the rows except the first row ?&lt;br /&gt;select * from #test where roll &lt;&gt;(select min(roll) from #test)&lt;br /&gt;&lt;br /&gt;Q77. advantages of views?&lt;br /&gt;•Views simplify users perception of the database (can be used to present only the necessary information while hiding details in underlying relations)&lt;br /&gt;•Views improve data security preventing undesired accesses&lt;br /&gt;•Views facilite the provision of additional data independence&lt;br /&gt;&lt;br /&gt;Q78.bcp ( Purpose of it)?&lt;br /&gt;BCP stands for Bulk Copy Program. It is a command-line utility that enables you to import and export data to and from SQL Server. The advantage of BCP is that it is fast.&lt;br /&gt;bcp [[database_name.]owner.]table_name {in  out} datafile&lt;br /&gt;[/m maxerrors] [/f formatfile] [/e errfile]&lt;br /&gt;[/F firstrow] [/L lastrow] [/b batchsize]&lt;br /&gt;[/n] [/c] [/E]&lt;br /&gt;[/t field_term] [/r row_term]&lt;br /&gt;[/i inputfile] [/o outputfile]&lt;br /&gt;/U login_id [/P password] [/S servername] [/v] [/a packet_size]  &lt;br /&gt;Q79.Connection Pooling, where do we set the Min and Max Pool size.?&lt;br /&gt;Customizing the connection pool ADO.NET allows you to control the connection pool by adding values to the connection string. You'll want&lt;br /&gt;to use identical values in all connection strings in your application to be sure the connections can be pooled.&lt;br /&gt;There are six pool-related connection string properties.&lt;br /&gt;The pooling property&lt;br /&gt;This property can be true (the default) or false. Use this property to specify that a particular connection should not participate in the pool, but instead should be destroyed when it is closed. This property is helpful if you know that you'll never have an identical connection request in your application and would like to avoid the overhead associated with managing the pool.&lt;br /&gt;The min pool size&lt;br /&gt;This property is an integer with a default of zero. It specifies a minimum number of connections to maintain in the pool. If you set this to 5, for example, the first time you connect to the server, ADO.NET will create five connections and prepare them for pooling.&lt;br /&gt;The max pool size&lt;br /&gt;This property is an integer with a default of 100 and specifies the maximum number of connections to maintain in the pool.&lt;br /&gt;The enlist property&lt;br /&gt;This one can be true (the default) or false. It controls whether a connection will automatically enlist in the calling thread's transaction when it is taken from the pool.&lt;br /&gt;The connection reset&lt;br /&gt;This property can be true (the default) or fals
