<?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-5604931858474807762</id><updated>2011-08-06T03:44:12.547-07:00</updated><title type='text'>Asp.net with c# Help, Javascript, sql query, c#.net question</title><subtitle type='html'>Help related asp.net using C# coding,Sql help, using javascript help, code for asp.net using c# and Interview quation of asp.net using c#,how execute sql query help and using javascript help and general computer help</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dilipdeveloper.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://dilipdeveloper.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Dilip Kumar</name><uri>http://www.blogger.com/profile/04658649203656406985</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_8uCl_FKnlkM/SWSRjJIf1pI/AAAAAAAAAVk/vWVQ0S_05a0/S220/Picture+075.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>25</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5604931858474807762.post-8236648131741659456</id><published>2011-04-14T05:45:00.000-07:00</published><updated>2011-04-14T05:47:41.787-07:00</updated><title type='text'>Get FckEditor value using javascrip</title><content type='html'>How can I get the value of fckeditor using javascript or jquer.&lt;br /&gt;&amp;gt;&amp;gt;  var inst = FCKeditorAPI.GetInstance("description");&lt;br /&gt;       var html = inst.GetHTML();&lt;br /&gt;&lt;br /&gt;where description is the name or id of fckeditor instansce&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5604931858474807762-8236648131741659456?l=dilipdeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dilipdeveloper.blogspot.com/feeds/8236648131741659456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5604931858474807762&amp;postID=8236648131741659456' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/8236648131741659456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/8236648131741659456'/><link rel='alternate' type='text/html' href='http://dilipdeveloper.blogspot.com/2011/04/get-fckeditor-value-using-javascrip.html' title='Get FckEditor value using javascrip'/><author><name>Dilip Kumar</name><uri>http://www.blogger.com/profile/04658649203656406985</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_8uCl_FKnlkM/SWSRjJIf1pI/AAAAAAAAAVk/vWVQ0S_05a0/S220/Picture+075.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5604931858474807762.post-9078779654199265100</id><published>2010-02-03T03:45:00.000-08:00</published><updated>2010-02-03T03:52:13.545-08:00</updated><title type='text'>Find row index of gridview on RowCommand without CommandArgument</title><content type='html'>&lt;span style="font-weight: bold; color: rgb(255, 102, 102);"&gt;Gridview has a template field with item linkbutton delete with CommandName  now when user click on  linkbutton then find the rowindex on Rowcommand event of gridview using C#.net&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;protected void grdtest1_RowCommand(object sender, GridViewCommandEventArgs e)&lt;br /&gt;    {&lt;br /&gt;        if (e.CommandName == "DeleteRow")&lt;br /&gt;        {           &lt;br /&gt;            LinkButton gv = (LinkButton)e.CommandSource;&lt;br /&gt;            GridViewRow gvr = (GridViewRow)gv.Parent.Parent;         &lt;br /&gt;            int rownum = gvr.RowIndex;           &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/5604931858474807762-9078779654199265100?l=dilipdeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dilipdeveloper.blogspot.com/feeds/9078779654199265100/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5604931858474807762&amp;postID=9078779654199265100' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/9078779654199265100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/9078779654199265100'/><link rel='alternate' type='text/html' href='http://dilipdeveloper.blogspot.com/2010/02/find-row-index-of-gridview-on.html' title='Find row index of gridview on RowCommand without CommandArgument'/><author><name>Dilip Kumar</name><uri>http://www.blogger.com/profile/04658649203656406985</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_8uCl_FKnlkM/SWSRjJIf1pI/AAAAAAAAAVk/vWVQ0S_05a0/S220/Picture+075.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5604931858474807762.post-1745009478783321396</id><published>2009-04-03T04:24:00.000-07:00</published><updated>2009-04-03T05:22:32.222-07:00</updated><title type='text'>Bind multiple column value in row in gridview using asp.net(c#.net)</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_8uCl_FKnlkM/SdXz2veCpCI/AAAAAAAAAXo/MArE5RxhO9c/s1600-h/iamage2.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 260px;" src="http://4.bp.blogspot.com/_8uCl_FKnlkM/SdXz2veCpCI/AAAAAAAAAXo/MArE5RxhO9c/s320/iamage2.bmp" alt="" id="BLOGGER_PHOTO_ID_5320426656589063202" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Problem: I want to bind more than one column value in row in gridview . I fetch the value from database in table format now I want to bind the five row value in a single row in grid like this....&lt;br /&gt;&lt;br /&gt;&lt;textarea cols="70" rows="70"&gt;&lt;br /&gt;&lt;asp:gridview id="'grdpicture'" runat="'server'" autogeneratecolumns="'false'" allowpaging="'true'" borderwidth="'0'" borderstyle="'None'" pagesize="'3'" ondatabound="'grdpicture_DataBound1'"&gt;&lt;br /&gt;                    &lt;columns&gt;&lt;br /&gt;                    &lt;asp:templatefield&gt;&lt;br /&gt;                        &lt;itemtemplate&gt;                       &lt;br /&gt;                           &lt;ul class="'thumb'"&gt;                                &lt;%#DataBinder.Eval(Container.DataItem,'photo1')%&gt;                                &lt;%#DataBinder.Eval(Container.DataItem,'photo2')%&gt;                                &lt;%#DataBinder.Eval(Container.DataItem,'photo3')%&gt;                                &lt;%#DataBinder.Eval(Container.DataItem,'photo4')%&gt;                                &lt;%#DataBinder.Eval(Container.DataItem,'photo5')%&gt;        &lt;br /&gt;                            &lt;/ul&gt;                            &lt;br /&gt;                        &lt;/itemtemplate&gt;&lt;br /&gt;                    &lt;/asp:TemplateField&gt;&lt;br /&gt;                    &lt;/columns&gt;                  &lt;br /&gt;    &lt;/asp:GridView"&gt;&lt;br /&gt;*******This is the c# code to bind gridview&lt;br /&gt;using System;&lt;br /&gt;using System.Data;&lt;br /&gt;using System.Configuration;&lt;br /&gt;using System.Collections;&lt;br /&gt;using System.Web;&lt;br /&gt;using System.Web.Security;&lt;br /&gt;using System.Web.UI;&lt;br /&gt;using System.Web.UI.WebControls;&lt;br /&gt;using System.Web.UI.WebControls.WebParts;&lt;br /&gt;using System.Web.UI.HtmlControls;&lt;br /&gt; protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt; if (!IsPostBack)&lt;br /&gt; {&lt;br /&gt; showimage();&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;protected void showimage()&lt;br /&gt;{&lt;br /&gt;  {&lt;br /&gt;     string select = "select photoname,phototitle,photoname_big from stone_tbl ";&lt;br /&gt;     Dt = Str_con.ExecuteQuery(select);&lt;br /&gt;    DataTable fivepict = new DataTable();&lt;br /&gt;                fivepict.Columns.Add("photo1", typeof(string));            fivepict.Columns.Add("photo2", typeof(string));             fivepict.Columns.Add("photo3", typeof(string));             fivepict.Columns.Add("photo4", typeof(string));             fivepict.Columns.Add("photo5", typeof(string));   &lt;br /&gt;        if (Dt.Rows.Count &gt; 0)&lt;br /&gt;         {&lt;br /&gt;            int i = 0;&lt;br /&gt;                bool save = true;&lt;br /&gt;                while (i &lt; dr =" fivepict.NewRow();" j =" 1;" col = "photo"&gt;&lt;img src="'CategoryImage/" alt="'Products'" width="'50'" height="'50'" border="'0'/" /&gt;&lt;/li&gt;";&lt;br /&gt;                        i++;&lt;br /&gt;                        if (i == Dt.Rows.Count)&lt;br /&gt;                        {&lt;br /&gt;                            fivepict.Rows.Add(dr);&lt;br /&gt;                            save = false;&lt;br /&gt;                            j = 6;&lt;br /&gt;                        }&lt;br /&gt;                    }&lt;br /&gt;&lt;br /&gt;                    if (save)&lt;br /&gt;                        fivepict.Rows.Add(dr);&lt;br /&gt;                }&lt;br /&gt;                grdpicture.DataSource = fivepict;&lt;br /&gt;                grdpicture.DataBind();&lt;br /&gt;            }&lt;br /&gt;            else&lt;br /&gt;            {&lt;br /&gt;                grdpicture.DataSource = Dt;&lt;br /&gt;                grdpicture.DataBind();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        catch (Exception ex)&lt;br /&gt;        { }&lt;br /&gt;&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;&lt;/textarea&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5604931858474807762-1745009478783321396?l=dilipdeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://dilipdeveloper.blogspot.com' title='Bind multiple column value in row in gridview using asp.net(c#.net)'/><link rel='replies' type='application/atom+xml' href='http://dilipdeveloper.blogspot.com/feeds/1745009478783321396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5604931858474807762&amp;postID=1745009478783321396' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/1745009478783321396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/1745009478783321396'/><link rel='alternate' type='text/html' href='http://dilipdeveloper.blogspot.com/2009/04/bind-multiple-column-value-in-row-in.html' title='Bind multiple column value in row in gridview using asp.net(c#.net)'/><author><name>Dilip Kumar</name><uri>http://www.blogger.com/profile/04658649203656406985</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_8uCl_FKnlkM/SWSRjJIf1pI/AAAAAAAAAVk/vWVQ0S_05a0/S220/Picture+075.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_8uCl_FKnlkM/SdXz2veCpCI/AAAAAAAAAXo/MArE5RxhO9c/s72-c/iamage2.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5604931858474807762.post-5017854316332168840</id><published>2009-03-24T03:10:00.000-07:00</published><updated>2009-03-24T03:23:53.237-07:00</updated><title type='text'>Replace enter key value   from textbox using asp.net with c#.net and save in database</title><content type='html'>Problem: when I wants save multiline textbox value in database using asp.net with c#.net and show as it is its not happening ....&lt;br /&gt;   Actually the problem is when we enter the value in textbox and press enter key. value like this&lt;br /&gt;  this is dilip&lt;br /&gt;  web developer&lt;br /&gt;it save in database but when fetch value from database its showing in same line like this: this is dilip web developer&lt;br /&gt;&lt;br /&gt;solution: string txtvalue = mytextbox.Text.ToString().Replace("\r\n", "&lt;br/&gt;");&lt;br /&gt;         and save it.&lt;br /&gt;        Because enter key value is \r\n . and now it will show as u entered text&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5604931858474807762-5017854316332168840?l=dilipdeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://dilipdeveloper.blogspot.com/' title='Replace enter key value  &lt;br/&gt; from textbox using asp.net with c#.net and save in database'/><link rel='replies' type='application/atom+xml' href='http://dilipdeveloper.blogspot.com/feeds/5017854316332168840/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5604931858474807762&amp;postID=5017854316332168840' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/5017854316332168840'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/5017854316332168840'/><link rel='alternate' type='text/html' href='http://dilipdeveloper.blogspot.com/2009/03/replace-enter-key-value-with-from.html' title='Replace enter key value  &lt;br/&gt; from textbox using asp.net with c#.net and save in database'/><author><name>Dilip Kumar</name><uri>http://www.blogger.com/profile/04658649203656406985</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_8uCl_FKnlkM/SWSRjJIf1pI/AAAAAAAAAVk/vWVQ0S_05a0/S220/Picture+075.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5604931858474807762.post-9130572723986886428</id><published>2009-03-18T02:15:00.000-07:00</published><updated>2009-03-18T02:16:10.125-07:00</updated><title type='text'>Return last date of the current month using sql</title><content type='html'>SELECT datepart(dd,DateAdd(day, -1, DateAdd(month, DateDiff(month, 0, getdate())+1, 0))) AS Dateval&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5604931858474807762-9130572723986886428?l=dilipdeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dilipdeveloper.blogspot.com/feeds/9130572723986886428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5604931858474807762&amp;postID=9130572723986886428' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/9130572723986886428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/9130572723986886428'/><link rel='alternate' type='text/html' href='http://dilipdeveloper.blogspot.com/2009/03/return-last-date-of-current-month-using.html' title='Return last date of the current month using sql'/><author><name>Dilip Kumar</name><uri>http://www.blogger.com/profile/04658649203656406985</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_8uCl_FKnlkM/SWSRjJIf1pI/AAAAAAAAAVk/vWVQ0S_05a0/S220/Picture+075.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5604931858474807762.post-7935067547873132557</id><published>2009-03-17T23:32:00.000-07:00</published><updated>2009-03-17T23:48:13.594-07:00</updated><title type='text'>How get month name,weekday name,year using sql</title><content type='html'>&lt;span style="font-weight:bold;"&gt;RETURN THE WEEKDAYNUMBER&lt;/span&gt;&lt;br /&gt;select datepart(dw,getdate()) as weekdaynumber&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;RETURN THE WEEKDAYNAME&lt;/span&gt;&lt;br /&gt;select datename(dw,getdate()) as weekdayname&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;RETURN THE CURRENTDATENUMBER&lt;/span&gt;&lt;br /&gt;select day(getdate()) as currentdatenumber&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;RETURN THE CURRENTDATE&lt;/span&gt;&lt;br /&gt;select GETDATE() as currentdate&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;RETURN THE CURRENTYEAR&lt;/span&gt;&lt;br /&gt;select year(getdate()) as currentyear&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;RETURN THE CURRENTMONTHNUMBER&lt;/span&gt;&lt;br /&gt;select month(getdate()) as currenmonthnumber&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;RETURN THE CURRENTDATENUMBER&lt;/span&gt;&lt;br /&gt;select day(getdate()) as currentddatenumber&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;RETURN THE MONTHNAME&lt;/span&gt;&lt;br /&gt;select datename(mm,getdate()) as currentmonthname&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5604931858474807762-7935067547873132557?l=dilipdeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dilipdeveloper.blogspot.com/feeds/7935067547873132557/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5604931858474807762&amp;postID=7935067547873132557' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/7935067547873132557'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/7935067547873132557'/><link rel='alternate' type='text/html' href='http://dilipdeveloper.blogspot.com/2009/03/how-get-month-nameweek-nameyear-using.html' title='How get month name,weekday name,year using sql'/><author><name>Dilip Kumar</name><uri>http://www.blogger.com/profile/04658649203656406985</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_8uCl_FKnlkM/SWSRjJIf1pI/AAAAAAAAAVk/vWVQ0S_05a0/S220/Picture+075.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5604931858474807762.post-4077238231092231230</id><published>2009-03-17T23:10:00.000-07:00</published><updated>2009-03-17T23:15:21.887-07:00</updated><title type='text'>Get 2nd(second) lowest sallery using sql</title><content type='html'>select top 1 * from (select top 2 * from sallery_tbl order by usallery asc) as  Sallery order by USallery desc&lt;br /&gt;&lt;br /&gt;where Sallery_tbl is table name and usallery is column name&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5604931858474807762-4077238231092231230?l=dilipdeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://dilipdeveloper.blogspot.com/' title='Get 2nd(second) lowest sallery using sql'/><link rel='replies' type='application/atom+xml' href='http://dilipdeveloper.blogspot.com/feeds/4077238231092231230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5604931858474807762&amp;postID=4077238231092231230' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/4077238231092231230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/4077238231092231230'/><link rel='alternate' type='text/html' href='http://dilipdeveloper.blogspot.com/2009/03/get-2ndsecond-lowest-sallery-using-sql.html' title='Get 2nd(second) lowest sallery using sql'/><author><name>Dilip Kumar</name><uri>http://www.blogger.com/profile/04658649203656406985</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_8uCl_FKnlkM/SWSRjJIf1pI/AAAAAAAAAVk/vWVQ0S_05a0/S220/Picture+075.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5604931858474807762.post-2026689025798722</id><published>2009-01-11T23:59:00.000-08:00</published><updated>2009-02-05T21:06:30.614-08:00</updated><title type='text'>Update Table value with case in Sql</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Use case for update the table value using sql query&lt;br /&gt;Ex. table Gender_tbl and like this&lt;br /&gt;id  Gen_Name&lt;br /&gt;1      Male&lt;br /&gt;2      Male&lt;br /&gt;3      Female&lt;br /&gt;4      Femal&lt;br /&gt;5      Male&lt;br /&gt;no I have to update Gen_Name Male with M and Femal with F&lt;br /&gt;solution:&lt;br /&gt;&lt;/span&gt;&lt;span&gt;UPDATE GENDER_TBL SET Gen_Name= (CASE WHEN (Gen_Name='Male') THEN 'M' WHEN (Gen_Name='Female') THEN 'F' else ' ' end)&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Posted by &lt;a href="http://dilipdeveloper.blogspot.com/" target="_blank"&gt;Dilip Kumar&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5604931858474807762-2026689025798722?l=dilipdeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dilipdeveloper.blogspot.com/feeds/2026689025798722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5604931858474807762&amp;postID=2026689025798722' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/2026689025798722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/2026689025798722'/><link rel='alternate' type='text/html' href='http://dilipdeveloper.blogspot.com/2009/01/update-table-value-with-case-in-sql.html' title='Update Table value with case in Sql'/><author><name>Dilip Kumar</name><uri>http://www.blogger.com/profile/04658649203656406985</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_8uCl_FKnlkM/SWSRjJIf1pI/AAAAAAAAAVk/vWVQ0S_05a0/S220/Picture+075.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5604931858474807762.post-2180841459634134877</id><published>2009-01-11T22:27:00.000-08:00</published><updated>2009-01-11T22:47:14.876-08:00</updated><title type='text'>Return Multiple Column vaue in Single column with comma separated using Sql</title><content type='html'>&lt;span style="font-weight: bold;"&gt;How can get multiple coumn value in single column with camman separeted using sql.&lt;/span&gt; like&lt;br /&gt;I have table test2 and column name id and value like this&lt;br /&gt;Id&lt;br /&gt;1&lt;br /&gt;2&lt;br /&gt;3&lt;br /&gt;4&lt;br /&gt;5&lt;br /&gt;6&lt;br /&gt;..&lt;br /&gt;and I want result like this 1,2,3,4,5,6,....&lt;br /&gt;solution:&lt;br /&gt;declare @a varchar(500)&lt;br /&gt;set  @a = ' '&lt;br /&gt;select @a = @a + cast(id as varchar(20)) + ',' from test2&lt;br /&gt;if len(@a)&gt;1&lt;br /&gt;set @a= left(@a,len(@a)-1)&lt;br /&gt;select case @a when ' ' then '0' else @a end as id&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5604931858474807762-2180841459634134877?l=dilipdeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dilipdeveloper.blogspot.com/feeds/2180841459634134877/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5604931858474807762&amp;postID=2180841459634134877' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/2180841459634134877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/2180841459634134877'/><link rel='alternate' type='text/html' href='http://dilipdeveloper.blogspot.com/2009/01/return-multiple-column-vaue-in-single.html' title='Return Multiple Column vaue in Single column with comma separated using Sql'/><author><name>Dilip Kumar</name><uri>http://www.blogger.com/profile/04658649203656406985</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_8uCl_FKnlkM/SWSRjJIf1pI/AAAAAAAAAVk/vWVQ0S_05a0/S220/Picture+075.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5604931858474807762.post-5924786044845314546</id><published>2009-01-11T22:08:00.000-08:00</published><updated>2009-01-11T22:19:47.408-08:00</updated><title type='text'>Spacebar  Check in TextBox Using Javascript</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Trim Function using java script.Validation for text box if there only space using  java script.validation for space in text box using java script.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Solution:&lt;br /&gt;&lt;br /&gt;Create A textbox with id txtname and a button id btntest and wite this function inside script tag.&lt;br /&gt;   &lt;br /&gt;     function trim(string)&lt;br /&gt;     {&lt;br /&gt;      var a = string.replace(/^\s+/, '');&lt;br /&gt;      return a.replace(/\s+$/, '')&lt;br /&gt;     }&lt;br /&gt;    function TestTrim()&lt;br /&gt;    {&lt;br /&gt;&lt;br /&gt;    x = window.document.getElementById("txtname");&lt;br /&gt;       str="Please Enter User Name";&lt;br /&gt;    if (trim(x.value)=="")&lt;br /&gt;    {&lt;br /&gt;        alert(str);&lt;br /&gt;        x.select();&lt;br /&gt;        x.focus();&lt;br /&gt;        return false ;&lt;br /&gt;    }   &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;And then call the function on c#(code behind page)&lt;br /&gt;btntest.Attributes.Add("onclick", "return TestTrim();");&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5604931858474807762-5924786044845314546?l=dilipdeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dilipdeveloper.blogspot.com/feeds/5924786044845314546/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5604931858474807762&amp;postID=5924786044845314546' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/5924786044845314546'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/5924786044845314546'/><link rel='alternate' type='text/html' href='http://dilipdeveloper.blogspot.com/2009/01/spacebar-check-in-textbox-using.html' title='Spacebar  Check in TextBox Using Javascript'/><author><name>Dilip Kumar</name><uri>http://www.blogger.com/profile/04658649203656406985</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_8uCl_FKnlkM/SWSRjJIf1pI/AAAAAAAAAVk/vWVQ0S_05a0/S220/Picture+075.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5604931858474807762.post-4530367299498583405</id><published>2009-01-07T03:35:00.000-08:00</published><updated>2009-01-07T03:39:11.494-08:00</updated><title type='text'>How can search column in database using sql</title><content type='html'>&lt;span style="font-weight: bold;"&gt;How can search column in database using sql.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;solution:-&lt;br /&gt;use databasename&lt;br /&gt;select it and execute and then write this query and execute it . it will give all the table in wich there will be the column name like you search.&lt;br /&gt;  select * from information_schema.columns where column_name like '%abc%'&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5604931858474807762-4530367299498583405?l=dilipdeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dilipdeveloper.blogspot.com/feeds/4530367299498583405/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5604931858474807762&amp;postID=4530367299498583405' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/4530367299498583405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/4530367299498583405'/><link rel='alternate' type='text/html' href='http://dilipdeveloper.blogspot.com/2009/01/how-can-search-column-in-database-using.html' title='How can search column in database using sql'/><author><name>Dilip Kumar</name><uri>http://www.blogger.com/profile/04658649203656406985</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_8uCl_FKnlkM/SWSRjJIf1pI/AAAAAAAAAVk/vWVQ0S_05a0/S220/Picture+075.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5604931858474807762.post-2388634754462711828</id><published>2009-01-07T03:28:00.000-08:00</published><updated>2009-01-07T03:35:04.460-08:00</updated><title type='text'>Search the table from database using sql</title><content type='html'>How can search the table name from the existing database if there are table exist but I forgot the full name of table in sql&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;Solution:- select * from information_schema.tables where table_name like '%abc%'&lt;br /&gt;&lt;br /&gt;where abc is table name&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5604931858474807762-2388634754462711828?l=dilipdeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dilipdeveloper.blogspot.com/feeds/2388634754462711828/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5604931858474807762&amp;postID=2388634754462711828' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/2388634754462711828'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/2388634754462711828'/><link rel='alternate' type='text/html' href='http://dilipdeveloper.blogspot.com/2009/01/search-table-from-database-using-sql.html' title='Search the table from database using sql'/><author><name>Dilip Kumar</name><uri>http://www.blogger.com/profile/04658649203656406985</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_8uCl_FKnlkM/SWSRjJIf1pI/AAAAAAAAAVk/vWVQ0S_05a0/S220/Picture+075.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5604931858474807762.post-2121078193015950765</id><published>2008-10-16T03:30:00.000-07:00</published><updated>2008-10-16T04:01:19.807-07:00</updated><title type='text'>Convert Asp.net to Asp.net Ajax enabled website in Asp.net 2.0</title><content type='html'>How can I convert the asp.net website to Ajax enabled website in asp.net 2.0&lt;br /&gt;&lt;br /&gt;This quation was very difficult for me change the simple website to Ajax enable website. Simply if we want to make ajax enabled website then select the Ajaxenabledwebsite from the Dashboard when click on file new and website. but if I din't this then I faced problem to convert this asp.net website to Ajax enabled website. its very simple&lt;br /&gt;&lt;br /&gt;step1: add the ajaxcontrolltoolkit.dll in your application bin folder by add refrence.&lt;br /&gt;&lt;br /&gt;step2: add the some line of code in web.config inside the&lt;br /&gt;&lt;textarea type="textarea" cols="52" rows="23" readonly="readonly" name="categoryDetail" id="categoryDetail"&gt;&lt;httphandlers&gt;&lt;br /&gt;   &lt;remove verb="*" path="*.asmx"&gt;&lt;br /&gt;   &lt;add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"&gt;&lt;br /&gt;   &lt;add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"&gt;&lt;br /&gt;   &lt;add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"&gt;&lt;br /&gt;  &lt;/httphandlers&gt;&lt;br /&gt;&lt;/textarea&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5604931858474807762-2121078193015950765?l=dilipdeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dilipdeveloper.blogspot.com/feeds/2121078193015950765/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5604931858474807762&amp;postID=2121078193015950765' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/2121078193015950765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/2121078193015950765'/><link rel='alternate' type='text/html' href='http://dilipdeveloper.blogspot.com/2008/10/convert-aspnet-to-aspnet-ajax-enabled.html' title='Convert Asp.net to Asp.net Ajax enabled website in Asp.net 2.0'/><author><name>Dilip Kumar</name><uri>http://www.blogger.com/profile/04658649203656406985</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_8uCl_FKnlkM/SWSRjJIf1pI/AAAAAAAAAVk/vWVQ0S_05a0/S220/Picture+075.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5604931858474807762.post-2249035113108540867</id><published>2008-09-19T06:40:00.002-07:00</published><updated>2008-09-19T06:58:27.499-07:00</updated><title type='text'>Disable or readonly the checkbox  using javascipt</title><content type='html'>For disable or readonly the checkbox  using javascipt use the disable property of checkbox.&lt;br /&gt;&lt;br /&gt;document.getElementById("ChkBoxName").disabled =false;&lt;br /&gt;&lt;br /&gt;And for the Enable the checkbox using javascript&lt;br /&gt;&lt;br /&gt;document.getElementById("ChkBoxName").disabled =true;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5604931858474807762-2249035113108540867?l=dilipdeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dilipdeveloper.blogspot.com/feeds/2249035113108540867/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5604931858474807762&amp;postID=2249035113108540867' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/2249035113108540867'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/2249035113108540867'/><link rel='alternate' type='text/html' href='http://dilipdeveloper.blogspot.com/2008/09/disable-or-readonly-checkbox-using.html' title='Disable or readonly the checkbox  using javascipt'/><author><name>Dilip Kumar</name><uri>http://www.blogger.com/profile/04658649203656406985</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_8uCl_FKnlkM/SWSRjJIf1pI/AAAAAAAAAVk/vWVQ0S_05a0/S220/Picture+075.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5604931858474807762.post-8492804896307201218</id><published>2008-09-19T06:40:00.001-07:00</published><updated>2008-09-19T06:52:44.631-07:00</updated><title type='text'>Check the column value if value is in string format with coma separated using Sql</title><content type='html'>If column value is in 1,2,34,23,44,444,12,23,... format than how can check the value using like operator in Sql. means if the coma separated value is in column in any table then how can check the value using like operator in Sql.&lt;br /&gt;&lt;br /&gt;solution:&lt;br /&gt;select * from s&lt;br /&gt;where&lt;br /&gt;sid like '44,%' or sid like '%,44,%'&lt;br /&gt; or sid like '%,44' or sid='44'&lt;br /&gt;&lt;br /&gt;where sid is column name&lt;br /&gt;this will only return the 44&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5604931858474807762-8492804896307201218?l=dilipdeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dilipdeveloper.blogspot.com/feeds/8492804896307201218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5604931858474807762&amp;postID=8492804896307201218' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/8492804896307201218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/8492804896307201218'/><link rel='alternate' type='text/html' href='http://dilipdeveloper.blogspot.com/2008/09/check-column-value-if-value-is-in.html' title='Check the column value if value is in string format with coma separated using Sql'/><author><name>Dilip Kumar</name><uri>http://www.blogger.com/profile/04658649203656406985</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_8uCl_FKnlkM/SWSRjJIf1pI/AAAAAAAAAVk/vWVQ0S_05a0/S220/Picture+075.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5604931858474807762.post-2357916011310636747</id><published>2008-09-19T06:40:00.000-07:00</published><updated>2008-09-19T06:46:24.506-07:00</updated><title type='text'>Return Multi Row value in a single column with comma seprated</title><content type='html'>Return Multi Row value in a single column with comma seprated using sql&lt;br /&gt;I want Return output like 1,2,3,4,5 using sql.&lt;br /&gt;There is one table in which has column&lt;br /&gt;   id    name&lt;br /&gt;   1     Dilip&lt;br /&gt;   2     Dinesh&lt;br /&gt;   3     Varun&lt;br /&gt;   4     Dhanpat&lt;br /&gt;   5     Renuka&lt;br /&gt;&lt;br /&gt;solution:&lt;br /&gt;declare @a varchar(500)&lt;br /&gt;set  @a = ' '&lt;br /&gt;select @a = @a + cast(id as varchar(20)) + ',' from tablename&lt;br /&gt;if len(@a)&gt;1&lt;br /&gt;set @a= left(@a,len(@a)-1)&lt;br /&gt;select case @a when '' then '0' else @a end as id&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Use case , becaue may be there is no any value in this table so it will retun o&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5604931858474807762-2357916011310636747?l=dilipdeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dilipdeveloper.blogspot.com/feeds/2357916011310636747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5604931858474807762&amp;postID=2357916011310636747' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/2357916011310636747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/2357916011310636747'/><link rel='alternate' type='text/html' href='http://dilipdeveloper.blogspot.com/2008/09/return-multi-row-value-in-single-column.html' title='Return Multi Row value in a single column with comma seprated'/><author><name>Dilip Kumar</name><uri>http://www.blogger.com/profile/04658649203656406985</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_8uCl_FKnlkM/SWSRjJIf1pI/AAAAAAAAAVk/vWVQ0S_05a0/S220/Picture+075.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5604931858474807762.post-5385633352613875834</id><published>2008-07-27T21:29:00.000-07:00</published><updated>2008-07-27T21:34:23.026-07:00</updated><title type='text'>Factory patteren based code in C#.net</title><content type='html'>&lt;span style="font-weight: bold; color: rgb(255, 153, 0);"&gt;IMPLEMETN THE INTERFACES AND USE IT FACTORY PATTERN BASE CODE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Data;&lt;br /&gt;using System.Configuration;&lt;br /&gt;using System.Web;&lt;br /&gt;using System.Web.Security;&lt;br /&gt;using System.Web.UI;&lt;br /&gt;using System.Web.UI.WebControls;&lt;br /&gt;using System.Web.UI.WebControls.WebParts;&lt;br /&gt;using System.Web.UI.HtmlControls;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public interface myinterface&lt;br /&gt;{&lt;br /&gt;   int add(int x,int y);&lt;br /&gt;   //int mul(int w, int z);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public class class1 : myinterface&lt;br /&gt;{&lt;br /&gt;   public int add(int a, int b)&lt;br /&gt;   {&lt;br /&gt;       int c = a + b;&lt;br /&gt;       return c;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public class class2 : myinterface&lt;br /&gt;{&lt;br /&gt;   public int add(int j, int k)&lt;br /&gt;   {&lt;br /&gt;       int l = j * k;&lt;br /&gt;       return l;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;class Factory&lt;br /&gt;{&lt;br /&gt;   public myinterface GetObject(int type)&lt;br /&gt;   {&lt;br /&gt;       myinterface base1 = null;&lt;br /&gt;       switch (type)&lt;br /&gt;       {&lt;br /&gt;           case 1:&lt;br /&gt;               base1 = new class1();&lt;br /&gt;               break;&lt;br /&gt;           case 2:&lt;br /&gt;               base1 = new class2();&lt;br /&gt;               break;&lt;br /&gt;       }&lt;br /&gt;       return base1;&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public partial class _Default : System.Web.UI.Page&lt;br /&gt;{&lt;br /&gt;   Factory factory = new Factory();&lt;br /&gt;   protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;   {&lt;br /&gt;&lt;br /&gt;   }&lt;br /&gt;   protected void Button1_Click(object sender, EventArgs e)&lt;br /&gt;   {      &lt;br /&gt;       myinterface mytest = factory.GetObject(1);&lt;br /&gt;       int result = mytest.add(Convert.ToInt32(TextBox1.Text.ToString()), Convert.ToInt32(TextBox2.Text.ToString()));&lt;br /&gt;       txtresult.Text = Convert.ToString(result);     &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   protected void Button2_Click(object sender, EventArgs e)&lt;br /&gt;   {&lt;br /&gt;&lt;br /&gt;       myinterface multiply = factory.GetObject(2);&lt;br /&gt;       int multiplevalue = multiply.add(Convert.ToInt32(TextBox1.Text.ToString()), Convert.ToInt32(TextBox2.Text.ToString()));&lt;br /&gt;       txtmultiply.Text = Convert.ToString(multiplevalue);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5604931858474807762-5385633352613875834?l=dilipdeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dilipdeveloper.blogspot.com/feeds/5385633352613875834/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5604931858474807762&amp;postID=5385633352613875834' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/5385633352613875834'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/5385633352613875834'/><link rel='alternate' type='text/html' href='http://dilipdeveloper.blogspot.com/2008/07/factory-patteren-based-code-in-cnet.html' title='Factory patteren based code in C#.net'/><author><name>Dilip Kumar</name><uri>http://www.blogger.com/profile/04658649203656406985</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_8uCl_FKnlkM/SWSRjJIf1pI/AAAAAAAAAVk/vWVQ0S_05a0/S220/Picture+075.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5604931858474807762.post-2563517956103490329</id><published>2008-07-24T05:14:00.000-07:00</published><updated>2008-07-24T05:15:12.775-07:00</updated><title type='text'>Regular Expression in dotnet</title><content type='html'>&lt;h3&gt;Regular expression examples for decimals input&lt;/h3&gt; &lt;p&gt;Positive Integers — ^\d+$&lt;br /&gt;Negative Integers — ^-\d+$&lt;br /&gt;Integer —  ^-{0,1}\d+$&lt;br /&gt;Positive Number — ^\d*\.{0,1}\d+$&lt;br /&gt;Negative Number —  ^-\d*\.{0,1}\d+$&lt;br /&gt;Positive Number or Negative Number -  ^-{0,1}\d*\.{0,1}\d+$&lt;br /&gt;Phone number — ^\+?[\d\s]{3,}$&lt;br /&gt;Phone with code —  ^\+?[\d\s]+\(?[\d\s]{10,}$&lt;br /&gt;Year 1900-2099 — ^(19|20)[\d]{2,2}$&lt;br /&gt;Date (dd mm  yyyy, d/m/yyyy, etc.) —  ^([1-9]|0[1-9]|[12][1-9]|3[01])\D([1-9]|0[1-9]|1[012])\D(19[0-9][0-9]|20[0-9][0-9])$&lt;br /&gt;IP  v4 —  ^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]){3}$&lt;/p&gt; &lt;h3&gt;Regular expression examples for Alphabetic input&lt;/h3&gt; &lt;p&gt;Personal Name — ^[\w\.\’]{2,}([\s][\w\.\’]{2,})+$&lt;br /&gt;Username —  ^[\w\d\_\.]{4,}$&lt;br /&gt;Password at least 6 symbols — ^.{6,}$&lt;br /&gt;Password or empty  input — ^.{6,}$|^$&lt;br /&gt;email —  ^[\_]*([a-z0-9]+(\.|\_*)?)+@([a-z][a-z0-9\-]+(\.|\-*\.))+[a-z]{2,6}$&lt;br /&gt;domain —  ^([a-z][a-z0-9\-]+(\.|\-*\.))+[a-z]{2,6}$&lt;/p&gt; &lt;p&gt;Url —   http://([\w-]+\.)+[\w-]+(/[\w- ./?%&amp;amp;=]*)?&lt;/p&gt; &lt;h3&gt;Other regular expressions&lt;/h3&gt; &lt;p&gt;Match no input — ^$&lt;br /&gt;Match blank input — ^\s[\t]*$&lt;br /&gt;Match New line —  [\r\n]|$&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5604931858474807762-2563517956103490329?l=dilipdeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dilipdeveloper.blogspot.com/feeds/2563517956103490329/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5604931858474807762&amp;postID=2563517956103490329' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/2563517956103490329'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/2563517956103490329'/><link rel='alternate' type='text/html' href='http://dilipdeveloper.blogspot.com/2008/07/regular-expression-in-dotnet.html' title='Regular Expression in dotnet'/><author><name>Dilip Kumar</name><uri>http://www.blogger.com/profile/04658649203656406985</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_8uCl_FKnlkM/SWSRjJIf1pI/AAAAAAAAAVk/vWVQ0S_05a0/S220/Picture+075.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5604931858474807762.post-5892930357645868016</id><published>2008-07-18T02:07:00.000-07:00</published><updated>2008-07-18T02:50:59.435-07:00</updated><title type='text'>How use  trigger in sql</title><content type='html'>&lt;span style="color: rgb(255, 0, 0);font-family:arial;font-size:100%;"  &gt;&lt;span style="font-weight: bold;"&gt;Example of Delete trigger&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;CREATE trigger [TRIGGER_Deletesubcategory] ON dbo.category&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;FOR delete&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;AS          &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;declare @nmid int          &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;select @nmid=sno from deleted&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;delete from subcategory where cat_id= @nmid  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;There will be two table one is category and second one is subcategory and the primery key of category table will be sno and the this will foreign key(cat_id)  for subcategory table.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5604931858474807762-5892930357645868016?l=dilipdeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dilipdeveloper.blogspot.com/feeds/5892930357645868016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5604931858474807762&amp;postID=5892930357645868016' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/5892930357645868016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/5892930357645868016'/><link rel='alternate' type='text/html' href='http://dilipdeveloper.blogspot.com/2008/07/how-user-trigger-in-sql.html' title='How use  trigger in sql'/><author><name>Dilip Kumar</name><uri>http://www.blogger.com/profile/04658649203656406985</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_8uCl_FKnlkM/SWSRjJIf1pI/AAAAAAAAAVk/vWVQ0S_05a0/S220/Picture+075.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5604931858474807762.post-4540736774899216625</id><published>2008-07-11T22:28:00.000-07:00</published><updated>2008-07-11T22:41:57.656-07:00</updated><title type='text'>Image Thumbnail using C#.net</title><content type='html'>//This is resize function to set image size as you want&lt;br /&gt;resizeimage(imagename); (where imagegname like- image1.jpg)&lt;br /&gt;&lt;br /&gt;//this is the image control where you bind the image&lt;br /&gt;img src='MakeThumbnail.aspx?file="imagename" &amp;h=" + h + " &amp;w=" + w + "'  height="200" widht="200"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//Resize function (where width of the image will be fix and the hight of the image will be change according to height&lt;br /&gt;&lt;br /&gt;public void resizeimage(string image)&lt;br /&gt;   {&lt;br /&gt;       System.Drawing.Image img;&lt;br /&gt;       try&lt;br /&gt;       {&lt;br /&gt;           string path = Server.MapPath("imagefolder/" + image);&lt;br /&gt;           img = System.Drawing.Image.FromFile(path);&lt;br /&gt;       }&lt;br /&gt;       catch&lt;br /&gt;       {&lt;br /&gt;&lt;br /&gt;           string path = Server.MapPath("imagefolder/no_img_avai.gif");&lt;br /&gt;           img = System.Drawing.Image.FromFile(path);&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        h = img.Height;&lt;br /&gt;        w = img.Width;&lt;br /&gt;       if (w &gt;= 103)&lt;br /&gt;       {&lt;br /&gt;&lt;br /&gt;           int hei = h * 103;&lt;br /&gt;           int he = hei / w;&lt;br /&gt;           h = he;&lt;br /&gt;           w = 103;&lt;br /&gt;&lt;br /&gt;       }&lt;br /&gt;       else&lt;br /&gt;       {&lt;br /&gt;           int hei = h * 103;&lt;br /&gt;           int he = hei / w;&lt;br /&gt;           h = he;&lt;br /&gt;       }&lt;br /&gt;     &lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//MAKE ONE ASPX FILE NAME  MakeThumbnail.aspx&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.IO;&lt;br /&gt;using System.Data;&lt;br /&gt;using System.Configuration;&lt;br /&gt;using System.Collections;&lt;br /&gt;using System.Web;&lt;br /&gt;using System.Web.Security;&lt;br /&gt;using System.Web.UI;&lt;br /&gt;using System.Web.UI.WebControls;&lt;br /&gt;using System.Web.UI.WebControls.WebParts;&lt;br /&gt;using System.Web.UI.HtmlControls;&lt;br /&gt;&lt;br /&gt;public partial class MakeThumbnail : System.Web.UI.Page&lt;br /&gt;{&lt;br /&gt;   protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;   {&lt;br /&gt;       // get the file name -- fall800.jpg&lt;br /&gt;       string file = Request.QueryString["file"];&lt;br /&gt;       int w = Convert.ToInt32(Request.QueryString["w"]);&lt;br /&gt;       int h = Convert.ToInt32(Request.QueryString["h"]);&lt;br /&gt;       string filepath = Server.MapPath("imagefolder/" + file.ToString());&lt;br /&gt;       // create an image object, using the filename we just retrieved&lt;br /&gt;       System.Drawing.Image image = System.Drawing.Image.FromFile(filepath);&lt;br /&gt;&lt;br /&gt;       // create the actual thumbnail image&lt;br /&gt;       System.Drawing.Image thumbnailImage = image.GetThumbnailImage(w, h, new System.Drawing.Image.GetThumbnailImageAbort(ThumbnailCallback), IntPtr.Zero);&lt;br /&gt;&lt;br /&gt;       // make a memory stream to work with the image bytes&lt;br /&gt;       MemoryStream imageStream = new MemoryStream();&lt;br /&gt;&lt;br /&gt;       // put the image into the memory stream&lt;br /&gt;       thumbnailImage.Save(imageStream, System.Drawing.Imaging.ImageFormat.Jpeg);&lt;br /&gt;&lt;br /&gt;       // make byte array the same size as the image&lt;br /&gt;       byte[] imageContent = new Byte[imageStream.Length];&lt;br /&gt;&lt;br /&gt;       // rewind the memory stream&lt;br /&gt;       imageStream.Position = 0;&lt;br /&gt;&lt;br /&gt;       // load the byte array with the image&lt;br /&gt;       imageStream.Read(imageContent, 0, (int)imageStream.Length);&lt;br /&gt;&lt;br /&gt;       // return byte array to caller with image type&lt;br /&gt;       Response.ContentType = "image/jpeg";&lt;br /&gt;       Response.BinaryWrite(imageContent);&lt;br /&gt;   }&lt;br /&gt;   public bool ThumbnailCallback()&lt;br /&gt;   {&lt;br /&gt;       return true;&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/5604931858474807762-4540736774899216625?l=dilipdeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dilipdeveloper.blogspot.com/feeds/4540736774899216625/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5604931858474807762&amp;postID=4540736774899216625' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/4540736774899216625'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/4540736774899216625'/><link rel='alternate' type='text/html' href='http://dilipdeveloper.blogspot.com/2008/07/image-thumbnail-using-cnet.html' title='Image Thumbnail using C#.net'/><author><name>Dilip Kumar</name><uri>http://www.blogger.com/profile/04658649203656406985</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_8uCl_FKnlkM/SWSRjJIf1pI/AAAAAAAAAVk/vWVQ0S_05a0/S220/Picture+075.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5604931858474807762.post-1803765535504850573</id><published>2008-07-08T21:50:00.000-07:00</published><updated>2008-07-08T22:01:31.347-07:00</updated><title type='text'>Change color after click on checkbox in grid using javascript</title><content type='html'>&lt;span style="color:#ff0000;"&gt;//Javascript Code&lt;/span&gt;&lt;br /&gt;function changeColor(CheckBoxObj)&lt;br /&gt;{&lt;br /&gt;if (CheckBoxObj.checked == true) {&lt;br /&gt;CheckBoxObj.parentNode.parentNode.style.backgroundColor='#88AAFF';&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;CheckBoxObj.parentNode.parentNode.style.backgroundColor='';&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;call it check box onclick event&lt;br /&gt;onclick="changeColor(this);"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5604931858474807762-1803765535504850573?l=dilipdeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dilipdeveloper.blogspot.com/feeds/1803765535504850573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5604931858474807762&amp;postID=1803765535504850573' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/1803765535504850573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/1803765535504850573'/><link rel='alternate' type='text/html' href='http://dilipdeveloper.blogspot.com/2008/07/change-color-after-click-on-checkbox-in.html' title='Change color after click on checkbox in grid using javascript'/><author><name>Dilip Kumar</name><uri>http://www.blogger.com/profile/04658649203656406985</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_8uCl_FKnlkM/SWSRjJIf1pI/AAAAAAAAAVk/vWVQ0S_05a0/S220/Picture+075.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5604931858474807762.post-8323710692431329849</id><published>2008-07-08T21:22:00.000-07:00</published><updated>2008-07-08T21:23:22.072-07:00</updated><title type='text'>Date compare with javascript</title><content type='html'>&lt;span style="color:#ff0000;"&gt;&lt;strong&gt;To date must be less than from date&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;function datevalid(sender, args)&lt;br /&gt;{&lt;br /&gt;var str1 = document.getElementById("txtfrom").value;&lt;br /&gt;var str2 = document.getElementById("txtto").value;&lt;br /&gt;var dt1 = parseInt(str1.substring(0,2),10);&lt;br /&gt;var mon1 = parseInt(str1.substring(3,5),10);&lt;br /&gt;var yr1 = parseInt(str1.substring(6,10),10);&lt;br /&gt;var dt2 = parseInt(str2.substring(0,2),10);&lt;br /&gt;var mon2 = parseInt(str2.substring(3,5),10);&lt;br /&gt;var yr2 = parseInt(str2.substring(6,10),10);&lt;br /&gt;var date1 = new Date(yr1, mon1, dt1);&lt;br /&gt;var date2 = new Date(yr2, mon2, dt2);&lt;br /&gt;if(date2 &lt; date1)&lt;br /&gt;{&lt;br /&gt;document.getElementById('CustomValidator1').innerHTML="From date must be Less than To date";&lt;br /&gt;args.IsValid = false;&lt;br /&gt;return;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5604931858474807762-8323710692431329849?l=dilipdeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dilipdeveloper.blogspot.com/feeds/8323710692431329849/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5604931858474807762&amp;postID=8323710692431329849' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/8323710692431329849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/8323710692431329849'/><link rel='alternate' type='text/html' href='http://dilipdeveloper.blogspot.com/2008/07/date-compare-with-javascript.html' title='Date compare with javascript'/><author><name>Dilip Kumar</name><uri>http://www.blogger.com/profile/04658649203656406985</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_8uCl_FKnlkM/SWSRjJIf1pI/AAAAAAAAAVk/vWVQ0S_05a0/S220/Picture+075.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5604931858474807762.post-5482958266106020624</id><published>2008-07-08T04:07:00.000-07:00</published><updated>2008-07-08T05:27:01.357-07:00</updated><title type='text'>C# quations - answers</title><content type='html'>&lt;p&gt;&lt;span style="font-size:85%;"&gt;Good for preparation and general self-testing, but too specific for the actual job interview. This was sent in by a job applicant getting ready to step into the .NET field in &lt;st1:country-region st="on"&gt;&lt;st1:place st="on"&gt;India&lt;/st1:place&gt;&lt;/st1:country-region&gt;.&lt;/span&gt;&lt;/p&gt;  &lt;ol start="1" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;Are private class-level      variables inherited? &lt;/b&gt;- Yes, but they are not accessible, so looking at      it you can honestly say that they are not inherited. But they are. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;Why does DllImport not      work for me? &lt;/b&gt;- All methods marked with the DllImport attribute must be      marked as public static extern. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;Why does my Windows      application pop up a console window every time I run it? &lt;/b&gt;- Make sure      that the target type set in the project properties setting is set to      Windows Application, and not Console Application. If you’re using the      command line, compile with /target:winexe, not /target:exe. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;Why do I get an error      (CS1006) when trying to declare a method without specifying a return type?      &lt;/b&gt;- If you leave off the return type on a method declaration, the      compiler thinks you are trying to declare a constructor. So if you are      trying to declare a method that returns nothing, use void. The following      is an example: // This results in a CS1006 error public static      staticMethod (mainStatic obj) // This will work as wanted public static      void staticMethod (mainStatic obj) &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;Why do I get a syntax      error when trying to declare a variable called checked? &lt;/b&gt;- The word      checked is a keyword in C#. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;Why do I get a security      exception when I try to run my C# app? &lt;/b&gt;- Some security exceptions are      thrown if you are working on a network share. There are some parts of the      frameworks that will not run if being run off a share (roaming profile,      mapped drives, etc.). To see if this is what’s happening, just move the      executable over to your local drive and see if it runs without the      exceptions. One of the common exceptions thrown under these conditions is      System.Security.SecurityException. To get around this, you can change your      security policy for the intranet zone, code group 1.2, (the zone that      running off shared folders falls into) by using the caspol.exe tool. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;Why do I get a &lt;i&gt;CS5001:      does not have an entry point defined&lt;/i&gt; error when compiling? &lt;/b&gt;- The      most common problem is that you used a lowercase ‘m’ when defining the      Main method. The correct way to implement the entry point is as follows:      class test { static void &lt;st1:place st="on"&gt;Main&lt;/st1:place&gt;(string[]      args) {} } &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;What optimizations does      the C# compiler perform when you use the /optimize+ compiler option? &lt;/b&gt;-      The following is a response from a developer on the C# compiler team: We      get rid of unused locals (i.e., locals that are never read, even if      assigned). We get rid of unreachable code. We get rid of try-catch with an      empty try. We get rid of try-finally with an empty try. We get rid of      try-finally with an empty finally. We optimize branches over branches:      gotoif A, lab1 goto lab2: lab1: turns into: gotoif !A, lab2 lab1: We      optimize branches to ret, branches to next instruction, and branches to      branches. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;What is the syntax for      calling an overloaded constructor within a constructor (this() and      constructorname() does not compile)? &lt;/b&gt;- The syntax for calling another      constructor is as follows: class B { B(int i) { } } class C : B { C() :      base(5) // call base constructor B(5) { } C(int i) : this() // call C() {      } public static void &lt;st1:place st="on"&gt;Main&lt;/st1:place&gt;() {} } &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;What is the equivalent to      regsvr32 and regsvr32 /u a file in .NET development? &lt;/b&gt;- Try using      RegAsm.exe. Search MSDN on &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpgrfassemblyregistrationtoolregasmexe.asp"&gt;Assembly      Registration Tool&lt;/a&gt;. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;What is the difference      between a struct and a class in C#? &lt;/b&gt;- From language spec: The list of      similarities between classes and structs is as follows. Longstructs can      implement interfaces and can have the same kinds of members as classes.      Structs differ from classes in several important ways; however, structs      are value types rather than reference types, and inheritance is not      supported for structs. Struct values are stored on the stack or in-line.      Careful programmers can sometimes enhance performance through judicious      use of structs. For example, the use of a struct rather than a class for a      Point can make a large difference in the number of memory allocations      performed at runtime. The program below creates and initializes an array      of 100 points. With Point implemented as a class, 101 separate objects are      instantiated-one for the array and one each for the 100 elements. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;My switch statement works      differently than in C++! Why? &lt;/b&gt;- C# does not support an explicit fall      through for case blocks. The following code is not legal and will not      compile in C#: &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;  &lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;13.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;switch(x)&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;14.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;{&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;15.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;        &lt;/span&gt;case 0: // do something&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;16.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;        &lt;/span&gt;case 1: // do something as continuation of case 0&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;17.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;        &lt;/span&gt;default: // do something in common with&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;18.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;               &lt;/span&gt;//0, 1 and everything else&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;19.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;        &lt;/span&gt;break;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;20.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;}&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;  &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size:85%;"&gt;To achieve the same effect in C#, the code must be modified as shown below (notice how the control flows are explicit):&lt;/span&gt;&lt;/p&gt;  &lt;pre style="margin-left: 0.5in;"&gt;&lt;span style="font-size:85%;"&gt;class Test&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in;"&gt;&lt;span style="font-size:85%;"&gt;{&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;  &lt;/span&gt;public static void &lt;st1:place st="on"&gt;Main&lt;/st1:place&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;         &lt;/span&gt;int x = 3;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;         &lt;/span&gt;switch(x)&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;         &lt;/span&gt;{&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;                 &lt;/span&gt;case 0: // do something&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;                 &lt;/span&gt;goto case 1;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;                 &lt;/span&gt;case 1: // do something in common with 0&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;                 &lt;/span&gt;goto default;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;                 &lt;/span&gt;default: // do something in common with 0, 1, and anything else&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;                 &lt;/span&gt;break;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;         &lt;/span&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;  &lt;/span&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in;"&gt;&lt;span style="font-size:85%;"&gt;}&lt;/span&gt;&lt;/pre&gt;  &lt;ol start="21" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;Is there regular      expression (regex) support available to C# developers? &lt;/b&gt;- Yes. The .NET      class libraries provide support for regular expressions. Look at the &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemtextregularexpressions.asp"&gt;System.Text.RegularExpressions      namespace&lt;/a&gt;. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;Is there any sample C#      code for simple threading? &lt;/b&gt;- Yes: &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;  &lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;23.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;using System;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;24.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;using System.Threading;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;25.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;class ThreadTest&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;26.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;{&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;27.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;        &lt;/span&gt;public void runme()&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;28.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;        &lt;/span&gt;{&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;29.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;               &lt;/span&gt;Console.WriteLine("Runme Called");&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;30.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;        &lt;/span&gt;}&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;31.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;        &lt;/span&gt;public static void &lt;st1:place st="on"&gt;Main&lt;/st1:place&gt;(String[] args)&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;32.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;        &lt;/span&gt;{&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;33.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;               &lt;/span&gt;ThreadTest b = new ThreadTest();&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;34.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;               &lt;/span&gt;Thread t = new Thread(new ThreadStart(b.runme));&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;35.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;               &lt;/span&gt;t.Start();&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;36.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;        &lt;/span&gt;}&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in;"&gt;&lt;span style="font-size:85%;"&gt;}&lt;/span&gt;&lt;/pre&gt;  &lt;ol start="37" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;Is there an equivalent of      exit() for quitting a C# .NET application? &lt;/b&gt;- Yes, you can use      System.Environment.Exit(int exitCode) to exit the application or      Application.Exit() if it’s a Windows Forms app. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;Is there a way to force garbage      collection? &lt;/b&gt;- Yes. Set all references to null and then call      System.GC.Collect(). If you need to have some objects destructed, and      System.GC.Collect() doesn’t seem to be doing it for you, you can force      finalizers to be run by setting all the references to the object to null      and then calling System.GC.RunFinalizers(). &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;Is there a way of      specifying which block or loop to break out of when working with nested      loops? &lt;/b&gt;- The easiest way is to use goto: &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;  &lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;40.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;using System;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;41.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;class BreakExample&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;42.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;{&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;43.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;        &lt;/span&gt;public static void &lt;st1:place st="on"&gt;Main&lt;/st1:place&gt;(String[] args) {&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;44.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;               &lt;/span&gt;for(int i=0; i&lt;3;&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;45.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;               &lt;/span&gt;{&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;46.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;                       &lt;/span&gt;Console.WriteLine(”Pass {0}: “, i);&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;47.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;                       &lt;/span&gt;for( int j=0 ; j&lt;100&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;48.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;                       &lt;/span&gt;{&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;49.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;                               &lt;/span&gt;if ( j == 10)&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;50.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;                                      &lt;/span&gt;goto done;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;51.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;                               &lt;/span&gt;Console.WriteLine(”{0} “, j);&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;52.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;                       &lt;/span&gt;}&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;53.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;                       &lt;/span&gt;Console.WriteLine(”This will not print”);&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;54.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;               &lt;/span&gt;}&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;55.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;               &lt;/span&gt;done:&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;56.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;                       &lt;/span&gt;Console.WriteLine(”Loops complete.”);&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;57.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;        &lt;/span&gt;}&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/pre&gt;&lt;pre style="margin-left: 0.5in;"&gt;&lt;span style="font-size:85%;"&gt;}&lt;/span&gt;&lt;/pre&gt;  &lt;ol start="58" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;Is it possible to restrict      the scope of a field/method of a class to the classes in the same      namespace? &lt;/b&gt;- There is no way to restrict to a namespace. Namespaces      are never units of protection. But if you’re using assemblies, you can use      the ‘internal’ access modifier to restrict access to only within the      assembly. &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:85%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:85%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h2&gt;&lt;span style="font-size:85%;"&gt;.Net &amp;amp; C# Interview question, along with general programming questions&lt;/span&gt;&lt;/h2&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:85%;"&gt;Hey, These are some Interview Questions with suggested answers we collected in &lt;a href="http://tech.groups.yahoo.com/group/middle-east-developers/"&gt;Middle-East-Developers&lt;/a&gt;, for more questions in other fields like C++, you can check the group.&lt;br /&gt;These questions are collected by&lt;/span&gt;&lt;/p&gt;  &lt;ul type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-size:85%;"&gt;Adel Khalil&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-size:85%;"&gt;Yehia Megahed&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-size:85%;"&gt;Hisham Abd El-Hafez&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-size:85%;"&gt;Mohammed Hossam&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;Q1: Can DateTime variables be null?&lt;br /&gt;&lt;/b&gt;A1: No, because it is a value type (Struct)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Q2: Describe the Asp.net Page Life Cycle?&lt;br /&gt;&lt;/b&gt;A2: &lt;a href="http://msdn2.microsoft.com/en-us/library/ms178472.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms178472.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Q3: Describe the Asp.net pipeline ? Give an Example when you need to extend it? How do you do so?&lt;br /&gt;&lt;/b&gt;A3: &lt;a href="http://msdn.microsoft.com/msdnmag/issues/02/09/HTTPPipelines/"&gt;http://msdn.microsoft.com/msdnmag/issues/02/09/HTTPPipelines/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Q4: Describe the accessibility modifier protected internal&lt;br /&gt;&lt;/b&gt;A4: Members are accessible to derived classes and classes within the same Assembly&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Q5: Difference between an interface and abstract class?&lt;/b&gt;&lt;br /&gt;A5: In the interface all methods must be abstract, in the abstract class some methods can be concrete. In the interface no accessibility modifiers are allowed, which is ok in abstract classes.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Q6: How do you perform pre- and post-processing to extend a WebMethod ?&lt;/b&gt;&lt;br /&gt;A6: Use SOAP extensions ...&lt;a href="http://msdn.microsoft.com/msdnmag/issues/04/03/ASPColumn/"&gt;http://msdn.microsoft.com/msdnmag/issues/04/03/ASPColumn/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Q7: What are Design Patterns?&lt;/b&gt;&lt;br /&gt;A7: It is a big topic in Object Oriented, so for more information see this, &lt;a href="http://dofactory.com/Patterns/Patterns.aspx"&gt;http://dofactory.com/Patterns/Patterns.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Q8: What do you know about .net framework 3.0 ?&lt;/b&gt;&lt;br /&gt;A8: any answer that introduces Windows Communication Foundation (WCF), Windows Workflow Foundation (WF), Windows Presentation Foundation (WPF) and Windows Card Space (WCS) is right, also you can mention that it was originally called WinFX&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Q9: What do you know about ATLAS (Microsoft ASP.net &lt;st1:place st="on"&gt;&lt;st1:city st="on"&gt;AJAX&lt;/st1:city&gt;&lt;/st1:place&gt; Extensions) ?&lt;/b&gt;&lt;br /&gt;A9: for more information check here, &lt;a href="http://ajax.asp.net/"&gt;http://ajax.asp.net&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Q10: What do you know about Agile software methodologies?&lt;/b&gt;&lt;br /&gt;A10: &lt;a href="http://en.wikipedia.org/wiki/Agile_software_development"&gt;http://en.wikipedia.org/wiki/Agile_software_development&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Q11: What do you know about Web Services Enhancements (WSE)?&lt;/b&gt;&lt;br /&gt;A11: &lt;a href="http://msdn.microsoft.com/webservices/webservices/building/wse/default.aspx"&gt;http://msdn.microsoft.com/webservices/webservices/building/wse/default.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Q12: What is &lt;st1:place st="on"&gt;&lt;st1:city st="on"&gt;AJAX&lt;/st1:city&gt;&lt;/st1:place&gt; ?&lt;/b&gt;&lt;br /&gt;A12: Asynchronous Javascript And XML&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Q13:What is NUnit, or What is Unit testing?&lt;/b&gt;&lt;br /&gt;A13: Unit testing: is a procedure used to validate that a particular module of source code is working properly from each modification to the next. The procedure is to write test cases for all functions and methods so that whenever a change causes a regression, it can be quickly identified and fixed. Ideally, each test case is separate from the others; constructs such as mock objects can assist in separating unit tests. This type of testing is mostly done by the developers, NUnit is a famous tool for Unit Testing in .net&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Q14: What is an Asp.net Http Handler &amp;amp; Http Module?&lt;/b&gt;&lt;br /&gt;A14: &lt;a href="http://www.15seconds.com/issue/020417.htm"&gt;http://www.15seconds.com/issue/020417.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Q15: What is mutable type ? immutable type ?&lt;/b&gt;&lt;br /&gt;A15: Immutable type are types whose instance data, fields and properties, does not change after the instance is created. Most value types are immutable, but the mutable type are A type whose instance data, fields and properties, can be changed after the instance is created. Most Reference Types are mutable.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Q16: What is the HttpContext Object? Where is it accessible?&lt;/b&gt;&lt;br /&gt;A16: It's is an Object that Encapsulates all HTTP-specific information about an individual HTTP request. it is avaliable through out the Asp.net request pipline.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Q17: What is the difference between String &amp;amp; StringBuilder classes?&lt;/b&gt;&lt;br /&gt;A17: String is an immutable type while StringBuilder is a mutable type&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Q18: What's the difference between C# 1.0 &amp;amp; C# 2.0?&lt;/b&gt;&lt;br /&gt;A18: Any answer that introduces stuff like, Generics, Anonymous Methods, Nullable types, Iterators ... etc, is correct&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Q19: Without using the multiplication or addition operations, how can you multiply a number x by 8?&lt;/b&gt;&lt;br /&gt;A19: Shift x to the left 3 times, x &lt;&lt;&gt;                                    &lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 1.5pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:85%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;br /&gt;&lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;b&gt;Q20: What is the difference between ASP.net 1.x &amp;amp; ASP.net 2.0 ?&lt;/b&gt;&lt;br /&gt;A20: Any answer that include stuff like Provider model (membership provider, role provider ... etc) and Master Pages, Code Beside model, new web controls will be ok.&lt;/span&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5604931858474807762-5482958266106020624?l=dilipdeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dilipdeveloper.blogspot.com/feeds/5482958266106020624/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5604931858474807762&amp;postID=5482958266106020624' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/5482958266106020624'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/5482958266106020624'/><link rel='alternate' type='text/html' href='http://dilipdeveloper.blogspot.com/2008/07/c-quations-answers.html' title='C# quations - answers'/><author><name>Dilip Kumar</name><uri>http://www.blogger.com/profile/04658649203656406985</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_8uCl_FKnlkM/SWSRjJIf1pI/AAAAAAAAAVk/vWVQ0S_05a0/S220/Picture+075.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5604931858474807762.post-2975981746688942797</id><published>2008-07-08T03:59:00.000-07:00</published><updated>2008-07-08T04:06:33.019-07:00</updated><title type='text'>Dot Net Interview Quations</title><content type='html'>&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;  &lt;/p&gt;&lt;p&gt;&lt;span class="forquestionsblue"&gt;&lt;b&gt;What is .NET?&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;span class="answers"&gt;.NET is essentially a framework for software development. It is similar in nature to any other software development framework (J2EE etc) in that it provides a set of runtime containers/capabilities, and a rich set of pre-built functionality in the form of class libraries and APIs &lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;The .NET Framework is an environment for building, deploying, and running Web Services and other applications. It consists of three main parts: the Common Language Runtime, the Framework classes, and ASP.NET. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;How many languages .NET is supporting now? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;When .NET was introduced it came with several languages. VB.NET, C#, COBOL and Perl, etc. The site DotNetLanguages.Net says 44 languages are supported. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span class="forquestionsblue"&gt;&lt;b&gt;How is .NET able to support multiple languages?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;A language should comply with the Common Language Runtime standard to become a .NET language. In .NET, code is compiled to Microsoft Intermediate Language (MSIL for short). This is called as Managed Code. This Managed code is run in .NET environment. So after compilation to this IL the language is not a barrier. A code can call or use a function written in another language. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;How ASP .NET different from ASP? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;Scripting is separated from the HTML, Code is compiled as a DLL, these DLLs can be executed on the server. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What is smart navigation? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;The cursor position is maintained when the page gets refreshed due to the server side validation and the page gets refreshed. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span class="forquestionsblue"&gt;&lt;b&gt;What is view state? &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;The web is stateless. But in ASP.NET, the state of a page is maintained in the in the page itself automatically. How? The values are encrypted and saved in hidden controls. this is done automatically by the ASP.NET. This can be switched off / on for a single control &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;How do you validate the controls in an ASP .NET page? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;Using special validation controls that are meant for this. We have Range Validator, Email Validator. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Can the validation be done in the server side? Or this can be done only in the Client side? &lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="answers1"&gt;Client side is done by default. Server side validation is also possible. We can switch off the client side and server side can be done.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Using ActiveX Control in .Net &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;ActiveX control is a special type of COM component that supports a User Interface. Using ActiveX Control in your .Net Project is even easier than using COM component. They are bundled usually in .ocx files. Again a proxy assembly is made by .Net utility AxImp.exe (which we will see shortly) which your application (or client) uses as if it is a .Net control or assembly. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;Making Proxy Assembly For ActiveX Control: First, a proxy assembly is made using AxImp.exe (acronym for ActiveX Import) by writing following command on Command Prompt: &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;C:&gt; AxImp C:MyProjectsMyControl.ocx&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;This command will make two dlls, e.g., in case of above command &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;MyControl.dll&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;AxMyControl.dll&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;The first file MyControl.dll is a .Net assembly proxy, which allows you to reference the ActiveX as if it were non-graphical object. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;The second file AxMyControl.dll is the Windows Control, which allows u to use the graphical aspects of activex control and use it in the Windows Form Project. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;Adding Reference of ActiveX Proxy Assembly in your Project Settings: To add a reference of ActiveX Proxy Assembly in our Project, do this: &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;o Select Project A Add Reference (Select Add Reference from Project Menu).&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;o This will show you a dialog box, select .Net tab from the top of window.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;o Click Browse button on the top right of window.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;o Select the dll file for your ActiveX Proxy Assembly (which is MyControl.dll) and click OK o Your selected component is now shown in the ‘Selected Component’ List Box. Click OK again Some More On Using COM or ActiveX in .Net&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;.Net only provides wrapper class or proxy assembly (Runtime Callable Wrapper or RCW) for COM or activeX control. In the background, it is actually delegating the tasks to the original COM, so it does not convert your COM/activeX but just imports them. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;A good thing about .Net is that when it imports a component, it also imports the components that are publically referenced by that component. So, if your component, say MyDataAcsess.dll references ADODB.dll then .Net will automatically import that COM component too! &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;The Visual Studio.NET does surprise you in a great deal when u see that it is applying its intellisense (showing methods, classes, interfaces, properties when placing dot) even on your imported COM components!!!! Isn’t it a magic or what? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;When accessing thru RCW, .Net client has no knowledge that it is using COM component, it is presented just as another C# assembly. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;U can also import COM component thru command prompt (for reference see Professional C# by Wrox) &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;U can also use your .Net components in COM, i.e., export your .net components (for reference see Professional C# by Wrox)&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What is Machine.config? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;Machine configuration file: The machine.config file contains settings that apply to the entire computer. This file is located in the %runtime install path%Config directory. There is only one machine.config file on a computer. The Machine.Config file found in the "CONFIG" subfolder of your .NET Framework install directory (c:WINNTMicrosoft.NETFramework{Version Number} CONFIG on Windows 2000 installations). The machine.config, which can be found in the directory $WINDIR$Microsoft.NETFrameworkv1.0.3705CONFIG, is an XML-formatted configuration file that specifies configuration options for the machine. This file contains, among many other XML elements, a browser Caps element. Inside this element are a number of other elements that specify parse rules for the various User-Agents, and what properties each of these parsing supports. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;For example, to determine what platform is used, a filter element is used that specifies how to set the platform property based on what platform name is found in the User-Agent string. Specifically, the machine.config file contains: &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;platform=Win95&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;platform=Win98&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;platform=WinNT&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;That is, if in the User-Agent string the string "Windows 95" or "Win95" is found, the platform property is set to Win95. There are a number of filter elements in the browserCaps element in the machine.config file that define the various properties for various User-Agent strings. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;Hence, when using the Request.Browser property to determine a user's browser features, the user's agent string is matched up to particular properties in the machine.config file. The ability for being able to detect a user's browser's capabilities, then, is based upon the honesty in the browser's sent User-Agent string. For example, Opera can be easily configured to send a User-Agent string that makes it appear as if it's IE 5.5. In this case from the Web server's perspective (and, hence, from your ASP.NET Web page's perspective), the user is visiting using IE 5.5, even though, in actuality, he is using Opera. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What is Web.config? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;In classic ASP all Web site related information was stored in the metadata of IIS. This had the disadvantage that remote Web developers couldn't easily make Web-site configuration changes. For example, if you want to add a custom 404 error page, a setting needs to be made through the IIS admin tool, and you're Web host will likely charge you a flat fee to do this for you. With ASP.NET, however, these settings are moved into an XML-formatted text file (Web.config) that resides in the Web site's root directory. Through Web.config you can specify settings like custom 404 error pages, authentication and authorization settings for the Web sitempilation options for the ASP.NET Web pages, if tracing should be enabled, etc.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;The Web.config file is an XML-formatted file. At the root level is the tag. Inside this tag you can add a number of other tags, the most common and useful one being the system.web tag, where you will specify most of the Web site configuration parameters. However, to specify application-wide settings you use the tag. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;For example, if we wanted to add a database connection string parameter we could have a Web.config file like so. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What is the difference between &lt;st1:city st="on"&gt;&lt;st1:place st="on"&gt;ADO&lt;/st1:place&gt;&lt;/st1:City&gt; and ADO.NET? &lt;/b&gt;&lt;br /&gt;&lt;st1:city st="on"&gt;&lt;st1:place st="on"&gt;&lt;span class="answers"&gt;ADO&lt;/span&gt;&lt;/st1:place&gt;&lt;/st1:City&gt;&lt;span class="answers"&gt; uses Recordsets and cursors to access and modify data. Because of its inherent design, Recordset can impact performance on the server side by tying up valuable resources. In addition, COM marshalling - an expensive data conversion process - is needed to transmit a Recordset. ADO.NET addresses three important needs that &lt;st1:place st="on"&gt;&lt;st1:city st="on"&gt;ADO&lt;/st1:City&gt;&lt;/st1:place&gt; doesn't address: &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;1. Providing a comprehensive disconnected data-access model, which is crucial to the Web environment&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;2. Providing tight integration with XML, and&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;3. Providing seamless integration with the .NET Framework (e.g., compatibility with the base class library's type system). From an ADO.NET implementation perspective, the Recordset object in &lt;st1:city st="on"&gt;&lt;st1:place st="on"&gt;ADO&lt;/st1:place&gt;&lt;/st1:City&gt; is eliminated in the .NET architecture. In its place, ADO.NET has several dedicated objects led by the DataSet object and including the DataAdapter, and DataReader objects to perform specific tasks. In addition, ADO.NET DataSets operate in disconnected state whereas the ADO RecordSet objects operated in a fully connected state.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;In &lt;st1:city st="on"&gt;&lt;st1:place st="on"&gt;ADO&lt;/st1:place&gt;&lt;/st1:City&gt;, the in-memory representation of data is the RecordSet. In ADO.NET, it is the dataset. A RecordSet looks like a single table. If a RecordSet is to contain data from multiple database tables, it must use a JOIN query, which assembles the data from the various database tables into a single result table. In contrast, a dataset is a collection of one or more tables. The tables within a dataset are called data tables; specifically, they are DataTable objects. If a dataset contains data from multiple database tables, it will typically contain multiple DataTable objects. That is, each DataTable object typically corresponds to a single database table or view. In this way, a dataset can mimic the structure of the underlying database. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;In &lt;st1:city st="on"&gt;&lt;st1:place st="on"&gt;ADO&lt;/st1:place&gt;&lt;/st1:City&gt; you scan sequentially through the rows of the RecordSet using the ADO MoveNext method. In ADO.NET, rows are represented as collections, so you can loop through a table as you would through any collection, or access particular rows via ordinal or primary key index. A cursor is a database element that controls record navigation, the ability to update data, and the visibility of changes made to the database by other users. ADO.NET does not have an inherent cursor object, but instead includes data classes that provide the functionality of a traditional cursor. For example, the functionality of a forward-only, read-only cursor is available in the ADO.NET DataReader object. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;There is one significant difference between disconnected processing in &lt;st1:city st="on"&gt;&lt;st1:place st="on"&gt;ADO&lt;/st1:place&gt;&lt;/st1:City&gt; and ADO.NET. In &lt;st1:city st="on"&gt;&lt;st1:place st="on"&gt;ADO&lt;/st1:place&gt;&lt;/st1:City&gt; you communicate with the database by making calls to an OLE DB provider. In ADO.NET you communicate with the database through a data adapter (an OleDbDataAdapter, SqlDataAdapter, OdbcDataAdapter, or OracleDataAdapter object), which makes calls to an OLE DB provider or the APIs provided by the underlying data source.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p&gt;&lt;span class="forquestionsblue"&gt;&lt;b&gt;What are Attributes?&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;span class="answers"&gt;Attributes are declarative tags in code that insert additional metadata into an assembly. There exist two types of attributes in the .NET Framework: Predefined attributes such as AssemblyVersion, which already exist and are accessed through the Runtime Classes; and custom attributes, which you write yourself by extending the System.Attribute class. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What are the Types of Assemblies? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;Assemblies are of two types:&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;1. Private Assemblies&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;2. Shared Assemblies&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;Private Assemblies: The assembly is intended only for one application. The files of that assembly must be placed in the same folder as the application or in a sub folder. No other application will be able to make a call to this assembly. The advantage of having a private assembly is that, it makes naming the assembly very easy, since the developer need not worry about name clashes with other assemblies. As long as the assembly has a unique name within the concerned application, there won't be any problems.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;Shared Assemblies: If the assembly is to be made into a Shared Assembly, then the naming conventions are very strict since it has to be unique across the entire system. The naming conventions should also take care of newer versions of the component being shipped. These are accomplished by giving the assembly a Shared Name. Then the assembly is placed in the global assembly cache, which is a folder in the file system reserved for shared assemblies. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What is an Intermediate language? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;Assemblies are made up of IL code modules and the metadata that describes them. Although programs may be compiled via an IDE or the command line, in fact, they are simply translated into IL, not machine code. The actual machine code is not generated until the function that requires it is called. This is the just-in-time, or JIT, compilation feature of .NET. JIT compilation happens at runtime for a variety of reasons, one of the most ambitious being Microsoft's desire for cross-platform .NET adoption. If a CLR is built for another operating system (UNIX or Mac), the same assemblies will run in addition to the Microsoft platforms. The hope is that .NET assemblies are write-once-run-anywhere applications. This is a .NET feature that works behind-the-scenes, ensuring that developers are not limited to writing applications for one single line of products. No one has demonstrated whether or not this promise will ever truly materialize. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;CTS/CLS &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;The MSIL Instruction Set Specification is included with the .NET SDK, along with the IL Assembly Language Programmers Reference. If a developer wants to write custom .NET programming languages, these are the necessary specifications and syntax. The CTS and CLS define the types and syntaxes that every .NET language needs to embrace. An application may not expose these features, but it must consider them when communicating through IL.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span class="answers"&gt;ASP.NET Authentication Providers and IIS Security &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;ASP.NET implements authentication using authentication providers, which are code modules that verify credentials and implement other security functionality such as cookie generation. ASP.NET supports the following three authentication providers: &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;Forms Authentication: Using this provider causes unauthenticated requests to be redirected to a specified HTML form using client side redirection. The user can then supply logon credentials, and post the form back to the server. If the application authenticates the request (using application-specific logic), ASP.NET issues a cookie that contains the credentials or a key for reacquiring the client identity. Subsequent requests are issued with the cookie in the request headers, which means that subsequent authentications are unnecessary. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;Passport Authentication: This is a centralized authentication service provided by Microsoft that offers a single logon facility and membership services for participating sites. ASP.NET, in conjunction with the Microsoft® Passport software development kit (SDK), provides similar functionality as Forms Authentication to Passport users. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;Windows Authentication: This provider utilizes the authentication capabilities of IIS. After IIS completes its authentication, ASP.NET uses the authenticated identity's token to authorize access. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;To enable a specified authentication provider for an ASP.NET application, you must create an entry in the application's configuration file as follows:&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;// web.config file &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What is the difference between ASP and ASP.NET? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;ASP is interpreted. ASP.NET Compiled event base programming.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;Control events for text button can be handled at client javascript only. Since we have server controls events can handle at server side.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;More error handling. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;ASP .NET has better language support, a large set of new controls and XML based components, and better user authentication. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;ASP .NET provides increased performance by running compiled code. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;ASP .NET code is not fully backward compatible with ASP. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;ASP .NET also contains a new set of object oriented input controls, like programmable list boxes, validation controls. A new data grid control supports sorting, data paging, and everything you expect from a dataset control. The first request for an ASP.NET page on the server will compile the ASP .NET code and keep a cached copy in memory. The result of this is greatly increased performance. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;ASP .NET is not fully compatible with earlier versions of ASP, so most of the old ASP code will need some changes to run under ASP .NET. To overcome this problem, &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;ASP .NET uses a new file extension ".aspx". This will make ASP .NET applications able to run side by side with standard ASP applications on the same server.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Using COM Component in .Net ?&lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;As most of you know that .Net does not encourage the development of COM components and provides a different solution to making reusable components through Assemblies. But, there are a lot of COM components present which our .Net application might need to use. Fortunately, .Net provides an extremely simple approach to achieve this. This is achieved by using ‘Wrapper Classes’ and ‘Proxy Components’. .Net wraps the COM component into .Net assembly technically called ‘Runtime Callable Wrapper’ or RCW. Then u can call and use your COM component just as a .Net (or C#, if u are using C#) Assembly. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What is an assembly? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;An assembly is the primary building block of a .NET Framework application. It is a collection of functionality that is built, versioned, and deployed as a single implementation unit (as one or more files). All managed types and resources are marked either as accessible only within their implementation unit, or as accessible by code outside that unit. .NET Assembly contains all the metadata about the modules, types, and other elements it contains in the form of a manifest. The CLR loves assemblies because differing programming languages are just perfect for creating certain kinds of applications. For example, COBOL stands for Common Business-Oriented Language because it’s tailor-made for creating business apps. However, it’s not much good for creating drafting programs. Regardless of what language you used to create your modules, they can all work together within one Portable Executable Assembly. There’s a hierarchy to the structure of .NET code. That hierarchy is Assembly - &gt; Module -&gt; Type -&gt; Method." Assemblies can be static or dynamic. Static assemblies can include .NET Framework types (interfaces and classes), as well as resources for the assembly (bitmaps, JPEG files, resource files, and so on). Static assemblies are stored on disk in portable executable (PE) files. You can also use the .NET Framework to create dynamic assemblies, which are run directly from memory and are not saved to disk before execution. You can save dynamic assemblies to disk after they have executed. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What is a Web Service? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;A web service is a software component that exposes itself through the open communication channels of the Internet. Applications running on remote machines, on potentially different platforms, can access these components in a language and platform-independent manner. A Web Service is a group of functions, packaged together for use in a common framework throughout a network. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;webFarm Vs webGardens &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;A web farm is a multi-server scenario. So we may have a server in each state of US. If the load on one server is in excess then the other servers step in to bear the brunt.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;How they bear it is based on various models.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;1. RoundRobin. (All servers share load equally)&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;2. NLB (economical)&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;3. HLB (expensive but can scale up to 8192 servers)&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;4. Hybrid (of 2 and 3).&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;5. CLB (Component load balancer).&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;A web garden is a multi-processor setup. i.e., a single server (not like the multi server above).&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;How to implement webfarms in .Net:&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;Go to web.config and Here for mode = you have 4 options.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;a) Say mode=inproc (non web farm but fast when you have very few customers).&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;b) Say mode=StateServer (for webfarm)&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;c) Say mode=SqlServer (for webfarm)&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;Whether to use option b or c depends on situation. StateServer is faster but SqlServer is more reliable and used for mission critical applications.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;How to use webgardens in .Net:&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;Go to web.config and Change the false to true. You have one more attribute that is related to webgarden in the same tag called cpuMask.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p&gt;&lt;span class="forquestionsblue"&gt;&lt;b&gt;What is the difference between a namespace and assembly name?&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;span class="answers"&gt;A namespace is a logical naming scheme for types in which a simple type name, such as MyType, is preceded with a dot-separated hierarchical name. Such a naming scheme is completely under control of the developer. For example, types MyCompany.FileAccess.A and MyCompany.FileAccess.B might be logically expected to have functionally related to file access. The .NET Framework uses a hierarchical naming scheme for grouping types into logical categories of related functionality, such as the ASP.NET application framework, or remoting functionality. Design tools can make use of namespaces to make it easier for developers to browse and reference types in their code. The concept of a namespace is not related to that of an assembly. A single assembly may contain types whose hierarchical names have different namespace roots, and a logical namespace root may span multiple assemblies. In the .NET Framework, a namespace is a logical design-time naming convenience, whereas an assembly establishes the name scope for types at run time. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What’s a Windows process? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;It’s an application that’s running and had been allocated memory. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What’s typical about a Windows process in regards to memory allocation? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;Each process is allocated its own block of available RAM space, no process can access another process’ code or data. If the process crashes, it dies alone without taking the entire OS or a bunch of other applications down. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Explain what relationship is between a Process, Application Domain, and Application? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;Each process is allocated its own block of available RAM space, no process can access another process’ code or data. If the process crashes, it dies alone without taking the entire OS or a bunch of other applications down. &lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;A process is an instance of a running application. An application is an executable on the hard drive or network. There can be numerous processes launched of the same application (5 copies of Word running), but 1 process can run just 1 application. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What are possible implementations of distributed applications in .NET? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;.NET Remoting and ASP.NET Web Services. If we talk about the Framework Class Library, noteworthy classes are in System.Runtime.Remoting and System.Web.Services. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What are the consideration in deciding to use .NET Remoting or ASP.NET Web Services? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;Remoting is a more efficient communication exchange when you can control both ends of the application involved in the communication process. Web Services provide an open-protocol-based exchange of information. Web Services are best when you need to communicate with an external organization or another (non-.NET) technology. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What’s a proxy of the server object in .NET Remoting? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;It’s a fake copy of the server object that resides on the client side and behaves as if it was the server. It handles the communication between real server object and the client object. This process is also known as marshaling.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What are remotable objects in .NET Remoting? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;Remotable objects are the objects that can be marshaled across the application domains. You can marshal by value, where a deep copy of the object is created and then passed to the receiver. You can also marshal by reference, where just a reference to an existing object is passed. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What are channels in .NET Remoting? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;Channels represent the objects that transfer the other serialized objects from one application domain to another and from one computer to another, as well as one process to another on the same box. A channel must exist before an object can be transferred. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What security measures exist for .NET Remoting in System.Runtime.Remoting? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;None. Security should be taken care of at the application level. Cryptography and other security techniques can be applied at application or server level. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What is a formatter? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;A formatter is an object that is responsible for encoding and serializing data into messages on one end, and deserializing and decoding messages into data on the other end. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Choosing between HTTP and TCP for protocols and Binary and SOAP for formatters, what are the trade-offs? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;Binary over TCP is the most effiecient, SOAP over HTTP is the most interoperable. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What’s SingleCall activation mode used for? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;If the server object is instantiated for responding to just one single request, the request should be made in SingleCall mode. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What’s Singleton activation mode? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;A single object is instantiated regardless of the number of clients accessing it. Lifetime of this object is determined by lifetime lease. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;How do you define the lease of the object? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;By implementing ILease interface when writing the class code.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span class="forquestionsblue"&gt;&lt;b&gt;Can you configure a .NET Remoting object via XML file? &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;Yes, via machine.config and application level .config file (or web.config in ASP.NET). Application-level XML settings take precedence over machine.config. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;How can you automatically generate interface for the remotable object in .NET with Microsoft tools? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;Use the Soapsuds tool. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What is Delegation? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;A delegate acts like a strongly type function pointer. Delegates can invoke the methods that they reference without making explicit calls to those methods.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;Delegate is an entity that is entrusted with the task of representation, assign or passing on information. In code sense, it means a Delegate is entrusted with a Method to report information back to it when a certain task (which the Method expects) is accomplished outside the Method's class.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span class="forquestionsblue"&gt;&lt;b&gt;What is "Microsoft Intermediate Language" (MSIL)?&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;span class="answers"&gt;A .NET programming language (C#, VB.NET, J# etc.) does not compile into executable code; instead it compiles into an intermediate code called Microsoft Intermediate Language (MSIL). As a programmer one need not worry about the syntax of MSIL - since our source code in automatically converted to MSIL. The MSIL code is then send to the CLR (Common Language Runtime) that converts the code to machine language, which is, then run on the host machine. MSIL is similar to Java Byte code. MSIL is the CPU-independent instruction set into which .NET Framework programs are compiled. It contains instructions for loading, storing, initializing, and calling methods on objects. Combined with metadata and the common type system, MSIL allows for true cross- language integration Prior to execution, MSIL is converted to machine code. It is not interpreted. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Differences between Datagrid, Datalist and Repeater? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;1. Datagrid has paging while Datalist doesnt.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;2. Datalist has a property called repeat. Direction = vertical/horizontal. (This is of great help in designing layouts). This is not there in Datagrid.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;3. A repeater is used when more intimate control over html generation is required.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;4. When only checkboxes/radiobuttons are repeatedly served then a checkboxlist or radiobuttonlist are used as they involve fewer overheads than a Datagrid.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;The Repeater repeats a chunk of HTML you write, it has the least functionality of the three. DataList is the next step up from a Repeater; accept you have very little control over the HTML that the control renders. DataList is the first of the three controls that allow you Repeat-Columns horizontally or vertically. Finally, the DataGrid is the motherload. However, instead of working on a row-by-row basis, you’re working on a column-by-column basis. DataGrid caters to sorting and has basic paging for your disposal. Again you have little contro, over the HTML. NOTE: DataList and DataGrid both render as HTML tables by default. Out of the 3 controls, I use the Repeater the most due to its flexibility w/ HTML. Creating a Pagination scheme isn't that hard, so I rarely if ever use a DataGrid.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;Occasionally I like using a DataList because it allows me to easily list out my records in rows of three for instance.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;I am constantly writing the drawing procedures with System.Drawing.Graphics, but having to use the try and dispose blocks is too time-consuming with Graphics objects. Can I automate this? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;Yes, the code&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;System.Drawing.Graphics canvas = new System.Drawing.Graphics();&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;try&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span class="answers"&gt;//some code&lt;/span&gt;&lt;br /&gt;}&lt;br /&gt;&lt;span class="answers"&gt;finally&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;canvas.Dispose();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;is functionally equivalent to&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;using (System.Drawing.Graphics canvas = new System.Drawing.Graphics())&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span class="answers"&gt;//some code&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;} //canvas.Dispose() gets called automatically&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;How do you trigger the Paint event in System.Drawing? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;Invalidate the current form, the OS will take care of repainting. The Update method forces the repaint. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;With these events, why wouldn’t Microsoft combine Invalidate and Paint, so that you wouldn’t have to tell it to repaint, and then to force it to repaint? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;Painting is the slowest thing the OS does, so usually telling it to repaint, but not forcing it allows for the process to take place in the background. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;How can you assign an RGB color to a System.Drawing.Color object? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;Call the static method FromArgb of this class and pass it the RGB values. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span class="forquestionsblue"&gt;&lt;b&gt;What class does Icon derive from? Isn’t it just a Bitmap with a wrapper name around it?&lt;/b&gt;&lt;/span&gt;&lt;b&gt; &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;No, Icon lives in System.Drawing namespace. It’s not a Bitmap by default, and is treated separately by .NET. However, you can use ToBitmap method to get a valid Bitmap object from a valid Icon object. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Before in my VB app I would just load the icons from DLL. How can I load the icons provided by .NET dynamically? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;By using System.Drawing.SystemIcons class, for example System.Drawing.SystemIcons.Warning produces an Icon with a warning sign in it. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;When displaying fonts, what’s the difference between pixels, points and ems? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;A pixel is the lowest-resolution dot the computer monitor supports. Its size depends on user’s settings and monitor size. A point is always 1/72 of an inch. An em is the number of pixels that it takes to display the letter M.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What is the difference between VB 6 and VB.NET? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;Answer1&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;VB&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;1,Object-based Language&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;2,Doesnot support Threading&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;3,Not powerful Exception handling mechanism&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;4,Doesnot having support for the console based applications&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;5,Cannot use more than one version of com objects in vb application called DLL error&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;6,Doesnot support for the Disconnected data source. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;VB.Net&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;1,Object-oriented Language&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;2,supports Threading&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;3,powerful Exception handling mechanism&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;4,having support for the console based applications&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;5,More than one version of dll is supported&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;6,supports the Disconnected data source by using Dataset class &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;Answer2&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;VB:&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;1. Object-based language&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;2. Does not support inheritance&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;3. ADO.Net does not give support for disconnected data architecture&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;4. No interoperability function&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;5. No support for threading&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;VB.Net&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;1. Object-Oriented Programming lanugage&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;2. ADO.Net gives support for disconnected data architecture&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;3. It provides interoperability&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;4. It uses managed code&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;5. supports threading&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;6. provides access to third-party controls like COM, DCOM&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;Answer2&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;1.The concept of the complete flow of execution of a program from start to finish: Visual Basic hides this aspect of programs from you, so that the only elements of a Visual Basic program you code are the event handlers and any methods in class modules. C# makes the complete program available to you as source code. The reason for this has to do with the fact that C# can be seen, philosophically, as next-generation C++. The roots of C++ go back to the 1960s and predate windowed user interfaces and sophisticated operating systems. C++ evolved as a low-level, closeto- the-machine, all-purpose language. To write GUI applications with C++ meant that you had to invoke the system calls to create and interact with the windowed forms. C# has been designed to build on this tradition while simplifying and modernizing C++, to combine the low-level performance benefits of C++ with the ease of coding in Visual Basic. Visual Basic, on the other hand, is designed specifically for rapid application development of Windows GUI applications. For this reason, in Visual Basic all the GUI boilerplate code is hidden, and all the Visual Basic programmer implements are the event handlers. In C# on the other hand, this boilerplate code is exposed as part of your source code.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;2. Classes and inheritance: C# is a genuine object-oriented language, unlike Visual Basic, requiring all code to be a part of a class. It also includes extensive support for implementation inheritance. Indeed, most well-designed C# programs will be very much designed around this form of inheritance, which is completely absent in Visual Basic.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p&gt;&lt;span class="forquestionsblue"&gt;&lt;b&gt;What are the authentication methods in .NET?&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;span class="answers"&gt;There are 4 types of authentications.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;1.WINDOWS AUTHENTICATION&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;2.FORMS AUTHENTICATION&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;3.PASSPORT AUTHENTICATION&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;4.NONE/CUSTOM AUTHENTICATION&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;The authentication option for the ASP.NET application is specified by using the tag in the Web.config file, as shown below: &lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;other authentication options &lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;1. WINDOWS AUTHENTICATION Schemes&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;I. Integrated Windows authentication&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;II. Basic and basic with SSL authentication&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;III. Digest authentication&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;IV. Client Certificate authentication&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;2. FORMS AUTHENTICATION&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;You, as a Web application developer, are supposed to develop the Web page and authenticate the user by checking the provided user ID and password against some user database &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;3.PASSPORT AUTHENTICATION&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;A centralized service provided by Microsoft, offers a single logon point for clients. Unauthenticated users are redirected to the Passport site &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;4 NONE/CUSTOM AUTHENTICATION:&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;If we don’t want ASP.NET to perform any authentication, we can set the authentication mode to “none”. The reason behind this decision could be: We don’t want to authenticate our users, and our Web site is open for all to use. We want to provide our own custom authentication &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What is Serialization in .NET? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;Anwer1&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;The serialization is the process of converting the objects into stream of bytes.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;they or used for transport the objects(via remoting) and persist objects(via files and databases) &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;Answer2&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;When developing smaller applications that do not have a database (or other formal storage mechanism) or data that doesn’t need to be stored in a database (such as the state of a web application), you often still would like to save the data for later retrieval. There are many ways to do this, but many of them are subject to a lot of extra code (work) and extra time spent debugging. With .NET, there is now an easy way to add this functionality to your code with only a few lines of easily tested code. This easy way is called serialization. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;Serialization is the process of storing an object, including all of its public and private fields, to a stream. Deserialization is the opposite – restoring an object’s field values from a stream. The stream is generally in the form of a FileStream, but does not have to be. It could be a memory stream or any other object that is of type IO.Stream. The format can be anything from XML to binary to SOAP. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What’s the use of System.Diagnostics.Process class? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;By using System.Diagnostics.Process class, we can provide access to the files which are presented in the local and remote system. &lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;Example: System.Diagnostics.Process(”c:\mlaks\example.txt”) — local file&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;System.Diagnostics.Process(”http://www.mlaks.com\example.txt”) — remote file&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What are the authentication methods in .NET?&lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;Abstract class: This class has abstract methods (no body). This class cannot be instantiated. One needs to provide the implementation of the methods by overriding them in the derived class. No Multiple Inheritance. &lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;Interfaces: Interface class contains all abstract methods which are public by default. All of these methods must be implemented in the derived class. One can inherit from from more than one interface thus provides for Multiple Inheritance. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;re-clarification of object based: &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;VB6 DOES support polymorphism and interface inheritance. It also supports the “Implements” keyword. What is not supported in vb6 is implementation inheritance. &lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;Also, from above, vb6 DOES “provides access to third-party controls like COM, DCOM ” That is not anything new in .NET. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;How to achieve Polymorphism in VB.Net? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;We can achieve polymarphism in .Net i.e Compile time polymarphism and Runtime polymarphism. Compiletime Polymarphism achieved by method overloading. Runtime polymarphism achieved by Early Binding or Late Binding. Provide the function pointer to the object at compile time called as Early Binding.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;provide the function pointer to the object at runtime called as Late Binding&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;class emp having the method display()&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;class dept having the method display()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;create objects as in the main function&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;// Early binding&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;dim obj as new emp&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;dim ob as new dept&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;obj.display()-to call the display method of emp class&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;ob.display-to call the display method of the dept class&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;// Late binding&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;create object in the main class as&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;object obj&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;obj=new emp&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;obj.display()-to call the display of emp class&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;obj=new dept&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;obj.display()-to call the display of dept class&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Difference between Class And Interface &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;Class is logical representation of object. It is collection of data and related sub procedures with defination.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;Interface is also a class containg methods which is not having any definations.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;Class does not support multiple inheritance. But interface can support.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What doesu mean by .NET framework? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;The .NET Framework is an environment for building, deploying, and running Web Services and other applications. It consists of three main parts: the Common Language Runtime, the Framework classes, and ASP.NET &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What is assembly? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;It is a single deployable unit that contains all the information abt the implimentation of classes , stuctures and interfaces &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What is namespaces? &lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;It is a logical group of related classes and interfaces and that can be used byany language targeting the .net framework.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span class="style15"&gt;&lt;u&gt;.NET framework programming interview questions &lt;/u&gt;&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;.NET framework overview&lt;/b&gt;&lt;br /&gt;&lt;span class="answers"&gt;1. Has own class libraries. System is the main namespace and all other namespaces are subsets of this.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;2. It has CLR(Common language runtime, Common type system, common language specification)&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;3. All the types are part of CTS and Object is the base class for all the types.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;4. If a language said to be .net complaint, it should be compatible with CTS and CLS.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;5. All the code compiled into an intermediate language by the .Net language compiler, which is nothing but an assembly.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;6. During runtime, JIT of CLR picks the IL code and converts into PE machine code and from there it processes the request.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;7. CTS, CLS, CLR&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;8. Garbage Collection&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;9. Dispose, finalize, suppress finalize, Idispose interface&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;10. Assemblies, Namespace: Assembly is a collection of class/namespaces. An assembly contains Manifest, Metadata, Resource files, IL code&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;11. Com interoperability, adding references, web references&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;12. Database connectivity and providers&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;Application Domain&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;1. Class modifiers: public, private, friend, protected, protected friend, mustinherit, NotInheritable&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;2. Method modifiers: public, private&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;3. Overridable&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;4. Shadows&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;5. Overloadable&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;6. Overrides&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;7. Overloads&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;8. Set/Get Property&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;9. IIF&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;10. Inheritance&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;11. Polymorphism&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;12. Delegates&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;13. Events&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;14. Reflection&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;15. Boxing&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;16. UnBoxing&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;ASP.Net&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;1. Web Controls: Data grid (templates, sorting, paging, bound columns, unbound columns, data binding), Data list, repeater controls&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;2. HTML Controls&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;3. Code behind pages, system.web.ui.page base class&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;4. Web.config: App settings, identity (impersonate), authentication (windows, forms, anonymous, passport), authorization&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;5. Databind.eval&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;6. Trace, Debug&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;7. Output cache&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;8. Session management&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;9. Application, Session&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;10. Global.asax httpapplication&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;11. User controls, custom controls, custom rendered controls (postback event, postdatachanged event) usercontrol is the base class&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;12. Directives&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;ADO.Net&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;1. Command object (ExecuteNonquery, ExecuteReader, ExecuteXMLReader, ExecuteScalar)&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;2. DataAdapter object (Fill)&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;3. Dataset (collection of tables)&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;4. CommandBuiler object&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;5. Transaction Object&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;6. Isolation levels&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5604931858474807762-2975981746688942797?l=dilipdeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dilipdeveloper.blogspot.com/feeds/2975981746688942797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5604931858474807762&amp;postID=2975981746688942797' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/2975981746688942797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/2975981746688942797'/><link rel='alternate' type='text/html' href='http://dilipdeveloper.blogspot.com/2008/07/dot-net-interview-quations.html' title='Dot Net Interview Quations'/><author><name>Dilip Kumar</name><uri>http://www.blogger.com/profile/04658649203656406985</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_8uCl_FKnlkM/SWSRjJIf1pI/AAAAAAAAAVk/vWVQ0S_05a0/S220/Picture+075.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5604931858474807762.post-1412705412862165705</id><published>2008-07-08T02:40:00.000-07:00</published><updated>2008-07-08T03:58:37.260-07:00</updated><title type='text'>How execute store procedure with C#.net</title><content type='html'>&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold; color: rgb(255, 0, 0);font-family:courier new;" &gt;Create store procedure in sql query analyser&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;CREATE PROCEDURE sp_chkadmin&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;@login_id varchar(50),&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;@password varchar(50)&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;as begin&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;select * from  where login_id = @login_id and password =@password&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;end&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;GO&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt; protected void butlogin_ServerClick1(object sender, EventArgs e)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;   {      &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;       string username = txtlogin.Value.ToString().Replace("'", "''");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;       string password = txtpassword.Value.ToString().Replace("'", "''");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;           int isUserExist=0;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;           isUserExist = IsUserExist(username, password);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;           if (isUserExist == 1)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;           {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;              Session["admin"] = username;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;               Response.Redirect("next.aspx");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;           }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;           else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;           {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;               lblhead.Text = "Please Enter Correct Username or Password !";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;               lblhead.Visible = true;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;           }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;       }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public int IsUserExist(string id,string pass)&lt;br /&gt; {&lt;br /&gt;     string CONN_STRING = System.Configuration.ConfigurationSettings.AppSettings["urlString"]&lt;br /&gt;                                                                .ToString();//"provider=sqloledb;server=aaa;uid=aa;pwd=aa;";&lt;br /&gt;     SqlConnection conn = new SqlConnection(CONN_STRING);&lt;br /&gt;     SqlCommand cmd = new SqlCommand();&lt;br /&gt;     SqlDataAdapter da = new SqlDataAdapter();&lt;br /&gt;     DataSet ds =new DataSet() ;&lt;br /&gt;&lt;br /&gt;     int iRows = 0;&lt;br /&gt;     try&lt;br /&gt;     {&lt;br /&gt;         cmd.Connection = conn;&lt;br /&gt;         if (conn.State == ConnectionState.Closed) conn.Open();&lt;br /&gt;         // conn.Open();&lt;br /&gt;         cmd.Parameters.Clear();&lt;br /&gt;&lt;br /&gt;         cmd.CommandType = CommandType.StoredProcedure;&lt;br /&gt;         cmd.CommandText = "sp_chkadmin";&lt;br /&gt;&lt;br /&gt;         cmd.Parameters.Add(new SqlParameter("@login_id", SqlDbType.VarChar));&lt;br /&gt;         cmd.Parameters["@login_id"].Value = id;&lt;br /&gt;&lt;br /&gt;         cmd.Parameters.Add(new SqlParameter("@password", SqlDbType.VarChar));&lt;br /&gt;         cmd.Parameters["@password"].Value = pass;&lt;br /&gt;&lt;br /&gt;         da.SelectCommand = cmd;&lt;br /&gt;         iRows = Convert.ToInt32(cmd.ExecuteScalar());&lt;br /&gt;     }&lt;br /&gt;     catch (Exception ex)&lt;br /&gt;     {&lt;br /&gt;&lt;br /&gt;     }&lt;br /&gt;     finally&lt;br /&gt;     {&lt;br /&gt;         if (conn.State == ConnectionState.Open) conn.Close();&lt;br /&gt;     }&lt;br /&gt;     return iRows;&lt;br /&gt; }        &lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5604931858474807762-1412705412862165705?l=dilipdeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dilipdeveloper.blogspot.com/feeds/1412705412862165705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5604931858474807762&amp;postID=1412705412862165705' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/1412705412862165705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5604931858474807762/posts/default/1412705412862165705'/><link rel='alternate' type='text/html' href='http://dilipdeveloper.blogspot.com/2008/07/how-execute-store-procedure-with-cnet.html' title='How execute store procedure with C#.net'/><author><name>Dilip Kumar</name><uri>http://www.blogger.com/profile/04658649203656406985</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_8uCl_FKnlkM/SWSRjJIf1pI/AAAAAAAAAVk/vWVQ0S_05a0/S220/Picture+075.jpg'/></author><thr:total>1</thr:total></entry></feed>
