<?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-8302265551163912461</id><updated>2011-11-27T15:39:19.587-08:00</updated><category term='Csharp'/><category term='carees'/><category term='delegated'/><category term='songs'/><category term='prevent right click'/><category term='disable right click'/><category term='multi email validation using javascript'/><category term='hindi'/><category term='interview questions'/><category term='SQL Server'/><category term='Custome validation'/><category term='filmi'/><category term='bollywood'/><category term='naukri'/><category term='service'/><category term='Install Roles and Membership database'/><category term='assembly'/><category term='jobs in NCR'/><category term='Email validation'/><category term='C#'/><category term='Web Development'/><category term='.net frameworl 3.5'/><category term='prevent autocomplete features in asp.net'/><category term='jobs'/><category term='new features in .net 3.5'/><category term='jobs in india'/><category term='Formats of Date in SQL Server'/><category term='mp3'/><category term='remix'/><category term='classical'/><category term='Change browser setting from IE to Mozilla or from Mozilla to IE in asp.net.'/><category term='display popup message on right click'/><category term='Articles'/><category term='questions'/><category term='Create Dynamic Table in C#.net'/><category term='Alert Messae with Response.write'/><title type='text'>CsharpPoints</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://csharppoints.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://csharppoints.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Avadhesh</name><uri>http://www.blogger.com/profile/07649968171539918545</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>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8302265551163912461.post-7958860060135008492</id><published>2011-11-14T22:04:00.001-08:00</published><updated>2011-11-14T22:04:33.251-08:00</updated><title type='text'>xmlhttprequest not working in firefox</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Hi Guys,&lt;br /&gt;This is very common problem and I was also suffering from this pain from many days but we have fond the solution. Code is here&lt;br /&gt;// Create HTTP request&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var xmlHttp=null;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(window.XMLHttpRequest) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlHttp = new XMLHttpRequest();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (e) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert("Permission could be denied for cross-browser scripting.");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else if(window.ActiveXObject) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;// Build the operation URL&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var url = "Your URL here";&lt;br /&gt;// Send the HTTP request&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlHttp.open("POST", url, true);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlHttp.setRequestHeader("Content-type", "application/json");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlHttp.send(body);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch(e){alert( e);}&lt;br /&gt;&lt;br /&gt;// Create result handler &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlHttp.onreadystatechange=function()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(xmlHttp.readyState == 4)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(xmlHttp.status==200)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var result=null;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert("Result: " + result);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert("Status:" + xmlHttp.status);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert("Status: Fail");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&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/8302265551163912461-7958860060135008492?l=csharppoints.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharppoints.blogspot.com/feeds/7958860060135008492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8302265551163912461&amp;postID=7958860060135008492' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/7958860060135008492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/7958860060135008492'/><link rel='alternate' type='text/html' href='http://csharppoints.blogspot.com/2011/11/xmlhttprequest-not-working-in-firefox.html' title='xmlhttprequest not working in firefox'/><author><name>Avadhesh</name><uri>http://www.blogger.com/profile/07649968171539918545</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-8302265551163912461.post-3432677146351167530</id><published>2011-10-30T10:18:00.000-07:00</published><updated>2011-10-30T10:22:55.708-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Install Roles and Membership database'/><title type='text'>Install Roles and Membership database</title><content type='html'>To install Roles and Membership database go to "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319" and run aspnet_regsql.exe, this automatically will install required tables and procedures.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8302265551163912461-3432677146351167530?l=csharppoints.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharppoints.blogspot.com/feeds/3432677146351167530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8302265551163912461&amp;postID=3432677146351167530' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/3432677146351167530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/3432677146351167530'/><link rel='alternate' type='text/html' href='http://csharppoints.blogspot.com/2011/10/install-roles-and-membership-database.html' title='Install Roles and Membership database'/><author><name>Avadhesh</name><uri>http://www.blogger.com/profile/07649968171539918545</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-8302265551163912461.post-9214346973767812248</id><published>2011-01-24T00:46:00.000-08:00</published><updated>2011-01-24T00:48:07.828-08:00</updated><title type='text'>Export in Excel from Datattable in C# windows</title><content type='html'>Add Microsoft Excel 11.0 Object Library in reference in add reference&lt;br /&gt;&lt;br /&gt;private void Export2Excel(System.Data.DataTable table)&lt;br /&gt;        {&lt;br /&gt;            try&lt;br /&gt;            {&lt;br /&gt;                Microsoft.Office.Interop.Excel.ApplicationClass excel = new &lt;br /&gt;                              Microsoft.Office.Interop.Excel.ApplicationClass();&lt;br /&gt;                excel.Application.Workbooks.Add(true);&lt;br /&gt;                int ColumnIndex = 0;&lt;br /&gt;                foreach (System.Data.DataColumn col in table.Columns)&lt;br /&gt;                {&lt;br /&gt;                    ColumnIndex++;&lt;br /&gt;                    excel.Cells[1, ColumnIndex] = col.ColumnName;&lt;br /&gt;                }&lt;br /&gt;                int rowIndex = 0;&lt;br /&gt;                foreach (System.Data.DataRow row in table.Rows)&lt;br /&gt;                {&lt;br /&gt;                    rowIndex++;&lt;br /&gt;                    ColumnIndex = 0;&lt;br /&gt;                    foreach (DataColumn col in table.Columns)&lt;br /&gt;                    {&lt;br /&gt;                        ColumnIndex++;&lt;br /&gt;                        excel.Cells[rowIndex + 1, ColumnIndex] = row[col.ColumnName];&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;                excel.Visible = true;&lt;br /&gt;                Microsoft.Office.Interop.Excel.Worksheet worksheet = &lt;br /&gt;                       (Microsoft.Office.Interop.Excel.Worksheet)excel.ActiveSheet;&lt;br /&gt;                worksheet.Activate();&lt;br /&gt;                btnExportToExcel.Enabled = true;&lt;br /&gt;            }&lt;br /&gt;            catch (Exception ex)&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/8302265551163912461-9214346973767812248?l=csharppoints.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharppoints.blogspot.com/feeds/9214346973767812248/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8302265551163912461&amp;postID=9214346973767812248' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/9214346973767812248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/9214346973767812248'/><link rel='alternate' type='text/html' href='http://csharppoints.blogspot.com/2011/01/export-in-excel-from-datattable-in-c.html' title='Export in Excel from Datattable in C# windows'/><author><name>Avadhesh</name><uri>http://www.blogger.com/profile/07649968171539918545</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-8302265551163912461.post-7299277667636101741</id><published>2011-01-24T00:44:00.001-08:00</published><updated>2011-01-24T00:46:05.853-08:00</updated><title type='text'>Export from listview to excel in C# windows</title><content type='html'>Add Microsoft Excel 11.0 Object Library in reference in add reference&lt;br /&gt;&lt;br /&gt; private void Export()&lt;br /&gt;        {&lt;br /&gt;            Microsoft.Office.Interop.Excel.Application xla = new  &lt;br /&gt;                                    Microsoft.Office.Interop.Excel.Application();&lt;br /&gt;            xla.Visible = true;&lt;br /&gt;            Microsoft.Office.Interop.Excel.Workbook wb = xla.Workbooks.Add&lt;br /&gt;                         (Microsoft.Office.Interop.Excel.XlSheetType.xlWorksheet);&lt;br /&gt;            Microsoft.Office.Interop.Excel.Worksheet ws = &lt;br /&gt;                           (Microsoft.Office.Interop.Excel.Worksheet)xla.ActiveSheet;&lt;br /&gt;            int i = 2;&lt;br /&gt;            int j = 1;&lt;br /&gt;            int k = 2;&lt;br /&gt;            if (rdoMember.Checked)&lt;br /&gt;            {&lt;br /&gt;                for (int h = 1; h &lt;= lvwList.Columns.Count; h++)&lt;br /&gt;                {&lt;br /&gt;                    ws.Cells[1, h] = lvwList.Columns[h - 1].Text.ToString();&lt;br /&gt;                }&lt;br /&gt;                foreach (ListViewItem comp in lvwList.Items)&lt;br /&gt;                {&lt;br /&gt;                    if (lvwList.Items[i - 2].Checked == true)&lt;br /&gt;                    {&lt;br /&gt;                        ws.Cells[k, j] = comp.Text.ToString();&lt;br /&gt;                        foreach (ListViewItem.ListViewSubItem drv in comp.SubItems)&lt;br /&gt;                        {&lt;br /&gt;                            ws.Cells[k, j] = drv.Text.ToString();&lt;br /&gt;                            j++;&lt;br /&gt;                        }&lt;br /&gt;                        j = 1;&lt;br /&gt;                        k++;&lt;br /&gt;                    }&lt;br /&gt;                    i++;&lt;br /&gt;                }&lt;br /&gt;            }            &lt;br /&gt;&lt;br /&gt;        }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8302265551163912461-7299277667636101741?l=csharppoints.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharppoints.blogspot.com/feeds/7299277667636101741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8302265551163912461&amp;postID=7299277667636101741' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/7299277667636101741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/7299277667636101741'/><link rel='alternate' type='text/html' href='http://csharppoints.blogspot.com/2011/01/export-from-listview-to-excel-in-c.html' title='Export from listview to excel in C# windows'/><author><name>Avadhesh</name><uri>http://www.blogger.com/profile/07649968171539918545</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-8302265551163912461.post-1772198243908078717</id><published>2010-06-25T21:16:00.000-07:00</published><updated>2010-06-25T21:21:38.857-07:00</updated><title type='text'>Using Response.Redirect in ASP.NET Ajax Update Panel</title><content type='html'>If you facing the following error in case update panel when redirecting to another page then see below solution.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Error:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold; font-family: arial;"&gt;Using Response.Redirect in ASP.NET Ajax Update Panel&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0pt; line-height: normal;"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;Sys.WebForms.PageRequestManagerParserErrorException: &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0pt; line-height: normal;"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;The message received from the server could not be parsed. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0pt; line-height: normal;"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;Common causes for this error are when the response is modified by calls to Response.Write(), &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0pt; line-height: normal;"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;response filters, HttpModules, or server trace is enabled.&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0pt; line-height: normal;"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;Details: Error parsing near'&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0pt; line-height: normal;"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;&lt;!DOCTYPE html PUB'.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="color: black;"&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Solution 1&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;div style="margin-bottom: 0pt; line-height: 14.4pt;"&gt;&lt;span style="font-size: 10pt; color: rgb(79, 129, 189); font-family: 'Courier New';"&gt;&lt;span style="color:#0000ff;"&gt;private void RedirectTo(string url)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0pt; line-height: normal;"&gt;&lt;span style="font-size: 10pt; color: rgb(79, 129, 189); font-family: 'Courier New';"&gt;&lt;span style="color:#0000ff;"&gt;    {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0pt; line-height: normal;"&gt;&lt;span style="font-size: 10pt; color: rgb(79, 129, 189); font-family: 'Courier New';"&gt;&lt;span style="color:#0000ff;"&gt;      //url is in pattern "~myblog/mypage.aspx"&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0pt; line-height: normal;"&gt;&lt;span style="font-size: 10pt; color: rgb(79, 129, 189); font-family: 'Courier New';"&gt;&lt;span style="color:#0000ff;"&gt;      string redirectURL = Page.ResolveClientUrl(url)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0pt; line-height: normal;"&gt;&lt;span style="font-size: 10pt; color: rgb(79, 129, 189); font-family: 'Courier New';"&gt;&lt;span style="color:#0000ff;"&gt;      string script = "window.location = '" + redirectURL + "';";&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin: 0cm 0cm 0pt 36pt; line-height: normal;"&gt;&lt;span style="font-size: 10pt; color: rgb(79, 129, 189); font-family: 'Courier New';"&gt;&lt;span style="color:#0000ff;"&gt;ScriptManager.RegisterStartupScript(this, typeof(Page), "RedirectTo", script, true);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="line-height: 14.4pt;"&gt;&lt;span style="font-size: 10pt; color: rgb(79, 129, 189); font-family: 'Courier New';"&gt;&lt;span style="color:#0000ff;"&gt;    }&lt;/span&gt;&lt;/span&gt; &lt;/div&gt;&lt;br /&gt;&lt;div style="line-height: 14.4pt;"&gt; &lt;span style="color: black;"&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Solution 2&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;div style="line-height: 14.4pt;"&gt;&lt;span style="color: black;"&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;In web.config,  Add the key&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="line-height: 14.4pt;"&gt; &lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: rgb(163, 21, 21); font-family: 'Courier New';"&gt;httpModules&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="line-height: 14.4pt;"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;     &lt;span style="color: blue;"&gt;&lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;add&lt;/span&gt; &lt;span style="color: red;"&gt;name&lt;/span&gt;&lt;span style="color: blue;"&gt;="ScriptModule"&lt;/span&gt; &lt;span style="color: red;"&gt;type&lt;/span&gt;&lt;span style="color: blue;"&gt;="System.Web.Handlers.ScriptModule, &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0pt; line-height: normal;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;     System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0pt; line-height: normal;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;     PublicKeyToken=31bf3856ad364e35"/&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0pt; line-height: normal;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: rgb(163, 21, 21); font-family: 'Courier New';"&gt;httpModules&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8302265551163912461-1772198243908078717?l=csharppoints.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharppoints.blogspot.com/feeds/1772198243908078717/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8302265551163912461&amp;postID=1772198243908078717' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/1772198243908078717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/1772198243908078717'/><link rel='alternate' type='text/html' href='http://csharppoints.blogspot.com/2010/06/using-responseredirect-in-aspnet-ajax.html' title='Using Response.Redirect in ASP.NET Ajax Update Panel'/><author><name>Avadhesh</name><uri>http://www.blogger.com/profile/07649968171539918545</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-8302265551163912461.post-3551882093324938533</id><published>2009-01-08T00:25:00.000-08:00</published><updated>2009-01-08T00:44:00.501-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='prevent autocomplete features in asp.net'/><title type='text'>Disable Auto-Complete on ASP.NET</title><content type='html'>NowDays, some browsers like Internet Explorer,Safari and Firefox support Auto-Complete features.You've noticed this on many times. As you start to type in fields you get a drop-down showing values you've typed in that field before. This feature can be turned off, but it really is a useful feature and can save you a lot of typing when entering redundant values.&lt;br /&gt;As a web developer, you have to be conscious of the fact that the user's browser will likely have auto-complete turned on and be responsible enough to act accordingly. If you have a form that where the user could possibly enter private or secure values you need to be mindful that if the user is on a public computer that these values will be cached by the browser and seen by other users of that computer. You are completely able to control this fetures by programming.&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_f6PgPvPXHH4/SWW6p4yazjI/AAAAAAAAAAw/_vjD7vviKXg/s1600-h/autocomplete.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5288838566197775922" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 141px" alt="" src="http://1.bp.blogspot.com/_f6PgPvPXHH4/SWW6p4yazjI/AAAAAAAAAAw/_vjD7vviKXg/s320/autocomplete.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;To turn off auto-complete for your entire form, all you need to do is add an attribute to your form tag, like this: write this code in form tag:&lt;br /&gt;form id="Form1" method="post" runat="server" autocomplete="off&lt;br /&gt;Easy enough. Now you won't get the auto complete on any of the controls on the form, works for any browser that supports auto-complete. The HTML INPUT tags also support the use of autocomplete=off and since the &lt;?xml:namespace prefix = asp /&gt;&lt;asp:textbox&gt;control renders as INPUT tags then you can use it to set it on a control by control basis. Just add it to the TextBox at design-time (but note that VS.NET will underline it with a squiggly saying that textbox does not have an attribute for autocomplete - but it will still work):&lt;br /&gt;Textbox1.Attributes.Add("autocomplete", "off");&lt;br /&gt;&lt;br /&gt;&lt;/asp:textbox&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8302265551163912461-3551882093324938533?l=csharppoints.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharppoints.blogspot.com/feeds/3551882093324938533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8302265551163912461&amp;postID=3551882093324938533' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/3551882093324938533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/3551882093324938533'/><link rel='alternate' type='text/html' href='http://csharppoints.blogspot.com/2009/01/disable-auto-complete-on-aspnet.html' title='Disable Auto-Complete on ASP.NET'/><author><name>Avadhesh</name><uri>http://www.blogger.com/profile/07649968171539918545</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/_f6PgPvPXHH4/SWW6p4yazjI/AAAAAAAAAAw/_vjD7vviKXg/s72-c/autocomplete.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8302265551163912461.post-7758241327387727635</id><published>2009-01-06T20:12:00.000-08:00</published><updated>2009-01-06T20:13:55.294-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='songs'/><category scheme='http://www.blogger.com/atom/ns#' term='hindi'/><category scheme='http://www.blogger.com/atom/ns#' term='remix'/><category scheme='http://www.blogger.com/atom/ns#' term='mp3'/><category scheme='http://www.blogger.com/atom/ns#' term='filmi'/><category scheme='http://www.blogger.com/atom/ns#' term='bollywood'/><category scheme='http://www.blogger.com/atom/ns#' term='classical'/><title type='text'>Listen and Download songs</title><content type='html'>Follow the following link:&lt;br /&gt;&lt;a href="http://www.mp3songshome.com/genre_albums.php?id=8"&gt;http://www.mp3songshome.com/genre_albums.php?id=8&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8302265551163912461-7758241327387727635?l=csharppoints.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharppoints.blogspot.com/feeds/7758241327387727635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8302265551163912461&amp;postID=7758241327387727635' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/7758241327387727635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/7758241327387727635'/><link rel='alternate' type='text/html' href='http://csharppoints.blogspot.com/2009/01/listen-and-download-songs.html' title='Listen and Download songs'/><author><name>Avadhesh</name><uri>http://www.blogger.com/profile/07649968171539918545</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-8302265551163912461.post-95061025287477558</id><published>2009-01-02T01:04:00.000-08:00</published><updated>2009-01-02T01:11:59.071-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Email validation'/><category scheme='http://www.blogger.com/atom/ns#' term='Custome validation'/><category scheme='http://www.blogger.com/atom/ns#' term='multi email validation using javascript'/><title type='text'>Validating an Email Address with .NET Custom Validators</title><content type='html'>When I was working on a .NET form that has validation functions, there is invariably going to be an email field. I want the .NET framework had a built in email address validation control. By chance we have access to custom validators. Using custom validators we can do server side validation or client side javascript validation. When  we validate an email address, we put this code:&lt;br /&gt;&lt;asp:customvalidator id="cvEmailAddress" text="*" errormessage="Please enter a valid Email Address" controltovalidate="tbxEmailAddress" clientvalidationfunction="validate_email" validateemptytext="true" runat="server"&gt;&lt;br /&gt;This custom validator calls the javascript function "validate_email" seen below:&lt;br /&gt;  code: &lt;br /&gt;function validate_email(source, arguments)&lt;br /&gt;{   &lt;br /&gt;var str = arguments.Value;    var reg = /^([a-zA-Z0-9_\-])+(\.([a-zA-Z0-9_\-])+)*@((\[(((([0-1])?([0-9])?[0-9])(2[0-4][0-9])(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])(2[0-4][0-9])(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])(2[0-4][0-9])(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])(2[0-4][0-9])(2[0-5][0-5]))\]))((([a-zA-Z0-9])+(([\-])+([a-zA-Z0-9])+)*\.)+([a-zA-Z])+(([\-])+([a-zA-Z0-9])+)*))$/;  &lt;br /&gt;if (reg.test(str))   &lt;br /&gt;{     &lt;br /&gt;arguments.IsValid = true;   &lt;br /&gt;}   &lt;br /&gt;else   &lt;br /&gt;{     &lt;br /&gt;arguments.IsValid = false;   &lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;This javascript does a string test against a reg ex for an email address. And this code is working properily I have used it on my project.&lt;br /&gt;&lt;br /&gt;If you want validate More than one email separated by (,) then use this code:&lt;br /&gt;&lt;br /&gt;function validate_email(source, arguments)&lt;br /&gt;{&lt;br /&gt;var str = arguments.Value;&lt;br /&gt;var reg = /^([a-zA-Z0-9_\-])+(\.([a-zA-Z0-9_\-])+)*@((\[(((([0-1])?([0-9])?[0-9])(2[0-4][0-9])(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])(2[0-4][0-9])(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])(2[0-4][0-9])(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])(2[0-4][0-9])(2[0-5][0-5]))\]))((([a-zA-Z0-9])+(([\-])+([a-zA-Z0-9])+)*\.)+([a-zA-Z])+(([\-])+([a-zA-Z0-9])+)*))$/;&lt;br /&gt;var str1 = new Array();&lt;br /&gt;var str1=str.split(",");&lt;br /&gt;var i=str1.length;&lt;br /&gt;var emailId;&lt;br /&gt;var IsValidate = 0 ;&lt;br /&gt;for ( i=0; i&lt; str1.length;i++)&lt;br /&gt;{&lt;br /&gt;emailId=str1[i];&lt;br /&gt;if(!reg.test(emailId))&lt;br /&gt;{&lt;br /&gt;IsValidate = 1;&lt;br /&gt;break;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;if(IsValidate==0)&lt;br /&gt;{&lt;br /&gt;arguments.IsValid = true;&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;arguments.IsValid = false;&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/8302265551163912461-95061025287477558?l=csharppoints.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharppoints.blogspot.com/feeds/95061025287477558/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8302265551163912461&amp;postID=95061025287477558' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/95061025287477558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/95061025287477558'/><link rel='alternate' type='text/html' href='http://csharppoints.blogspot.com/2009/01/validating-email-address-with-net.html' title='Validating an Email Address with .NET Custom Validators'/><author><name>Avadhesh</name><uri>http://www.blogger.com/profile/07649968171539918545</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-8302265551163912461.post-4923589952132347836</id><published>2008-07-23T21:27:00.000-07:00</published><updated>2008-07-23T21:29:57.672-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='service'/><category scheme='http://www.blogger.com/atom/ns#' term='jobs in india'/><category scheme='http://www.blogger.com/atom/ns#' term='naukri'/><category scheme='http://www.blogger.com/atom/ns#' term='jobs'/><category scheme='http://www.blogger.com/atom/ns#' term='jobs in NCR'/><category scheme='http://www.blogger.com/atom/ns#' term='carees'/><title type='text'>Top Jobs sites in India</title><content type='html'>&lt;a href="http://www.naukri.com/"&gt;www.Naukri.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.monsterindia.com/"&gt;www.monsterindia.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.timesjobs.com/"&gt;www.timesjobs.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.naukrihub.com/"&gt;www.naukrihub.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.jobsitesindia.com/"&gt;www.jobsitesindia.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.bestjobsindia.in/"&gt;www.bestjobsindia.in&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.placementindia.com/"&gt;www.placementindia.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.jobsindia.org/"&gt;www.jobsindia.org&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.jobsahead.com/"&gt;www.jobsahead.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.2myjobs.com/"&gt;www.2myjobs.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.careerkhazana.com/"&gt;www.careerkhazana.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.softwarejobsindia.com/"&gt;www.softwarejobsindia.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.jobsdb.com/"&gt;www.jobsdb.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.careerbuilder.com/"&gt;www.careerbuilder.com&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8302265551163912461-4923589952132347836?l=csharppoints.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharppoints.blogspot.com/feeds/4923589952132347836/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8302265551163912461&amp;postID=4923589952132347836' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/4923589952132347836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/4923589952132347836'/><link rel='alternate' type='text/html' href='http://csharppoints.blogspot.com/2008/07/top-jobs-sites-in-india.html' title='Top Jobs sites in India'/><author><name>Avadhesh</name><uri>http://www.blogger.com/profile/07649968171539918545</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-8302265551163912461.post-6533407628305836693</id><published>2008-06-11T03:44:00.000-07:00</published><updated>2008-06-11T03:53:44.940-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Alert Messae with Response.write'/><title type='text'>Alert Messae with Response.write</title><content type='html'>&lt;span style="color:#ff9966;"&gt;&lt;strong&gt;Response.Write("&lt;script&gt;alert('Please select autodebit condition');&lt;/script&gt;&lt;br /&gt;str");&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff9966;"&gt;Where str=alert('Please select autodebit condition');&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff9966;"&gt;put str within script tag&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/8302265551163912461-6533407628305836693?l=csharppoints.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharppoints.blogspot.com/feeds/6533407628305836693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8302265551163912461&amp;postID=6533407628305836693' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/6533407628305836693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/6533407628305836693'/><link rel='alternate' type='text/html' href='http://csharppoints.blogspot.com/2008/06/alert-messae-with-responsewrite.html' title='Alert Messae with Response.write'/><author><name>Avadhesh</name><uri>http://www.blogger.com/profile/07649968171539918545</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-8302265551163912461.post-5723814753419393388</id><published>2008-06-09T21:07:00.000-07:00</published><updated>2008-06-09T21:20:30.984-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Formats of Date in SQL Server'/><title type='text'>Formats of Date in SQL Server</title><content type='html'>Here are given some usefull Date Formats for Sql Server database:&lt;br /&gt;&lt;strong&gt;Style ID&lt;/strong&gt;                        &lt;strong&gt;Style Type&lt;/strong&gt;&lt;br /&gt;0 or 100                         mon dd yyyy hh:miAM (or PM)&lt;br /&gt;101                                 mm/dd/yy&lt;br /&gt;102                                yy.mm.dd&lt;br /&gt;103                                dd/mm/yy&lt;br /&gt;104                               dd.mm.yy&lt;br /&gt;105                               dd-mm-yy&lt;br /&gt;106                               dd mon yy&lt;br /&gt;107                               Mon dd, yy&lt;br /&gt;108                               hh:mm:ss&lt;br /&gt;9 or 109                       mon dd yyyy hh:mi:ss:mmmAM (or PM)&lt;br /&gt;110                               mm-dd-yy&lt;br /&gt;111                               yy/mm/dd&lt;br /&gt;112                               yymmdd&lt;br /&gt;13 or 113                    dd mon yyyy hh:mm:ss:mmm(24h)&lt;br /&gt;114                              hh:mi:ss:mmm(24h)&lt;br /&gt;20 or 120                   yyyy-mm-dd hh:mi:ss(24h)&lt;br /&gt;21 or 121                    yyyy-mm-dd hh:mi:ss.mmm(24h)&lt;br /&gt;126                              yyyy-mm-dd Thh:mm:ss.mmm(no spaces)&lt;br /&gt;130                             dd mon yyyy hh:mi:ss:mmmAM&lt;br /&gt;131                             dd/mm/yy hh:mi:ss:mmmAM&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8302265551163912461-5723814753419393388?l=csharppoints.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharppoints.blogspot.com/feeds/5723814753419393388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8302265551163912461&amp;postID=5723814753419393388' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/5723814753419393388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/5723814753419393388'/><link rel='alternate' type='text/html' href='http://csharppoints.blogspot.com/2008/06/formats-of-date-in-sql-server.html' title='Formats of Date in SQL Server'/><author><name>Avadhesh</name><uri>http://www.blogger.com/profile/07649968171539918545</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-8302265551163912461.post-3871077312311083189</id><published>2008-06-06T00:23:00.000-07:00</published><updated>2008-06-06T00:25:35.481-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Change browser setting from IE to Mozilla or from Mozilla to IE in asp.net.'/><title type='text'>Change browser setting from IE to Mozilla or from Mozilla to IE in asp.net.</title><content type='html'>Right click on default.aspx/Login.aspx click on Browse WithSelect the browser what do you want to set and then click on Set as Default button.Now close the Browser setting window and run your project.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8302265551163912461-3871077312311083189?l=csharppoints.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharppoints.blogspot.com/feeds/3871077312311083189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8302265551163912461&amp;postID=3871077312311083189' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/3871077312311083189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/3871077312311083189'/><link rel='alternate' type='text/html' href='http://csharppoints.blogspot.com/2008/06/change-browser-setting-from-ie-to.html' title='Change browser setting from IE to Mozilla or from Mozilla to IE in asp.net.'/><author><name>Avadhesh</name><uri>http://www.blogger.com/profile/07649968171539918545</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-8302265551163912461.post-4680738957939940861</id><published>2008-06-06T00:17:00.000-07:00</published><updated>2008-06-06T00:22:26.838-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Create Dynamic Table in C#.net'/><title type='text'>Create Dynamic Table in C#.net</title><content type='html'>To create dynamic table create an instance of datatable and add columns you want&lt;br /&gt;(ex. here we are using two columns zipcode,price):&lt;br /&gt;&lt;span style="color:#ff9900;"&gt;DataTable dt= new DataTable();&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff9900;"&gt;dt.Columns.Add("zipcode");dt.Columns.Add("price");&lt;/span&gt;&lt;br /&gt;Now suppose you have a grid with rows containing checkbox and you want to add only checked rows in dynamic table:&lt;br /&gt;&lt;span style="color:#ff9900;"&gt;foreach (GridViewRow row in (GridViewRow1.Rows)            &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff9900;"&gt;{                &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff9900;"&gt;// Access the CheckBox                &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff9900;"&gt;CheckBox cb = (CheckBox)row.FindControl("chkBxSelect");      &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff9900;"&gt;if (cb != null &amp;amp;&amp;amp; cb.Checked)                &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff9900;"&gt;{                   &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff9900;"&gt;string ZipCode =Convert.ToString(GridView1.DataKeys[row.RowIndex].Values["zipcode"]);      stirng Price=Conver.Tostring(GridView1.DataKeys[row.RowIndex].Values["price"]);&lt;/span&gt;   &lt;br /&gt;Create a DataRow and add data in in that row:&lt;br /&gt;&lt;span style="color:#ff9900;"&gt;DataRow dr = dt.NewRow();                    &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff9900;"&gt;dr[0] = ZipCode;                    &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff9900;"&gt;dr[1] = Price;                    &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff9900;"&gt;dt.Rows.Add(dr);                                                        &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff9900;"&gt;}            &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff9900;"&gt;}&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8302265551163912461-4680738957939940861?l=csharppoints.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharppoints.blogspot.com/feeds/4680738957939940861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8302265551163912461&amp;postID=4680738957939940861' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/4680738957939940861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/4680738957939940861'/><link rel='alternate' type='text/html' href='http://csharppoints.blogspot.com/2008/06/create-dynamic-table-in-cnet.html' title='Create Dynamic Table in C#.net'/><author><name>Avadhesh</name><uri>http://www.blogger.com/profile/07649968171539918545</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-8302265551163912461.post-5882319678727974899</id><published>2008-06-03T20:50:00.000-07:00</published><updated>2008-06-03T21:42:32.769-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='display popup message on right click'/><category scheme='http://www.blogger.com/atom/ns#' term='prevent right click'/><category scheme='http://www.blogger.com/atom/ns#' term='disable right click'/><title type='text'>Display popup message on right click</title><content type='html'>I have faced a lot problem when doing programmin and one my client have demand that he wants that &lt;strong&gt;"When user right clicks on webpage of that site then no action taken"&lt;/strong&gt; then I have a search and found the solution for that problem. Here to display this code means to help others who have need it right now.&lt;br /&gt;Put the following code on body tag of your page:-&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#990000;"&gt;Method 1:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;put this code in body tag.&lt;br /&gt;&lt;strong&gt;"oncontextmenu="return false;"&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Note: &lt;/strong&gt;This code work only on the size of body area.&lt;br /&gt;&lt;span style="color:#990000;"&gt;&lt;strong&gt;Method 2:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;If you want that on click return some message window the put the following code in head section:&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc6600;"&gt;&lt;strong&gt;Make a Message page what message you want to display on right click in (.html) or (.aspx). And put this page URL in place of "YourURL" in the following code.&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;script language="JavaScript"&gt;&lt;br /&gt;PopUpURL    = "YourURL";&lt;br /&gt;PopUpLeft   =  100;&lt;br /&gt;PopUpTop    =  100;&lt;br /&gt;PopUpWidth  =  500;&lt;br /&gt;PopUpHeight =  100;&lt;br /&gt;isIE=document.all;&lt;br /&gt;isNN=!document.all&amp;amp;&amp;amp;document.getElementById;isN4=document.layers;popO='left='+PopUpLeft+',top='+PopUpTop+',width='+PopUpWidth+',height='+PopUpHeight&lt;br /&gt;if (isIEisNN)&lt;br /&gt;{&lt;br /&gt;document.oncontextmenu=checkV;&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;document.captureEvents(Event.MOUSEDOWN  Event.MOUSEUP);document.onmousedown=checkV;&lt;br /&gt;}&lt;br /&gt;function checkV(e)&lt;br /&gt;{&lt;br /&gt;if (isN4)&lt;br /&gt;{&lt;br /&gt;if (e.which==2e.which==3)&lt;br /&gt;{&lt;br /&gt;dPUW=window.open(PopUpURL,'nrc',popO);&lt;br /&gt;return false;&lt;br /&gt;}}&lt;br /&gt;else&lt;br /&gt;{dPUW=window.open(PopUpURL,'nrc',popO);return false;}}&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;p&gt;PopUpURL = "&lt;a href="http://www.yoursite.com/yourpage.html"&gt;YourURL&lt;/a&gt;";&lt;/p&gt;&lt;p&gt;PopUpLeft = 100;PopUpTop = 100;PopUpWidth = 500;PopUpHeight = 100;&lt;br /&gt;isIE=document.all;isNN=!document.all&amp;amp;&amp;amp;document.getElementById;isN4=document.layers;popO='left='+PopUpLeft+',top='+PopUpTop+',width='+PopUpWidth+',height='+PopUpHeight&lt;br /&gt;if (isIEisNN){document.oncontextmenu=checkV;}else{document.captureEvents(Event.MOUSEDOWN Event.MOUSEUP);document.onmousedown=checkV;}&lt;br /&gt;function checkV(e){if (isN4){if (e.which==2e.which==3){dPUW=window.open(PopUpURL,'nrc',popO);return false;}}else{dPUW=window.open(PopUpURL,'nrc',popO);return false;}}&lt;/p&gt;&lt;p&gt;put above code under script tag.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8302265551163912461-5882319678727974899?l=csharppoints.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharppoints.blogspot.com/feeds/5882319678727974899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8302265551163912461&amp;postID=5882319678727974899' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/5882319678727974899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/5882319678727974899'/><link rel='alternate' type='text/html' href='http://csharppoints.blogspot.com/2008/06/display-popup-message-on-right-click.html' title='Display popup message on right click'/><author><name>Avadhesh</name><uri>http://www.blogger.com/profile/07649968171539918545</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-8302265551163912461.post-4797504803784008705</id><published>2008-05-27T04:21:00.000-07:00</published><updated>2008-05-27T04:45:45.920-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><category scheme='http://www.blogger.com/atom/ns#' term='questions'/><title type='text'>SQL Server Interview Questions</title><content type='html'>&lt;strong&gt;Consider the following relational schemas:&lt;/strong&gt;&lt;br /&gt;employee (person_name, street, city)&lt;br /&gt;company (company_name, city)&lt;br /&gt;works (person_name, company_name, salary)&lt;br /&gt;manages (person_name, manager_name)&lt;br /&gt;Write the following queries in SQL:&lt;br /&gt;Find the names, cities of employees who work in at least one company.&lt;br /&gt;Display the names of all employees who work in at least one company and the city of the company in an ascending order of employee names.&lt;br /&gt;Find the names, cities of employees who work for exactly one company.&lt;br /&gt;Find the names of all employees who earn more than EVERY employee of Small Bank Corporation. Find the names of all employees who earn more than SOME employee of Small Bank Corporation.&lt;br /&gt;&lt;strong&gt;Q1) Find the names, cities of employees who work in at least one company.&lt;/strong&gt;&lt;br /&gt;select e.person_name, e.city from employee e where exists (select * from works w&lt;br /&gt;where w.person_name = e.person_name)&lt;br /&gt;Alternative solution:&lt;br /&gt;select distinct e.person_name, e.city from employee e, works w where&lt;br /&gt;w.person_name = e.person_name&lt;br /&gt;&lt;strong&gt;Q2) Display the names of all employees who work in at least one company and the city of the company in an ascending order of employee names.&lt;br /&gt;&lt;/strong&gt;select distinct w.person_name, c.city from works w, company c&lt;br /&gt;where c.company_name = w.company_name order by w.person_name asc&lt;br /&gt;&lt;strong&gt;Q3) Find the names, cities of employees who work for exactly one company.&lt;br /&gt;&lt;/strong&gt;select e.person_name. e.city from employee e where 1 = (select count(*)&lt;br /&gt;from works w where w.person_name = e.person_name)&lt;br /&gt;&lt;strong&gt;Q4) Find the names of all employees who earn more than EVERY employee of Small Bank Corporation.&lt;br /&gt;&lt;/strong&gt;select w1.person_name from works w1 where w1.salary &gt; all (select w2.salary&lt;br /&gt;from works w2 where w2.company_name = “Small Bank Corporation”)&lt;br /&gt;Alternative solution:&lt;br /&gt;select w1.person_name from works w1 where w1.salary &gt; select max&lt;br /&gt;(w2.salary) from works w2 where w2.company_name = “Small Bank Corporation”)&lt;br /&gt;&lt;strong&gt;Q5) Find the names of all employees who earn more than SOME employee of Small Bank Corporation.&lt;/strong&gt;&lt;br /&gt;select w1.person_name from works w1 where w1.salary &gt; some (select w2.salary&lt;br /&gt;(w2.salary) from works w2 where w2.company_name = “Small Bank Corporation”)&lt;br /&gt;Alternative solution:&lt;br /&gt;select w1.person_name from works w1where exists (select * from works w2&lt;br /&gt;where w2.company_name = “Small Bank Corporation” and w1.salary &gt; w2.salary) Consider the following relational schemas:&lt;br /&gt;employee (person_name, street, city)&lt;br /&gt;company (company_name, city)&lt;br /&gt;works (person_name, company_name, salary)&lt;br /&gt;manages (person_name, manager_name)&lt;br /&gt;&lt;strong&gt;Write the following queries in SQL:&lt;br /&gt;&lt;/strong&gt;Find the names of the employees who are not a manager.&lt;br /&gt;Find all cities where employees live or where companies are located.&lt;br /&gt;Find the name of the company located in Hong Kong that has the largest number of employees.&lt;br /&gt;Find the names of those companies whose employees earn a higher salary, on average, than the average salary at First Bank Corporation.&lt;br /&gt;Find the name&lt;br /&gt;&lt;strong&gt;Q6) Find the names of the employees who are not a manager.&lt;/strong&gt;&lt;br /&gt;(select person_name from employee) except (select manager_name&lt;br /&gt;from manages) Alternative solutions : select person_name from employee where not exists (select *&lt;br /&gt;from manages where employee.person_name = manages.manager_name)&lt;br /&gt;select person_name from employee where person_name not in (select&lt;br /&gt;manager_name from manages)&lt;br /&gt;&lt;strong&gt;Q7) Find all cities where employees live or where companies are located.&lt;/strong&gt;&lt;br /&gt;(select distinct city from employee) union (select distinct city&lt;br /&gt;from company)&lt;br /&gt;&lt;strong&gt;Q8) Find the name of the company located in Hong Kong that has the largest number of employees.&lt;/strong&gt;&lt;br /&gt;select temp.company_name from (select w.company_name, count(distinct&lt;br /&gt;w.person_name) as CNT from works w, company c where w.company_name =&lt;br /&gt;c.company_name and c.city = “Hong Kong” group by w.company_name) as&lt;br /&gt;temp where temp.CNT = (select max(CNT) from temp)&lt;br /&gt;&lt;strong&gt;Q9) Find the names of those companies whose employees earn a higher salary, on average, than the average salary at First Bank Corporation.&lt;/strong&gt;&lt;br /&gt;select company_name from works group by company_name having avg(salary)&lt;br /&gt;&gt; (select avg(salary) from works where company_name = “First Bank Corporation”)&lt;br /&gt;&lt;strong&gt;Q10) Find the name of the company that has the smallest payroll.&lt;/strong&gt;&lt;br /&gt;select company_name from works group by company_name having sum&lt;br /&gt;(salary) &lt;= all (select sum(salary) from works group by company_name)&lt;br /&gt;Alternative solution: select temp.company_name from (select company_name, sum(salary) as&lt;br /&gt;payroll from works group by company_name) as temp where temp.payroll =&lt;br /&gt;(select min (payroll) from temp)&lt;br /&gt;Retrieve the tuple with the largest value in an attribute Using the aggregate function max Consider the following relational schema: account(account_id, balance) q Write an SQL query to retrieve the ids of those accounts that have the second largest balance.&lt;br /&gt;Example: 1.(a1, 100), (a2, 400), (a3, 500), (a4, 300), (a5, 200), (a6, 400), (a7,100), (a8, 100),&lt;br /&gt;(a9, 500), (a10, 200)&lt;br /&gt;Answer 1:&lt;br /&gt;select a1.account_id from account a1 where a1.balance &lt;&gt; (select max(balance)&lt;br /&gt;from account) and not exists (select * from account a2 where a1.balance &lt;&gt;&lt;br /&gt;a2.balance &lt;&gt; (select max(balance) from account)) Answer 2:&lt;br /&gt;select account_id from account where balance &lt;&gt; (select max(balance) from&lt;br /&gt;account) and balance not in (select distinct a1.balance from account a1, account&lt;br /&gt;a2, account a3 where a1.balance &lt;&gt; a3.balance) Answer 3: select account_id from account where balance = (select max(balance) from&lt;br /&gt;account where balance &lt;&gt; (select max(balance) from account)) Answer 4:&lt;br /&gt;select a1.account_id from account a1, account a2 where a1.balance &lt;&gt;&lt;br /&gt;a1.account_id having count(distinct a2.balance) = 1&lt;br /&gt;&lt;a name="main-wrapper"&gt;&lt;/a&gt;&lt;br /&gt;&lt;a name="main"&gt;&lt;/a&gt;&lt;br /&gt;&lt;a name="Blog1"&gt;&lt;/a&gt;&lt;strong&gt;What is RDBMS?&lt;/strong&gt;&lt;br /&gt;Relational Data Base Management Systems (RDBMS) are database management systems that maintain data records and indices in tables. Relationships may be created and maintained across and among the data and tables. In a relational database, relationships between data items are expressed by means of tables. Interdependencies among these tables are expressed by data values rather than by pointers. This allows a high degree of data independence. An RDBMS has the capability to recombine the data items from different files, providing powerful tools for data usage.&lt;br /&gt;&lt;strong&gt;What is normalization?&lt;/strong&gt;&lt;br /&gt;Database normalization is a data design and organization process applied to data structures based on rules that help build relational databases. In relational database design, the process of organizing data to minimize redundancy. Normalization usually involves dividing a database into two or more tables and defining relationships between the tables. The objective is to isolate data so that additions, deletions, and modifications of a field can be made in just one table and then propagated through the rest of the database via the defined relationships.&lt;br /&gt;&lt;strong&gt;What is Stored Procedure?&lt;/strong&gt;&lt;br /&gt;A stored procedure is a named group of SQL statements that have been previously created and stored in the server database. Stored procedures accept input parameters so that a single procedure can be used over the network by several clients using different input data. And when the procedure is modified, all clients automatically get the new version. Stored procedures reduce network traffic and improve performance. Stored procedures can be used to help ensure the integrity of the database.e.g. sp_helpdb, sp_renamedb, sp_depends etc.&lt;br /&gt;&lt;strong&gt;What is Trigger?&lt;/strong&gt;&lt;br /&gt;A trigger is a SQL procedure that initiates an action when an event (INSERT, DELETE or UPDATE) occurs. Triggers are stored in and managed by the DBMS.Triggers are used to maintain the referential integrity of data by changing the data in a systematic fashion. A trigger cannot be called or executed; the DBMS automatically fires the trigger as a result of a data modification to the associated table. Triggers can be viewed as similar to stored procedures in that both consist of procedural logic that is stored at the database level. Stored procedures, however, are not event-drive and are not attached to a specific table as triggers are. Stored procedures are explicitly executed by invoking a CALL to the procedure while triggers are implicitly executed. In addition, triggers can also execute stored procedures.Nested Trigger: A trigger can also contain INSERT, UPDATE and DELETE logic within itself, so when the trigger is fired because of data modification it can also cause another data modification, thereby firing another trigger. A trigger that contains data modification logic within itself is called a nested trigger.&lt;br /&gt;&lt;strong&gt;What is View?&lt;/strong&gt;&lt;br /&gt;A simple view can be thought of as a subset of a table. It can be used for retrieving data, as well as updating or deleting rows. Rows updated or deleted in the view are updated or deleted in the table the view was created with. It should also be noted that as data in the original table changes, so does data in the view, as views are the way to look at part of the original table. The results of using a view are not permanently stored in the database. The data accessed through a view is actually constructed using standard T-SQL select command and can come from one to many different base tables or even other views.&lt;br /&gt;&lt;strong&gt;What is Index?&lt;/strong&gt;&lt;br /&gt;An index is a physical structure containing pointers to the data. Indices are created in an existing table to locate rows more quickly and efficiently. It is possible to create an index on one or more columns of a table, and each index is given a name. The users cannot see the indexes, they are just used to speed up queries. Effective indexes are one of the best ways to improve performance in a database application. A table scan happens when there is no index available to help a query. In a table scan SQL Server examines every row in the table to satisfy the query results. Table scans are sometimes unavoidable, but on large tables, scans have a terrific impact on performance.Clustered indexes define the physical sorting of a database table’s rows in the storage media. For this reason, each database table may have only one clustered index.Non-clustered indexes are created outside of the database table and contain a sorted list of references to the table itself.&lt;br /&gt;&lt;strong&gt;What is the difference between clustered and a non-clustered index?&lt;/strong&gt;&lt;br /&gt;A clustered index is a special type of index that reorders the way records in the table are physically stored. Therefore table can have only one clustered index. The leaf nodes of a clustered index contain the data pages.A nonclustered index is a special type of index in which the logical order of the index does not match the physical stored order of the rows on disk. The leaf node of a nonclustered index does not consist of the data pages. Instead, the leaf nodes contain index rows.&lt;br /&gt;&lt;strong&gt;What are the different index configurations a table can have?&lt;/strong&gt;&lt;br /&gt;A table can have one of the following index configurations:No indexesA clustered indexA clustered index and many nonclustered indexesA nonclustered indexMany nonclustered indexes.&lt;br /&gt;&lt;strong&gt;What is cursors?&lt;/strong&gt;&lt;br /&gt;Cursor is a database object used by applications to manipulate data in a set on a row-by-row basis, instead of the typical SQL commands that operate on all the rows in the set at one time.In order to work with a cursor we need to perform some steps in the following order:Declare cursorOpen cursorFetch row from the cursorProcess fetched rowClose cursorDeallocate cursor.&lt;br /&gt;&lt;strong&gt;What is the use of DBCC commands?&lt;/strong&gt;&lt;br /&gt;DBCC stands for database consistency checker. We use these commands to check the consistency of the databases, i.e., maintenance, validation task and status checks.E.g. DBCC CHECKDB - Ensures that tables in the db and the indexes are correctly linked.DBCC CHECKALLOC - To check that all pages in a db are correctly allocated.DBCC CHECKFILEGROUP - Checks all tables file group for any damage.&lt;br /&gt;&lt;strong&gt;What is a Linked Server?&lt;/strong&gt;&lt;br /&gt;Linked Servers is a concept in SQL Server by which we can add other SQL Server to a Group and query both the SQL Server dbs using T-SQL Statements. With a linked server, you can create very clean, easy to follow, SQL statements that allow remote data to be retrieved, joined and combined with local data.Storped Procedure sp_addlinkedserver, sp_addlinkedsrvlogin will be used add new Linked Server.&lt;br /&gt;&lt;strong&gt;What is Collation?&lt;/strong&gt;&lt;br /&gt;Collation refers to a set of rules that determine how data is sorted and compared. Character data is sorted using rules that define the correct character sequence, with options for specifying case-sensitivity, accent marks, kana character types and character width.&lt;br /&gt;&lt;strong&gt;What are different type of Collation Sensitivity?&lt;/strong&gt;&lt;br /&gt;Case sensitivityA and a, B and b, etc.Accent sensitivitya and á, o and ó, etc.Kana SensitivityWhen Japanese kana characters Hiragana and Katakana are treated differently, it is called Kana sensitive.Width sensitivityWhen a single-byte character (half-width) and the same character when represented as a double-byte character (full-width) are treated differently then it is width sensitive.&lt;br /&gt;&lt;strong&gt;What’s the difference between a primary key and a unique key?&lt;/strong&gt;&lt;br /&gt;Both primary key and unique enforce uniqueness of the column on which they are defined. But by default primary key creates a clustered index on the column, where are unique creates a nonclustered index by default. Another major difference is that, primary key doesn’t allow NULLs, but unique key allows one NULL only.&lt;br /&gt;&lt;strong&gt;How to implement one-to-one, one-to-many and many-to-many relationships while designing tables?&lt;/strong&gt;&lt;br /&gt;One-to-One relationship can be implemented as a single table and rarely as two tables with primary and foreign key relationships.One-to-Many relationships are implemented by splitting the data into two tables with primary key and foreign key relationships.Many-to-Many relationships are implemented using a junction table with the keys from both the tables forming the composite primary key of the junction table.&lt;br /&gt;&lt;strong&gt;What is a NOLOCK?&lt;/strong&gt;&lt;br /&gt;Using the NOLOCK query optimiser hint is generally considered good practice in order to improve concurrency on a busy system. When the NOLOCK hint is included in a SELECT statement, no locks are taken when data is read. The result is a Dirty Read, which means that another process could be updating the data at the exact time you are reading it. There are no guarantees that your query will retrieve the most recent data. The advantage to performance is that your reading of data will not block updates from taking place, and updates will not block your reading of data. SELECT statements take Shared (Read) locks. This means that multiple SELECT statements are allowed simultaneous access, but other processes are blocked from modifying the data. The updates will queue until all the reads have completed, and reads requested after the update will wait for the updates to complete. The result to your system is delay(blocking).&lt;br /&gt;&lt;strong&gt;What is difference between DELETE &amp;amp; TRUNCATE commands?&lt;/strong&gt;&lt;br /&gt;Delete command removes the rows from a table based on the condition that we provide with a WHERE clause. Truncate will actually remove all the rows from a table and there will be no data in the table after we run the truncate command.TRUNCATETRUNCATE is faster and uses fewer system and transaction log resources than DELETE.TRUNCATE removes the data by deallocating the data pages used to store the table’s data, and only the page deallocations are recorded in the transaction log.TRUNCATE removes all rows from a table, but the table structure and its columns, constraints, indexes and so on remain. The counter used by an identity for new rows is reset to the seed for the column.You cannot use TRUNCATE TABLE on a table referenced by a FOREIGN KEY constraint.Because TRUNCATE TABLE is not logged, it cannot activate a trigger.TRUNCATE can not be Rolled back using logs.TRUNCATE is DDL Command.TRUNCATE Resets identity of the table.DELETEDELETE removes rows one at a time and records an entry in the transaction log for each deleted row.If you want to retain the identity counter, use DELETE instead. If you want to remove table definition and its data, use the DROP TABLE statement.DELETE Can be used with or without a WHERE clauseDELETE Activates Triggers.DELETE Can be Rolled back using logs.DELETE is DML Command.DELETE does not reset identity of the table.&lt;br /&gt;&lt;strong&gt;Difference between Function and Stored Procedure?&lt;/strong&gt;&lt;br /&gt;UDF can be used in the SQL statements anywhere in the WHERE/HAVING/SELECT section where as Stored procedures cannot be.UDFs that return tables can be treated as another rowset. This can be used in JOINs with other tables.Inline UDF’s can be though of as views that take parameters and can be used in JOINs and other Rowset operations.When is the use of UPDATE_STATISTICS command?This command is basically used when a large processing of data has occurred. If a large amount of deletions any modification or Bulk Copy into the tables has occurred, it has to update the indexes to take these changes into account. UPDATE_STATISTICS updates the indexes on these tables accordingly.&lt;br /&gt;&lt;strong&gt;What types of Joins are possible with Sql Server?&lt;/strong&gt;&lt;br /&gt;Joins are used in queries to explain how different tables are related. Joins also let you select data from a table depending upon data from another table.Types of joins: INNER JOINs, OUTER JOINs, CROSS JOINs. OUTER JOINs are further classified as LEFT OUTER JOINS, RIGHT OUTER JOINS and FULL OUTER JOINS.What is the difference between a HAVING CLAUSE and a WHERE CLAUSE?Specifies a search condition for a group or an aggregate. HAVING can be used only with the SELECT statement. HAVING is typically used in a GROUP BY clause. When GROUP BY is not used, HAVING behaves like a WHERE clause. Having Clause is basically used only with the GROUP BY function in a query. WHERE Clause is applied to each row before they are part of the GROUP BY function in a query. HAVING criteria is applied after the the grouping of rows has occurred.&lt;br /&gt;&lt;strong&gt;What is sub-query?&lt;/strong&gt;&lt;br /&gt;Explain properties of sub-query.Sub-queries are often referred to as sub-selects, as they allow a SELECT statement to be executed arbitrarily within the body of another SQL statement. A sub-query is executed by enclosing it in a set of parentheses. Sub-queries are generally used to return a single row as an atomic value, though they may be used to compare values against multiple rows with the IN keyword.A subquery is a SELECT statement that is nested within another T-SQL statement. A subquery SELECT statement if executed independently of the T-SQL statement, in which it is nested, will return a result set. Meaning a subquery SELECT statement can standalone and is not depended on the statement in which it is nested. A subquery SELECT statement can return any number of values, and can be found in, the column list of a SELECT statement, a FROM, GROUP BY, HAVING, and/or ORDER BY clauses of a T-SQL statement. A Subquery can also be used as a parameter to a function call. Basically a subquery can be used anywhere an expression can be used.Properties of Sub-QueryA subquery must be enclosed in the parenthesis.A subquery must be put in the right hand of the comparison operator, andA subquery cannot contain a ORDER-BY clause.A query can contain more than one sub-queries.What are types of sub-queries?Single-row subquery, where the subquery returns only one row.Multiple-row subquery, where the subquery returns multiple rows,.andMultiple column subquery, where the subquery returns multiple columns.&lt;br /&gt;&lt;strong&gt;What is User Defined Functions?&lt;/strong&gt;&lt;br /&gt;User-Defined Functions allow to define its own T-SQL functions that can accept 0 or more parameters and return a single scalar data value or a table data type.&lt;br /&gt;&lt;strong&gt;What kind of User-Defined Functions can be created?&lt;/strong&gt;&lt;br /&gt;There are three types of User-Defined functions in SQL Server 2000 and they are Scalar, Inline Table-Valued and Multi-statement Table-valued.Scalar User-Defined FunctionA Scalar user-defined function returns one of the scalar data types. Text, ntext, image and timestamp data types are not supported. These are the type of user-defined functions that most developers are used to in other programming languages. You pass in 0 to many parameters and you get a return value.Inline Table-Value User-Defined FunctionAn Inline Table-Value user-defined function returns a table data type and is an exceptional alternative to a view as the user-defined function can pass parameters into a T-SQL select command and in essence provide us with a parameterized, non-updateable view of the underlying tables.Multi-statement Table-Value User-Defined FunctionA Multi-Statement Table-Value user-defined function returns a table and is also an exceptional alternative to a view as the function can support multiple T-SQL statements to build the final result where the view is limited to a single SELECT statement. Also, the ability to pass parameters into a T-SQL select command or a group of them gives us the capability to in essence create a parameterized, non-updateable view of the data in the underlying tables. Within the create function command you must define the table structure that is being returned. After creating this type of user-defined function, It can be used in the FROM clause of a T-SQL command unlike the behavior found when using a stored procedure which can also return record sets.&lt;br /&gt;&lt;strong&gt;Which TCP/IP port does SQL Server run on? How can it be changed?&lt;/strong&gt;&lt;br /&gt;SQL Server runs on port 1433. It can be changed from the Network Utility TCP/IP properties –&gt; Port number.both on client and the server.What are the authentication modes in SQL Server? How can it be changed?Windows mode and mixed mode (SQL &amp;amp; Windows).To change authentication mode in SQL Server click Start, Programs, Microsoft SQL Server and click SQL Enterprise Manager to run SQL Enterprise Manager from the Microsoft SQL Server program group. Select the server then from the Tools menu select SQL Server Configuration Properties, and choose the Security page.Where are SQL server users names and passwords are stored in sql server?They get stored in master db in the sysxlogins table.Which command using Query Analyzer will give you the version of SQL server and operating system?SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')What is SQL server agent?SQL Server agent plays an important role in the day-to-day tasks of a database administrator (DBA). It is often overlooked as one of the main tools for SQL Server management. Its purpose is to ease the implementation of tasks for the DBA, with its full-function scheduling engine, which allows you to schedule your own jobs and scripts.&lt;br /&gt;&lt;strong&gt;Can a stored procedure call itself or recursive stored procedure? How many level SP nesting possible?&lt;/strong&gt;&lt;br /&gt;Yes. Because Transact-SQL supports recursion, you can write stored procedures that call themselves. Recursion can be defined as a method of problem solving wherein the solution is arrived at by repetitively applying it to subsets of the problem. A common application of recursive logic is to perform numeric computations that lend themselves to repetitive evaluation by the same processing steps. Stored procedures are nested when one stored procedure calls another or executes managed code by referencing a CLR routine, type, or aggregate. You can nest stored procedures and managed code references up to 32 levels.What is @@ERROR?The @@ERROR automatic variable returns the error code of the last Transact-SQL statement. If there was no error, @@ERROR returns zero. Because @@ERROR is reset after each Transact-SQL statement, it must be saved to a variable if it is needed to process it further after checking it.&lt;br /&gt;&lt;strong&gt;What is Raiseerror?&lt;/strong&gt;&lt;br /&gt;Stored procedures report errors to client applications via the RAISERROR command. RAISERROR doesn’t change the flow of a procedure; it merely displays an error message, sets the @@ERROR automatic variable, and optionally writes the message to the SQL Server error log and the NT application event log.What is log shipping?Log shipping is the process of automating the backup of database and transaction log files on a production SQL server, and then restoring them onto a standby server. Enterprise Editions only supports log shipping. In log shipping the transactional log file from one server is automatically updated into the backup database on the other server. If one server fails, the other server will have the same db can be used this as the Disaster Recovery plan. The key feature of log shipping is that is will automatically backup transaction logs throughout the day and automatically restore them on the standby server at defined interval.What is the difference between a local and a global variable?A local temporary table exists only for the duration of a connection or, if defined inside a compound statement, for the duration of the compound statement.A global temporary table remains in the database permanently, but the rows exist only within a given connection. When connection are closed, the data in the global temporary table disappears. However, the table definition remains with the database for access when database is opened next time.&lt;br /&gt;&lt;strong&gt;What command do we use to rename a db?&lt;/strong&gt;&lt;br /&gt;sp_renamedb ‘oldname’ , ‘newname’If someone is using db it will not accept sp_renmaedb. In that case first bring db to single user using sp_dboptions. Use sp_renamedb to rename database. Use sp_dboptions to bring database to multi user mode.What is sp_configure commands and set commands?Use sp_configure to display or change server-level settings. To change database-level settings, use ALTER DATABASE. To change settings that affect only the current user session, use the SET statement.Using query analyzer, name 3 ways to get an accurate count of the number of records in a table?SELECT * FROM table1SELECT COUNT(*) FROM table1SELECT rows FROM sysindexes WHERE id = OBJECT_ID(table1) AND indid &lt; 2&lt;br /&gt;&lt;strong&gt;What are primary keys and foreign keys?&lt;/strong&gt;&lt;br /&gt;Primary keys are the unique identifiers for each row. They must contain unique values and cannot be null. Due to their importance in relational databases, Primary keys are the most fundamental of all keys and constraints. A table can have only one Primary key.Foreign keys are both a method of ensuring data integrity and a manifestation of the relationship between tables.&lt;br /&gt;&lt;strong&gt;What is data integrity?&lt;/strong&gt;&lt;br /&gt;Explain constraints?Data integrity is an important feature in SQL Server. When used properly, it ensures that data is accurate, correct, and valid. It also acts as a trap for otherwise undetectable bugs within applications.A PRIMARY KEY constraint is a unique identifier for a row within a database table. Every table should have a primary key constraint to uniquely identify each row and only one primary key constraint can be created for each table. The primary key constraints are used to enforce entity integrity.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 links between tables with the corresponding data values. A foreign key in one table points to a primary key in another table. Foreign keys prevent actions that would leave rows with foreign key values when there are no primary keys with that value. The foreign key constraints are used to enforce referential integrity.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.How to get @@error and @@rowcount at the same time?If @@Rowcount is checked after Error checking statement then it will have 0 as the value of @@Recordcount as it would have been reset.And if @@Recordcount is checked before the error-checking statement then @@Error would get reset. To get @@error and @@rowcount at the same time do both in same statement and store them in local variable. SELECT @RC = @@ROWCOUNT, @ER = @@ERROR&lt;br /&gt;&lt;strong&gt;What is Identity?&lt;/strong&gt;&lt;br /&gt;Identity (or AutoNumber) is a column that automatically generates numeric values. A start and increment value can be set, but most DBA leave these at 1. A GUID column also generates numbers, the value of this cannot be controled. Identity/GUID columns do not need to be indexed.What is BCP? When does it used?BulkCopy is a tool used to copy huge amount of data from tables and views. BCP does not copy the structures same as source to destination.&lt;br /&gt;&lt;strong&gt;How do you load large data to the SQL server database?&lt;/strong&gt;&lt;br /&gt;BulkCopy is a tool used to copy huge amount of data from tables. BULK INSERT command helps to Imports a data file into a database table or view in a user-specified format.&lt;br /&gt;&lt;strong&gt;Can we rewrite subqueries into simple select statements or with joins?&lt;/strong&gt;&lt;br /&gt;Subqueries can often be re-written to use a standard outer join, resulting in faster performance. As we may know, an outer join uses the plus sign (+) operator to tell the database to return all non-matching rows with NULL values. Hence we combine the outer join with a NULL test in the WHERE clause to reproduce the result set without using a sub-query.&lt;br /&gt;&lt;strong&gt;Can SQL Servers linked to other servers like Oracle?&lt;/strong&gt;&lt;br /&gt;SQL Server can be lined to any server provided it has OLE-DB provider from Microsoft to allow a link. E.g. Oracle has a OLE-DB provider for oracle that Microsoft provides to add it as linked server to SQL Server group.&lt;br /&gt;&lt;strong&gt;How to know which index a table is using?&lt;/strong&gt;&lt;br /&gt;SELECT table_name,index_name FROM user_constraintsHow to copy the tables, schema and views from one SQL server to another?Microsoft SQL Server 2000 Data Transformation Services (DTS) is a set of graphical tools and programmable objects that lets user extract, transform, and consolidate data from disparate sources into single or multiple destinations.&lt;br /&gt;&lt;strong&gt;What is Self Join?&lt;/strong&gt;&lt;br /&gt;This is a particular case when one table joins to itself, with one or two aliases to avoid confusion. A self join can be of any type, as long as the joined tables are the same. A self join is rather unique in that it involves a relationship with only one table. The common example is when company have a hierarchal reporting structure whereby one member of staff reports to another.&lt;br /&gt;&lt;strong&gt;What is Cross Join?&lt;/strong&gt;&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. The common example is when company wants to combine each product with a pricing table to analyze each product at each price.&lt;br /&gt;&lt;strong&gt;Which virtual table does a trigger use?&lt;/strong&gt;&lt;br /&gt;Inserted and Deleted.List few advantages of Stored Procedure.Stored procedure can reduced network traffic and latency, boosting application performance.Stored procedure execution plans can be reused, staying cached in SQL Server’s memory, reducing server overhead.Stored procedures help promote code reuse.Stored procedures can encapsulate logic. You can change stored procedure code without affecting clients.Stored procedures provide better security to your data.&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;SQL Server Interview Questions&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;What is normalization?&lt;/strong&gt;&lt;br /&gt;Well a relational database is basically composed of tables that contain related data. So the Process of organizing this data into tables is actually referred to as normalization.&lt;br /&gt;What is a Stored Procedure? - Its nothing but a set of T-SQL statements combined to perform a single task of several tasks. Its basically like a Macro so when you invoke the Stored procedure, you actually run a set of statements.&lt;br /&gt;Can you give an example of Stored Procedure? - sp_helpdb , sp_who2, sp_renamedb are a set of system defined stored procedures. We can also have user defined stored procedures which can be called in similar way.&lt;br /&gt;&lt;strong&gt;What is a trigger?&lt;/strong&gt;&lt;br /&gt;Triggers are basically used to implement business rules. Triggers is also similar to stored procedures. The difference is that it can be activated when data is added or edited or deleted from a table in a database.&lt;br /&gt;&lt;strong&gt;What is a view?&lt;/strong&gt;&lt;br /&gt;If we have several tables in a db and we want to view only specific columns from specific tables we can go for views. It would also suffice the needs of security some times allowing specfic users to see only specific columns based on the permission that we can configure on the view. Views also reduce the effort that is required for writing queries to access specific columns every time.&lt;br /&gt;&lt;strong&gt;What is an Index?&lt;/strong&gt;&lt;br /&gt;When queries are run against a db, an index on that db basically helps in the way the data is sorted to process the query for faster and data retrievals are much faster when we have an index.&lt;br /&gt;&lt;strong&gt;What are the types of indexes available with SQL Server&lt;/strong&gt;&lt;br /&gt;There are basically two types of indexes that we use with the SQL Server. Clustered and the Non-Clustered.&lt;br /&gt;&lt;strong&gt;What is the basic difference between clustered and a non-clustered index?&lt;/strong&gt;&lt;br /&gt;The difference is that, Clustered index is unique for any given table and we can have only one clustered index on a table. The leaf level of a clustered index is the actual data and the data is resorted in case of clustered index. Whereas in case of non-clustered index the leaf level is actually a pointer to the data in rows so we can have as many non-clustered indexes as we can on the db.&lt;br /&gt;&lt;strong&gt;What are cursors?&lt;/strong&gt;&lt;br /&gt;Well cursors help us to do an operation on a set of data that we retreive by commands such as Select columns from table. For example : If we have duplicate records in a table we can remove it by declaring a cursor which would check the records during retreival one by one and remove rows which have duplicate values.&lt;br /&gt;&lt;strong&gt;When do we use the UPDATE_STATISTICS command?&lt;/strong&gt;&lt;br /&gt;This command is basically used when we do a large processing of data. If we do a large amount of deletions any modification or Bulk Copy into the tables, we need to basically update the indexes to take these changes into account. UPDATE_STATISTICS updates the indexes on these tables accordingly.&lt;br /&gt;&lt;strong&gt;Which TCP/IP port does SQL Server run on?&lt;/strong&gt;&lt;br /&gt;SQL Server runs on port 1433 but we can also change it for better security.&lt;br /&gt;&lt;strong&gt;From where can you change the default port?&lt;/strong&gt;&lt;br /&gt;From the Network Utility TCP/IP properties –&gt; Port number.both on client and the server.&lt;br /&gt;&lt;strong&gt;Can you tell me the difference between DELETE &amp;amp; TRUNCATE commands?&lt;/strong&gt;&lt;br /&gt;Delete command removes the rows from a table based on the condition that we provide with a WHERE clause. Truncate will actually remove all the rows from a table and there will be no data in the table after we run the truncate command.&lt;br /&gt;&lt;strong&gt;Can we use Truncate command on a table which is referenced by FOREIGN KEY?&lt;/strong&gt;  No. We cannot use Truncate command on a table with Foreign Key because of referential integrity.&lt;br /&gt;&lt;strong&gt;What is the use of DBCC commands&lt;/strong&gt;&lt;br /&gt;DBCC stands for database consistency checker. We use these commands to check the consistency of the databases, i.e., maintenance, validation task and status checks.&lt;br /&gt;&lt;strong&gt;Can you give me some DBCC command options?&lt;/strong&gt;&lt;br /&gt;(Database consistency check) - DBCC CHECKDB - Ensures that tables in the db and the indexes are correctly linked.and DBCC CHECKALLOC - To check that all pages in a db are correctly allocated. DBCC SQLPERF - It gives report on current usage of transaction log in percentage. DBCC CHECKFILEGROUP - Checks all tables file group for any damage.&lt;br /&gt;&lt;strong&gt;What command do we use to rename a db?&lt;/strong&gt;&lt;br /&gt;sp_renamedb ‘oldname’ , ‘newname’Well sometimes sp_reanmedb may not work you know because if some one is using the db it will not accept this command so what do you think you can do in such cases? - In such cases we can first bring to db to single user using sp_dboptions and then we can rename that db and then we can rerun the sp_dboptions command to remove the single user mode.&lt;br /&gt;&lt;strong&gt;What is the difference between a HAVING CLAUSE and a WHERE CLAUSE?&lt;/strong&gt;&lt;br /&gt;Having Clause is basically used only with the GROUP BY function in a query. WHERE Clause is applied to each row before they are part of the GROUP BY function in a query.&lt;br /&gt;&lt;strong&gt;What do you mean by COLLATION?&lt;/strong&gt;&lt;br /&gt;Collation is basically the sort order. There are three types of sort order Dictionary case sensitive, Dictonary - case insensitive and Binary.&lt;br /&gt;&lt;strong&gt;What is a Join in SQL Server?&lt;/strong&gt;&lt;br /&gt;Join actually puts data from two or more tables into a single result set.&lt;br /&gt;&lt;strong&gt;Can you explain the types of Joins that we can have with Sql Server?&lt;/strong&gt;&lt;br /&gt;There are three types of joins: Inner Join, Outer Join, Cross Join&lt;br /&gt;When do you use SQL Profiler? - SQL Profiler utility allows us to basically track connections to the SQL Server and also determine activities such as which SQL Scripts are running, failed jobs etc..&lt;br /&gt;&lt;strong&gt;What is a Linked Server&lt;/strong&gt;&lt;br /&gt;Linked Servers is a concept in SQL Server by which we can add other SQL Server to a Group and query both the SQL Server dbs using T-SQL Statements.&lt;br /&gt;Can you link only other SQL Servers or any database servers such as Oracle? - We can link any server provided we have the OLE-DB provider from Microsoft to allow a link. For Oracle we have a OLE-DB provider for oracle that microsoft provides to add it as a linked server to the sql server group.&lt;br /&gt;&lt;strong&gt;Which stored procedure will you be running to add a linked server?&lt;/strong&gt; sp_addlinkedserver, sp_addlinkedsrvlogin&lt;br /&gt;&lt;strong&gt;What are the OS services that the SQL Server installation adds?&lt;/strong&gt;&lt;br /&gt;MS SQL SERVER SERVICE, SQL AGENT SERVICE, DTC (Distribution transac co-ordinator)&lt;br /&gt;&lt;strong&gt;Can you explain the role of each service?&lt;/strong&gt;&lt;br /&gt;SQL SERVER - is for running the databases SQL AGENT - is for automation such as Jobs, DB Maintanance, Backups DTC - Is for linking and connecting to other SQL Servers&lt;br /&gt;&lt;strong&gt;How do you troubleshoot SQL Server if its running very slow?&lt;/strong&gt;&lt;br /&gt;First check the processor and memory usage to see that processor is not above 80% utilization and memory not above 40-45% utilization then check the disk utilization using Performance Monitor, Secondly, use SQL Profiler to check for the users and current SQL activities and jobs running which might be a problem. Third would be to run UPDATE_STATISTICS command to update the indexes&lt;br /&gt;Lets say due to N/W or Security issues client is not able to connect to server or vice versa. How do you troubleshoot? - First I will look to ensure that port settings are proper on server and client Network utility for connections. ODBC is properly configured at client end for connection ——Makepipe &amp;amp; readpipe are utilities to check for connection. Makepipe is run on Server and readpipe on client to check for any connection issues.&lt;br /&gt;&lt;strong&gt;What are the authentication modes in SQL Server?&lt;/strong&gt;&lt;br /&gt;Windows mode and mixed mode (SQL &amp;amp; Windows).&lt;br /&gt;Where do you think the users names and passwords will be stored in sql server? - They get stored in master db in the sysxlogins table.&lt;br /&gt;&lt;strong&gt;What is log shipping?&lt;/strong&gt;&lt;br /&gt;Can we do logshipping with SQL Server 7.0 - Logshipping is a new feature of SQL Server 2000. We should have two SQL Server - Enterprise Editions. From Enterprise Manager we can configure the logshipping. In logshipping the transactional log file from one server is automatically updated into the backup database on the other server. If one server fails, the other server will have the same db and we can use this as the DR (disaster recovery) plan.&lt;br /&gt;&lt;strong&gt;Let us say the SQL Server crashed and you are rebuilding the databases including the master database what procedure to you follow&lt;/strong&gt;&lt;br /&gt;For restoring the master db we have to stop the SQL Server first and then from command line we can type SQLSERVER –m which will basically bring it into the maintenance mode after which we can restore the master db.&lt;br /&gt;Let us say master db itself has no backup. Now you have to rebuild the db so what kind of action do you take?&lt;br /&gt;&lt;strong&gt;What is BCP? When do we use it?&lt;/strong&gt;&lt;br /&gt;BulkCopy is a tool used to copy huge amount of data from tables and views. But it won’t copy the structures of the same.&lt;br /&gt;&lt;strong&gt;What should we do to copy the tables, schema and views from one SQL Server to another?&lt;/strong&gt;&lt;br /&gt;We have to write some DTS packages for it.&lt;br /&gt;What are the different types of joins and what dies each do? What are the four main query statements?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8302265551163912461-4797504803784008705?l=csharppoints.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharppoints.blogspot.com/feeds/4797504803784008705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8302265551163912461&amp;postID=4797504803784008705' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/4797504803784008705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/4797504803784008705'/><link rel='alternate' type='text/html' href='http://csharppoints.blogspot.com/2008/05/sql-server-interview-questions.html' title='SQL Server Interview Questions'/><author><name>Avadhesh</name><uri>http://www.blogger.com/profile/07649968171539918545</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-8302265551163912461.post-6943485396047468229</id><published>2008-05-26T22:05:00.000-07:00</published><updated>2008-05-26T22:16:14.263-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web Development'/><category scheme='http://www.blogger.com/atom/ns#' term='new features in .net 3.5'/><title type='text'>What's New in ASP.NET and Web Development</title><content type='html'>&lt;strong&gt;ASP.NET AJAX&lt;/strong&gt;&lt;br /&gt;With ASP.NET AJAX, developers can quickly create pages with sophisticated, responsive user interfaces and more efficient client-server communication by simply adding a few server controls to their pages. Previously an extension to the ASP.NET runtime, ASP.NET AJAX is now built into the platform and makes the complicated task of building cross-platform, standards based AJAX applications easy.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;New ListView and DataPager Controls&lt;br /&gt;&lt;/strong&gt;The new ListView control gives you unprecedented flexibility in how you display your data, by allowing you to have complete control over the HTML markup generated. ListView‘s template approach to representing data is designed to easily work with CSS styles, which comes in handy with the new Visual Studio 2008 designer view. In addition, you can use the DataPager control to handle all the work of allowing your users to page through large numbers of records.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;LINQ and other .NET Framework 3.5 Improvements&lt;/strong&gt;&lt;br /&gt;With the addition of Language Integrated Query (LINQ) in .NET Framework 3.5, the process of building SQL queries using error-prone string manipulation is a thing of the past. LINQ makes your relational data queries a first-class language construct in C# and Visual Basic, complete with compiler and Intellisense support. For Web applications, the ASP.NET LinqDataSource control allows you to easily use LINQ to filter, order and group data that can then be bound to any of the data visualization controls like the ListView and GridView controls. In addition, all the other improvements to .NET Framework 3.5, including the new HashSet collection, DateTime offset support, diagnostics, garbage collection, better thread lock support, and more, are all available to you in your ASP.NET applications.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;WCF Support for RSS, JSON, POX and Partial Trust&lt;/strong&gt;&lt;br /&gt;With .NET Framework 3.5, Windows Communication Foundation (WCF) now supports building Web services that can be exposed using any number of the Internet standard protocols, such as SOAP, RSS, JSON, POX and more. Whether you are building an AJAX application that uses JSON, providing syndication of your data via RSS, or building a standard SOAP Web service, WCF makes it easy to create your endpoints, and now, with .NET Framework 3.5, supports building Web services in partial-trust situations like a typical shared-hosting environment.&lt;br /&gt;&lt;strong&gt;New Web Design Interface&lt;/strong&gt;&lt;br /&gt;Visual Studio 2008 has incorporated a new Web designer that uses the design engine from Expression Web. Moving between design and source view is faster than ever and the new split view capability means you can edit the HTML source and simultaneously see the results on the page. Support for style sheets in separate files has been added as well as a CSS properties pane which clarifies the sometimes-complex hierarchy of cascading styles, so that it is easy to understand why an element looks the way it does. In addition Visual Studio 2008 has full WYSIWYG support for building and using ASP.NET Nested Master Pages which greatly improves the ability to build a Web site with a consistent look and feel.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;JavaScript Debugging and Intellisense&lt;/strong&gt;&lt;br /&gt;In Visual Studio 2008, client-side JavaScript has now become a first-class citizen in regards to its debugging and Intellisense support. Not only does the Intellisense give standard JavaScript keyword support, but it will automatically infer variable types and provide method, property and event support from any number of included script files. Similarly, the JavaScript debugging support now allows for the deep Watch and Locals support in JavaScript that you are accustomed to having in other languages in Visual Studio. And despite the dynamic nature of a lot of JavaScript, you will always be able to visualize and step into the JavaScript code, no matter where it is generated from. This is especially convenient when building ASP.NET AJAX applications.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Multi-targeting Support&lt;/strong&gt;&lt;br /&gt;In previous versions of Visual Studio, you could only build projects that targeted a single version of the .NET Framework. With Visual Studio 2008, we have introduced the concept of Multi-targeting. Through a simple drop-down, you can decide if you want a project to target .NET Framework 2.0, 3.0 or 3.5. The builds, the Intellisense, the toolbox, etc. will all adjust to the feature set of the specific version of the .NET Framework which you choose. This allows you to take advantage of the new features in Visual Studio 2008, like the Web design interface, and the improved JavaScript support, and still build your projects for their current runtime version.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8302265551163912461-6943485396047468229?l=csharppoints.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharppoints.blogspot.com/feeds/6943485396047468229/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8302265551163912461&amp;postID=6943485396047468229' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/6943485396047468229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/6943485396047468229'/><link rel='alternate' type='text/html' href='http://csharppoints.blogspot.com/2008/05/whats-new-in-aspnet-and-web-development.html' title='What&apos;s New in ASP.NET and Web Development'/><author><name>Avadhesh</name><uri>http://www.blogger.com/profile/07649968171539918545</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-8302265551163912461.post-7854629417898627843</id><published>2008-05-26T21:29:00.000-07:00</published><updated>2008-05-26T21:54:32.840-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net frameworl 3.5'/><category scheme='http://www.blogger.com/atom/ns#' term='new features in .net 3.5'/><title type='text'>.Net Framework 3.5 New Features</title><content type='html'>&lt;span style="font-family:georgia;"&gt;While Visual Studio 2008, the several variations of LINQ, and the ADO.NET Entity Framework are getting a lot of attention in the upcoming .NET Framework 3.5, there are also several key language enhancements on the near horizon. Many of the language enhancements (which will be found in VB 9 and C# 3.0) are the foundation of these more prominent new technologies. This article is a primer for some of the key enhancements that will be introduced with the .NET Framework 3.5 and how they relate to each other.&lt;br /&gt;There are several .NET language enhancements to be introduced with Visual Studio 2008 including implicitly typed variables, extension methods, anonymous types, object initializers, collection initializers and automatic properties. These language enhancements, along with features like generics, are critical to the use of some of the new features, such as LINQ with the ADO.NET Entity Framework. What can be confusing is that these features are often referred to in the same conversation as LINQ. Because of this relation by association, you may be led to believe that these features are part of LINQ. They are not; they are part of the .NET Framework 3.5 and the VB 9 and C# 3.0 languages. They are very valuable in their own rights as well as playing a huge role for LINQ.&lt;br /&gt;This article will demonstrate and discuss several key language features including:&lt;br /&gt;· Automatic Property setters/getters· Object Initializers· Collection Initializers· Extension Methods· Implicitly Typed Variable· Anonymous Types&lt;br /&gt;Fig.1 – Many of the New Language Enhancements&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_f6PgPvPXHH4/SDuPaNTx2LI/AAAAAAAAAAY/VBdoF2TkTec/s1600-h/Code.gif"&gt;&lt;img id="BLOGGER_PHOTO_ID_5204911474768730290" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_f6PgPvPXHH4/SDuPaNTx2LI/AAAAAAAAAAY/VBdoF2TkTec/s320/Code.gif" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;strong&gt;Automatic Properties&lt;/strong&gt;&lt;br /&gt;Since creating classes by hand can be monotonous at times, developers use either code generation programs and IDE Add-Ins to assist in creating classes and their properties. Creating properties can be a very redundant process, especially when there is no logic in the getters and setters other than getting and setting the value of the private field. Using public fields would reduce the code required, however public fields do have some drawbacks as they are not supported by some other features such as inherent data binding.&lt;br /&gt;One way to get around having to type the code for a private field and its public property getter and setter is to use a refactoring tool. However, there is a new language feature called Automatic Properties that allows you to type less code and still get a private field and its public getter and setter. You declare the automatic property using a shortcut syntax and the compiler will generate the private field and the public setter and getter for you. For example, Figure 2 shows a Customer class that has several private fields that are exposed through a series of corresponding public properties. This class has 4 properties including one that is of the class type Address.&lt;br /&gt;Fig..2 – Customer Class using Explicit Fields, Getters and Setters&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;public class Customer &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;private int _customerID; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;private string _companyName; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;private Address _businessAddress; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;private string _phone; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;public int CustomerID &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;get { return _customerID; } &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;set { _customerID = value; } &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;} &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;public string CompanyName &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;get { return _companyName; } &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;set { _companyName = value; } &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;} &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;public Address BusinessAddress &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;get { return _businessAddress; } &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;set { _businessAddress = value; } &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;} &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;public string Phone &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;get { return _phone; } &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;set { _phone = value; } &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;} &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;}&lt;/span&gt;&lt;br /&gt;Fig. 3 shows how the same result can be achieved through automatic properties with less code than Fig.2. The Customer class in Fig.3 uses automatic properties to create the class’ properties without writing all of the code to declare a field and its property getter and setter.&lt;br /&gt;Fig.3 – Customer Class using Automatic Properties&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;public class Customer&lt;br /&gt;{&lt;br /&gt;public int CustomerID { get; set; }&lt;br /&gt;public string CompanyName { get; set; }&lt;br /&gt;public Address BusinessAddress { get; set; }&lt;br /&gt;public string Phone { get; set; }&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;Object Initializers &lt;/strong&gt;&lt;br /&gt;It is often helpful to have a constructor that accepts the key information that can be used to initialize an object. Many code refactoring tools help create constructors like this with .NET 2. However another new feature coming with .NET 3.5, C# 3 and VB 9 is object initialization. Object Initializers allow you to pass in named values for each of the public properties that will then be used to initialize the object.&lt;br /&gt;For example, initializing an instance of the Customer class could be accomplished using the following code:&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;Customer customer = new Customer();&lt;br /&gt;customer.CustomerID = 101;&lt;br /&gt;customer.CompanyName = "Foo Company";&lt;br /&gt;customer.BusinessAddress = new Address();&lt;br /&gt;customer.Phone = "111-111-1512";&lt;/span&gt;&lt;br /&gt;However, by taking advantage of Object Initializers an instance of the Customer class can be created using the following syntax:&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;Customer customer = new Customer &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;CustomerID = 101, &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;CompanyName = "Foo Company", &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;BusinessAddress = new Address(), &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;Phone = "111-111-1512" };&lt;/span&gt;&lt;br /&gt;The syntax is to wrap the named parameters and their values with curly braces. Object Initializers allow you to pass in any named public property to the constructor of the class. This is a great feature as it removes the need to create multiple overloaded constructors using different parameter lists to achieve the same goal. While you can currently create your own constructors, Object initializers are nice because you do not have to create multiple overloaded constructors to handle the various combinations of how you might want to initialize the object. To make matters easier, when typing the named parameters the intellisense feature of the IDE will display a list of the named parameters for you. You do not have to pass all of the parameters in and in fact, you can even use a nested object initialize for the BusinessAddress parameter, as shown below.&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;Customer customer = new Customer&lt;br /&gt;{&lt;br /&gt;CustomerID = 101,&lt;br /&gt;CompanyName = "Foo Company",&lt;br /&gt;BusinessAddress = new Address { City="Somewhere", State="FL" },&lt;br /&gt;Phone = "111-111-1512"&lt;br /&gt;};&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;Collection Initializers&lt;/strong&gt;&lt;br /&gt;Initializing collections have always been a bother to me. I never enjoy having to create the collection first and then add the items one by one to the collection in separate statements. (What can I say, I like tidy code.) Like Object Initializers, the new Collection Initializers allow you to create a collection and initialize it with a series of objects in a single statement. The following statement demonstrates how the syntax is very similar to that of the Object Initializers. Initializing a List&lt;customer&gt; is accomplished by passing the instances of the Customer objects wrapped inside of curly braces.&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;List&lt;customer&gt; custList = new List&lt;customer&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;{ customer1, customer2, customer3 };&lt;/span&gt;&lt;br /&gt;Collection Initializers can also be combined with Object Initializers. The result is a slick piece of code that initializes both the objects and the collection in a single statement.&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;List&lt;customer&gt; custList = new List&lt;customer&gt;&lt;br /&gt;{&lt;br /&gt;new Customer {ID = 101, CompanyName = "Foo Company"},&lt;br /&gt;new Customer {ID = 102, CompanyName = "Goo Company"},&lt;br /&gt;new Customer {ID = 103, CompanyName = "Hoo Company"}&lt;br /&gt;};&lt;/span&gt;&lt;br /&gt;The List&lt;customer&gt; and its 3 Customers from this example could also be written without Object Initializers nor Collection Initializers, in several lines of code. The syntax for that could look something like this without using these new features:&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;Customer customerFoo = new Customer();&lt;br /&gt;customerFoo.ID = 101;&lt;br /&gt;customerFoo.CompanyName = "Foo Company";&lt;br /&gt;Customer customerGoo = new Customer();&lt;br /&gt;customerGoo.ID = 102;&lt;br /&gt;customerGoo.CompanyName = "Goo Company";&lt;br /&gt;Customer customerHoo = new Customer();&lt;br /&gt;customerHoo.ID = 103;&lt;br /&gt;customerHoo.CompanyName = "Hoo Company";&lt;br /&gt;List&lt;customer&gt; customerList3 = new List&lt;customer&gt;();&lt;br /&gt;customerList3.Add(customerFoo);&lt;br /&gt;customerList3.Add(customerGoo);&lt;br /&gt;customerList3.Add(customerHoo);&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;Extension Methods &lt;/strong&gt;&lt;br /&gt;Have you ever looked through the list of intellisense for an object hoping to find a method that handles your specific need only to find that it did not exist? One way you can handle this is to use a new feature called Extension Methods. Extension methods are a new feature that allows you to enhance an existing class by adding a new method to it without modifying the actual code for the class. This is especially useful when using LINQ because several extension methods are available in writing LINQ query expressions.&lt;br /&gt;For example, imagine that you want to cube a number. You might have the length of one side of a cube and you want to know its volume. Since all the sides are the same length, it would be nice to simply have a method that calculates the cube of an integer. You might start by looking at the System.Int32 class to see if it exposes a Cube method, only to find that it does not. One solution for this is to create an extension method for the int class that calculates the Cube of an integer.&lt;br /&gt;Extension Methods must be created in a static class and the Extension Method itself must be defined as static. The syntax is pretty straightforward and familiar, except for the this keyword that is passed as the first parameter to the Extension Method. Notice in the code below that I create a static method named Cube that accepts a single parameter. In a static method, preceding the first parameter with the this keyword creates an extension method that applies to the type of that parameter. So in this case, I added an Extension Method called Cube to the int type.&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;public static class MyExtensions&lt;br /&gt;{&lt;br /&gt;public static int Cube(this int someNumber)&lt;br /&gt;{&lt;br /&gt;return someNumber ^ 3;&lt;br /&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;When you create an Extension Method, the method sows up in the intellisense in the IDE, as well. With this new code I can calculate the cube of an integer using the following code sample:&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;int oneSide = 3;&lt;br /&gt;int theCube = oneSide.Cube(); // Returns 27&lt;/span&gt;&lt;br /&gt;As nice as this feature is I do not recommend creating Extension Methods on classes if instead you can create a method for the class yourself. For example, if you wanted to create a method to operate on a Customer class to calculate their credit limit, best practices would be to add this method to the Customer class itself. Creating an Extension method in this case would violate the encapsulation principle by placing the code for the Customer’s credit limit calculation outside of the Customer class. However, Extension Methods are very useful when you cannot add a method to the class itself, as in the case of creating a Cube method on the int class. Just because you can use a tool, does not mean you should use a tool.&lt;br /&gt;&lt;strong&gt;Anonymous Types and Implicitly Typed Variables&lt;/strong&gt;&lt;br /&gt;When using LINQ to write query expressions, you might want to return information from several classes. It is very likely that you'd only want to return a small set of properties from these classes. However, when you retrieve information from different class sources in this manner, you cannot retrieve a generic list of your class type because you are not retrieving a specific class type. This is where Anonymous Types step in and make things easier because Anonymous Types allow you to create a class structure on the fly.&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;var dog = new { Breed = "Cocker Spaniel", &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;Coat = "black", FerocityLevel = 1 };&lt;/span&gt;&lt;br /&gt;Notice that the code above creates a new instance of a class that describes a dog. The dog variable will now represent the instance of the class and it will expose the Breed, Coat and Ferocity properties. Using this code I was able to create a structure for my data without having to create a Dog class explicitly. While I would rarely create a class using this feature to represent a Dog, this feature does come in handy when used with LINQ.&lt;br /&gt;When you create an Anonymous Type you need to declare a variable to refer to the object. Since you do not know what type you will be getting (since it is a new and anonymous type), you can declare the variable with the var keyword. This technique is called using an Implicitly Typed Variable.&lt;br /&gt;When writing a LINQ query expression, you may return various pieces of information. You could return all of these data bits and create an Anonymous Type to store them. For example, let’s assume you have a List&lt;customer&gt; and each Customer has a BusinessAddress property of type Address. In this situation you want to return the CompanyName and the State where the company is located. One way to accomplish this using an Anonymous Type is shown in Figure 4.&lt;br /&gt;Figure 4 – Using Anonymous Types with LINQ&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;List&lt;customer&gt; customerList = new List&lt;customer&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;new Customer {ID = 101, CompanyName = "Foo Co", BusinessAddress = new Address {State="FL"}}, &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;new Customer {ID = 102, CompanyName = "Goo Co", BusinessAddress = new Address {State="NY"}}, &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;new Customer {ID = 103, CompanyName = "Hoo Co", BusinessAddress = new Address {State="NY"}}, &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;new Customer {ID = 104, CompanyName = "Koo Co", BusinessAddress = new Address {State="NY"}} }; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;var query = from c in customerList &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;where c.BusinessAddress.State.Equals("FL") &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;select new { Name = c.CompanyName, c.BusinessAddress.State }; foreach (var co in query) Console.WriteLine(co.Name + " - " + co.State);&lt;/span&gt;&lt;br /&gt;Pay particular attention to the select clause in the LINQ query expression. The select clause is creating an instance of an Anonymous Type that will have a Name and a State property. These values come from 2 different objects, the Customer and the Address. Also notice that the properties can be explicitly renamed (CompanyName is renamed to Name) or they can implicitly take on the name as happens with the State property. Anonymous Types are very useful when retrieving data with LINQ.&lt;br /&gt;&lt;strong&gt;Wrapping Up&lt;/strong&gt;&lt;br /&gt;There are a lot of new language features coming with .NET 3.5 that both add new functionality and make the using of existing technologies easier. As we have seen in the past, when new technologies have been introduced, such as with generics, they often are the precursors to other technologies. The introduction of Generics allowed us to create strongly typed lists. Now because of those strongly typed lists of objects we will be able to write LINQ query expressions against the strongly typed objects and access their properties explicitly even using intellisense. These new features such as Object Initializers and Anonymous Types are the building blocks of LINQ and other future .NET technologies. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8302265551163912461-7854629417898627843?l=csharppoints.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharppoints.blogspot.com/feeds/7854629417898627843/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8302265551163912461&amp;postID=7854629417898627843' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/7854629417898627843'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/7854629417898627843'/><link rel='alternate' type='text/html' href='http://csharppoints.blogspot.com/2008/05/net-framework-35-new-features.html' title='.Net Framework 3.5 New Features'/><author><name>Avadhesh</name><uri>http://www.blogger.com/profile/07649968171539918545</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://3.bp.blogspot.com/_f6PgPvPXHH4/SDuPaNTx2LI/AAAAAAAAAAY/VBdoF2TkTec/s72-c/Code.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8302265551163912461.post-8456971956918061858</id><published>2008-05-22T02:00:00.000-07:00</published><updated>2008-05-22T02:28:20.430-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Csharp'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='questions'/><category scheme='http://www.blogger.com/atom/ns#' term='delegated'/><category scheme='http://www.blogger.com/atom/ns#' term='assembly'/><category scheme='http://www.blogger.com/atom/ns#' term='Articles'/><title type='text'>Csharp(C#) Questions</title><content type='html'>&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;What is Code Access Security (CAS)? &lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;Code access security is used to ensure that access to protected resourcesand operations is allowed only if the security policy allows it. To use CAS, the code should be verifiably type-safe code - i.e., code that can be verified by the JIT compiler to be type-safe (note that in some cases, the code may be type-safe, but the JIT compiler cannot verify it to be type-safe). Type-safe code accesses only the memory locations it is authorized to access, and only in well-defined, allowable ways. At runtime, the .NET security system ensures controlled access to protected resources and operations by walking the call stack - each caller in the stack must have the permissions being demanded for the operation being performed. If not, the operation fails and an exception is thrown. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;"&gt;&lt;span style="color:#666666;"&gt;&lt;strong&gt;Compare declarative versus imperative security&lt;/strong&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;Declarative security is implemented via attributes. No explicit code is required to implement this. Imperative security is implemented by explicitly coding the security requirements. An instance of the permission object is created and security calls are issued. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;What is the difference between Demand and Assert? &lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;Demand - calling code can access the resource protected by a permission demand through the code that calls this method, only if callers higher in the stack have been granted permission to access the resource. Results in a stack walk. Assert - calling code can access the resource protected by a permission demand through the code that calls this method, even if callers higher in the stack have not been granted permission to access the resource. Does not result in a stack walk. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;What is the difference between Demand and LinkDemand.&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;• Demand specifies that code access security stack walk must occur and all callers on the stack must have the permission or identity to pass. Demand occurs on every call at runtime. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;• LinkDemand happens only at just-in-time (JIT) compilation time and checks only the immediate caller. It does not check the caller's caller. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;"&gt;&lt;span style="color:#666666;"&gt;&lt;strong&gt;What is an Application Domain?&lt;/strong&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;An application domain represents isolation/scoping unit for a .NET application. .NET allows multiple applications to be loaded in a single process. It achieves this by loading each application in its own independent application domain. Each application domain is isolated from all other application domains. You can think of application domains as lightweight processes with a process. This is more efficient than creating a separate process for each application and provides the same benefit (isolation). Use System.AppDomain to create application domains programmatically. CLR itself runs in an application domain called the default domain. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;How do you handle errors in VB.NET and C#?&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;C# and VB.NET use structured error handling (unlike VB6 and earlier versions where error handling was implemented using Goto statement). Error handling in both VB.NET and C# is implemented using Try..Catch..Finally construct (C# uses lower case construct - try...catch...finally). &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;What is the purpose of the finally block?&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;A. The code in finally block is guaranteed to run, irrespective of whether an error occurs or not. Critical portions of code, for example release of file handles or database connections, should be placed in the finally block. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;How would you decide whether to use an abstract class or an interface?&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;There is no one correct answer, but some of the considerations are: * If you need to partially or fully implement some of the methods/properties, then use an abstract class. Interface cannot have implementation. If the methods are properties you are creating apply to a diverse set of different types of unrelated objects, then an interface is more appropriate. Abstract classes are more suitable for related object types. * If the methods/properties are subject to change frequently, then an abstract class is the one to use. Interfaces, once implemented cannot be changed - you have to create a new interface. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;What is a sealed class?&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;A. It is a class, which cannot be subclassed. It is a good practice to mark your classes as sealed, if you do not intend them to be subclassed. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;How do you prevent a class from being inherited? &lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;Mark it as sealed. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;"&gt;&lt;span style="color:#666666;"&gt;&lt;strong&gt;What are strong names and how do you create one?&lt;/strong&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;Strong names guarantee that an assembly’s name is globally unique. You can think of it as similar to GUID (but not same). In other words, a strong name uniquely identifies an assembly. To create a shared assembly (i.e. one deployed in GAC), you need to give it a strong name. Strong name is comprised of the following: name of the assembly, version information, public key and digital signature. Culture information is also used, if culture is specified. Creating a strong name using Visual Studio.NET From the command prompt, create a public/private key pair file using the strong name utility - sn.exe. In Visual Studio.NET, Specify the location of the key file using the AssemblyKeyFileAttribute. [assembly:AssemblyKeyFileAttribute("KeyFile.snk")] for C# [assembly:AssemblyKeyFileAttribute("KeyFile.snk")] for VB.NET To avoid problems with the path of the key, file you may want to specify the absolute path when specifying the AssemblyKeyFileAttribute. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;What is delay signing and why would you use it?&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;A. Delay signing is a mechanism to develop strongly named assemblies, without them actually being signed by the developer. The assembly is signed later on by the person having access to the private key. The purpose of delay signing is to secure the private key.&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;Explain the terms - assembly and manifest.&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;An assembly is the smallest unit of deployment and execution in .NET. Usually, there is one file (.exe or .dll) per assembly, although, it is possible to create multi-file assemblies by using allinker.exe. Manifest refers to the meta-data about an assembly. This meta-data consists information about the assembly version, its methods, properties and events, referenced assemblies, etc. As a result, assemblies are self-describing. Manifest for an assembly is contained in the assembly file itself (.dll or .exe). In case of multi-file assemblies, the manifest for all files is contained only in one file. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;"&gt;&lt;span style="color:#666666;"&gt;&lt;strong&gt;What are private and shared assemblies?&lt;/strong&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;Private assemblies are intended to be used by only one application and generally reside in the folder or one of the sub folders of the application using it. Private assemblies need not be strong named (see Q12 for strong name).Shared assemblies are intended to be used by many applications and are installed in the Global Assembly Cache (GAC). Shared assemblies have to be given a strong name. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;Where we can use DLL created made in C#.Net?&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;Supporting .Net, bcoz DLL made in C#.Net semicompiled version. Its not a com object. It is used only in .Net Framework.As it is to be compiled at runtime to byte code. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;What is the order of destructors called in a polymorphism hierarchy?&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;Destructors are called in reverse order of constructors. First destructor of most derived class is called followed by its parent’s destructor and so on till the topmost class in the hierarchy.You don’t have control over when the first destructor will be called, since it is determined by the garbage collector. Sometime after the object goes out of scope GC calls the destructor, then its parent’s destructor and so on.When a program terminates definitely all object’s destructors are called. Is it possible to Override Private Virtual methods. No, First of all you cannot declare a method as ‘private virtual’. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;"&gt;&lt;span style="color:#666666;"&gt;&lt;strong&gt;Is it possible to debug the classes written in other .Net languages in a C# project?&lt;/strong&gt; It is definitely possible to debug other .Net languages code in a C# project. As everyone knows .net can combine code written in several .net languages into one single assembly. Same is true with debugging. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;"&gt;&lt;span style="color:#666666;"&gt;&lt;strong&gt;What is the difference between shadow and override?&lt;/strong&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;Overriding is used to redefines only the methods, but shadowing redefines the entire element. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;What is a satellite Assembly?&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;An assembly containing localized resources for another assembly. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;How to declares a two-dimensional array in C#? &lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;Syntax for Two Dimensional Array in C Sharp is int[,] ArrayName; &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;"&gt;&lt;span style="color:#666666;"&gt;&lt;strong&gt;What are the Delegates in C#?&lt;/strong&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;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;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;If a method is marked as protected internal how can it be accessed?&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;Method marked as Protected internally can be accessed by the Classes within the same assembly, and classes derived from the declaring class. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;Should I make my destructor virtual?&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;A C# destructor is really just an override of the System.Object Finalize method, and so is virtual by definition. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;Does C# have its own class library?&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;Not exactly. The .NET Framework has a comprehensive class library, which C# can make use of. C# does not have its own class library. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;"&gt;&lt;span style="color:#666666;"&gt;&lt;strong&gt;Can you allow class to be inherited, but prevent the method from being over-ridden?&lt;/strong&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;color:#666666;"&gt;Yes, just leave the class public and make the method sealed.&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;"&gt;&lt;span style="color:#666666;"&gt;&lt;strong&gt;How’s method overriding different from overloading?&lt;/strong&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:times new roman;color:#666666;"&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;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://1.bp.blogspot.com/_f6PgPvPXHH4/SDU7GNTx2KI/AAAAAAAAAAM/Vusosq-tQj0/s1600-h/Next.gif"&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_f6PgPvPXHH4/SDU7GNTx2KI/AAAAAAAAAAM/Vusosq-tQj0/s1600-h/Next.gif"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8302265551163912461-8456971956918061858?l=csharppoints.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharppoints.blogspot.com/feeds/8456971956918061858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8302265551163912461&amp;postID=8456971956918061858' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/8456971956918061858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8302265551163912461/posts/default/8456971956918061858'/><link rel='alternate' type='text/html' href='http://csharppoints.blogspot.com/2008/05/csharpc-questions.html' title='Csharp(C#) Questions'/><author><name>Avadhesh</name><uri>http://www.blogger.com/profile/07649968171539918545</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></feed>
