<?xml version="1.0" encoding="UTF-8" standalone="no"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:georss="http://www.georss.org/georss" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-2606438956889056479</atom:id><lastBuildDate>Mon, 07 Oct 2024 03:46:54 +0000</lastBuildDate><category>Asp.Net</category><category>C# Dot Net</category><category>ADO.Net 3.0</category><category>ADO.Net</category><category>SQL</category><category>Script</category><category>Dot Net</category><category>OOPS</category><category>XML</category><category>XSLT</category><title>Asp DotNet  Way</title><description>DotNet Interview Questions and Answers, important dot net interview questions lists with faq asked in interviews and dot net experts answers.

Asp DotNet Way Covers ASP.NET 2.0, ASP.NET 3.5, jQuery, AJAX, Silverlight, .NET Interview Questions, C#, VB.NET, WinForms, Windows Forms, Sql Server and Technology News</description><link>http://aspdotnetway.blogspot.com/</link><managingEditor>noreply@blogger.com (Asp Dot Net Way)</managingEditor><generator>Blogger</generator><openSearch:totalResults>180</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:keywords>Interview,questions,asp,net,technical,interview,questions,Vb,Net,tough,questions,C,solutions</itunes:keywords><itunes:summary>Interview questions, asp.net technical interview questions, Vb.Net tough questions, C# solutions are available.</itunes:summary><itunes:subtitle>aspdotnetway</itunes:subtitle><itunes:category text="Education"><itunes:category text="Training"/></itunes:category><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2606438956889056479.post-2148219673213591308</guid><pubDate>Sat, 09 Jan 2010 21:23:00 +0000</pubDate><atom:updated>2010-01-09T13:23:58.401-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Asp.Net</category><title>Compare Datetime Objects</title><description>&lt;p&gt;Here i am going to share&lt;br /&gt;1) How to Compare two Datetime object ( here i am mentioning some ways to Compare Datetime Variables )&lt;br /&gt;2) How to get the timeSpan Values from the Hours and add hours to the Datetime its easy.&lt;br /&gt;&lt;/p&gt;It can be expressed as a date and time of day.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;It compares Date with time.&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;DateTime chkExpireDateTime = new DateTime(2009, 8, 1, 0, 0, 0);&lt;br /&gt;&lt;br /&gt;if (DateTime.Compare(DateTime.Now , chkExpireDateTime)&lt; 0)&lt;br /&gt;{&lt;br /&gt;// the Current Datetime.now is less than ChkExpireDateTime&lt;br /&gt;}&lt;br /&gt;else if (DateTime.Compare(DateTime.Now, chkExpireDateTime) &gt; 0)&lt;br /&gt;{&lt;br /&gt;// the Current Datetime.now is Greater than ChkExpireDateTime&lt;br /&gt;}&lt;br /&gt;else if (DateTime.Compare(DateTime.Now, DateTime.Now) == 0)&lt;br /&gt;{&lt;br /&gt;// the Current Datetime.now and ChkExpireDateTime are Equal&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;You can also Compare this way.&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;DateTime systemDate = DateTime.Now;&lt;br /&gt;DateTime compareDate = DateTime.Today.AddHours(11D);&lt;br /&gt;&lt;br /&gt;// less than&lt;br /&gt;if (compareDate &lt; systemDate)&lt;br /&gt;Console.WriteLine("Less Than");&lt;br /&gt;&lt;br /&gt;// equal to&lt;br /&gt;if (compareDate == systemDate)&lt;br /&gt;Console.WriteLine("Equal To");&lt;br /&gt;&lt;br /&gt;// greater than&lt;br /&gt;if (compareDate &gt; systemDate)&lt;br /&gt;Console.WriteLine("Greater Than");&lt;br /&gt;&lt;br /&gt;// basically you can compare it in all the normal ways&lt;br /&gt;// using !=, ==, , =, etc&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;The below code is used to get the Timespan for the for the hours and minutes given through the string.&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;string time = "02:10";&lt;br /&gt;string[] pieces = time.Split(new char[] { '.' },&lt;br /&gt;&lt;br /&gt;StringSplitOptions.RemoveEmptyEntries);&lt;br /&gt;TimeSpan difference2 = new TimeSpan(Convert.ToInt32(pieces[0]),&lt;br /&gt;&lt;br /&gt;Convert.ToInt32(pieces[1]), 0);&lt;br /&gt;double minutes2 = difference2.TotalMinutes; // 130&lt;br /&gt;double totalSeconds = difference2.TotalSeconds; // 7800&lt;br /&gt;&lt;br /&gt;// this will add the seconds to the Datetime&lt;br /&gt;&lt;br /&gt;DateTime getOutTime = new DateTime();&lt;br /&gt;getOutTime = DateTime.Now.AddHours(Convert.ToDouble (getHours ));&lt;br /&gt;getOutTime = DateTime.Now.AddSeconds(totalSeconds);</description><link>http://aspdotnetway.blogspot.com/2010/01/compare-datetime-objects.html</link><author>noreply@blogger.com (Asp Dot Net Way)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2606438956889056479.post-3323399782735605277</guid><pubDate>Sat, 09 Jan 2010 21:22:00 +0000</pubDate><atom:updated>2010-01-09T13:23:13.986-08:00</atom:updated><title>Generate 16 Digit Unique Number in CSharp</title><description>Now i am going ot discuss about how to &lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;Generate 16 digit Unique number&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;So ,&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;5 digit&lt;/strong&gt; Random using &lt;strong&gt;System.Random Class&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;5 digit&lt;/strong&gt; number by &lt;strong&gt;using TimeSpan&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;6 numbers&lt;/strong&gt; by &lt;strong&gt;System Time (HH:MM:SS)&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;This is the Code&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt; &lt;span style="color: rgb(12, 52, 61);"&gt;System.Random fiveRandom = new Random();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(12, 52, 61);"&gt; TimeSpan tsFive = new TimeSpan();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(12, 52, 61);"&gt; tsFive = DateTime .Now.Subtract (Convert.ToDateTime ("01/01/1900"));&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(12, 52, 61);"&gt; string rad = fiveRandom.Next(10000, 99999) +  tsFive.Days.ToString() +   System.DateTime.Now.Hour.ToString ("00") +          System.DateTime.Now.Minute.ToString ("00") +   System.DateTime.Now.Second.ToString ("00")  ;&lt;/span&gt;&lt;/strong&gt;</description><link>http://aspdotnetway.blogspot.com/2010/01/generate-16-digit-unique-number-in.html</link><author>noreply@blogger.com (Asp Dot Net Way)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2606438956889056479.post-7014087135487618893</guid><pubDate>Sat, 09 Jan 2010 21:21:00 +0000</pubDate><atom:updated>2010-01-09T13:21:57.270-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Asp.Net</category><title>Difference between TypeOf and GetType</title><description>Here I am going to discuss about the  -  Difference between typeof and GetType ? - typeof and GetType produce the exact same information. But the difference is where they get this information from:&lt;br /&gt;&lt;br /&gt;* typeof is used to get the type based on a class. That means if you use typeof with object, it will gives you error. You must pass class as parameter.&lt;br /&gt;* Where GetType is used to get the type based on an object (an instance of a class). Means GetType needs parameter of object rather than class name.&lt;br /&gt;&lt;br /&gt;You can understand more with example.&lt;br /&gt;&lt;br /&gt;The following code will output “True”:&lt;br /&gt;&lt;br /&gt;string instance = “”;&lt;br /&gt;&lt;br /&gt;Type type1 = typeof(string);&lt;br /&gt;&lt;br /&gt;Type type2 = instance.GetType();&lt;br /&gt;&lt;br /&gt;Console.WriteLine(type1 == type2);</description><link>http://aspdotnetway.blogspot.com/2010/01/difference-between-typeof-and-gettype.html</link><author>noreply@blogger.com (Asp Dot Net Way)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2606438956889056479.post-8452607054068314823</guid><pubDate>Sat, 09 Jan 2010 21:19:00 +0000</pubDate><atom:updated>2010-01-09T13:20:13.585-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Asp.Net</category><title>Extract the EmailID from the Text File</title><description>Here is the another article ie: which is going to find the emailID on the Text File and assign to a string.&lt;br /&gt;&lt;br /&gt;Here i have the Textfile ie: Notepad File on the Server folder.&lt;br /&gt;&lt;br /&gt;in the notepad file i have some content and emailID too, so i want to get the EmailID from the file so i have to send email to that user.&lt;br /&gt;&lt;br /&gt;For this i am using REGEX so its easy to find the emailID on the text file and add or store it on arrays.&lt;br /&gt;&lt;br /&gt;Here i am using the Two Method both are using REGEX pattern.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here you go.. I tested - its working fine.&lt;br /&gt;&lt;br /&gt;First Method:&lt;br /&gt;&lt;br /&gt;using System.Text.RegularExpressions;&lt;br /&gt;using System.IO;&lt;br /&gt;&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;//the file is in the root - you may need to change it&lt;br /&gt;string filePath = MapPath("~") + "/EmailText.txt";&lt;br /&gt;&lt;br /&gt;using (StreamReader sr = new StreamReader( filePath) )&lt;br /&gt;{&lt;br /&gt;string content = sr.ReadToEnd();&lt;br /&gt;if (content.Length &gt; 0)&lt;br /&gt;{&lt;br /&gt;//this pattern is taken from Asp.Net regular expression validators library&lt;br /&gt;string pattern = @"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*";&lt;br /&gt;MatchCollection mc = Regex.Matches(content, pattern);&lt;br /&gt;for (int i = 0; i &lt; mc.Count; i++)&lt;br /&gt;{&lt;br /&gt;//here am just printing it.. You can send mails to mc[i].Value in thsi loop&lt;br /&gt;Response.Write(mc[i].Value + "&lt;br /&gt;");&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;catch (Exception ee)&lt;br /&gt;{&lt;br /&gt;Response.Write(ee.Message);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Second Method:&lt;br /&gt;&lt;br /&gt;string pattern = @"[a-z0-9!#$%&amp;'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&amp;'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?";&lt;br /&gt;&lt;br /&gt;System.Text.RegularExpressions.Regex reg = new System.Text.RegularExpressions.Regex(pattern);&lt;br /&gt;&lt;br /&gt;//Read file&lt;br /&gt;string sFileContents =System.IO.File.ReadAllText(Server.MapPath("Email.txt"));&lt;br /&gt;&lt;br /&gt;System.Text.RegularExpressions.MatchCollection mc = reg.Matches(sFileContents);&lt;br /&gt;&lt;br /&gt;//string array for stroing&lt;br /&gt;System.Collections.Generic.List str = new System.Collections.Generic.List();foreach (System.Text.RegularExpressions.Match m in mc)&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;str.Add(m.Value);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;OUTPUT&lt;br /&gt;&lt;br /&gt;input file&lt;br /&gt;----------&lt;br /&gt;&lt;br /&gt;jeevan@test.comjeevan@test.com This e-mail address is being protected from spambots. You need JavaScript enabled to view it ,&lt;br /&gt;&lt;br /&gt;Welcome yo Hyderabadtechies.info&lt;br /&gt;test@test.comtest@test.com This e-mail address is being protected from spambots. You need JavaScript enabled to view it ,&lt;br /&gt;its really cool....&lt;br /&gt;&lt;br /&gt;Chandrasekarthotta@gmail.comChandrasekarthotta@gmail.com This e-mail address is being protected from spambots. You need JavaScript enabled to view it&lt;br /&gt;&lt;br /&gt;sdf&lt;br /&gt;&lt;br /&gt;sdfs&lt;br /&gt;&lt;br /&gt;dfsd&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;output :&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;jeevan@test.comjeevan@test.com This e-mail address is being protected from spambots. You need JavaScript enabled to view it , test@test.comtest@test.com This e-mail address is being protected from spambots. You need JavaScript enabled to view it , Chandrasekarthotta@gmail.comChandrasekarthotta@gmail.com</description><link>http://aspdotnetway.blogspot.com/2010/01/extract-emailid-from-text-file.html</link><author>noreply@blogger.com (Asp Dot Net Way)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2606438956889056479.post-7042541538743431765</guid><pubDate>Sat, 09 Jan 2010 20:57:00 +0000</pubDate><atom:updated>2010-01-09T13:17:53.522-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Asp.Net</category><title>ASP.NET Performance Tips</title><description>Performance Improving Methods( From YSlow)&lt;br /&gt;1. Make fewer HTTP requests&lt;br /&gt;Decreasing the number of components on a page reduces the number of HTTP requests required to render the page, resulting in faster page loads. Some ways to reduce the number of components include: combine files, combine multiple scripts into one script, combine multiple CSS files into one style sheet, and use CSS Sprites and image maps.&lt;br /&gt;&lt;br /&gt;2. Content Delivery Network (CDN)&lt;br /&gt;User proximity to web servers impacts response times. Deploying content across multiple geographically dispersed servers helps users perceive that pages are loading faster.&lt;br /&gt;&lt;br /&gt;3. Add Expires headers&lt;br /&gt;Web pages are becoming increasingly complex with more scripts, style sheets, images, and Flash on them. A first-time visit to a page may require several HTTP requests to load all the components. By using Expires headers these components become cacheable, which avoids unnecessary HTTP requests on subsequent page views. Expires headers are most often associated with images, but they can and should be used on all page components including scripts, style sheets, and Flash.&lt;br /&gt;&lt;br /&gt;4. Compress components with gzip&lt;br /&gt;Compression reduces response times by reducing the size of the HTTP response. Gzip is the most popular and effective compression method currently available and generally reduces the response size by about 70%. Approximately 90% of today's Internet traffic travels through browsers that claim to support gzip.&lt;br /&gt;&lt;br /&gt;5. Grade A on Put CSS at top&lt;br /&gt;Moving style sheets to the document HEAD element helps pages appear to load quicker since this allows pages to render progressively.&lt;br /&gt;&lt;br /&gt;6. Put JavaScript at bottom&lt;br /&gt;JavaScript scripts block parallel downloads; that is, when a script is downloading, the browser will not start any other downloads. To help the page load faster, move scripts to the bottom of the page if they are deferrable.&lt;br /&gt;&lt;br /&gt;7. Avoid CSS expressions&lt;br /&gt;CSS expressions (supported in IE beginning with Version 5) are a powerful, and dangerous, way to dynamically set CSS properties. These expressions are evaluated frequently: when the page is rendered and resized, when the page is scrolled, and even when the user moves the mouse over the page. These frequent evaluations degrade the user experience.&lt;br /&gt;&lt;br /&gt;8. Make JavaScript and CSS external&lt;br /&gt;Using external JavaScript and CSS files generally produces faster pages because the files are cached by the browser. JavaScript and CSS that are inlined in HTML documents get downloaded each time the HTML document is requested. This reduces the number of HTTP requests but increases the HTML document size. On the other hand, if the JavaScript and CSS are in external files cached by the browser, the HTML document size is reduced without increasing the number of HTTP requests.&lt;br /&gt;&lt;br /&gt;9. Reduce DNS lookups&lt;br /&gt;The Domain Name System (DNS) maps hostnames to IP addresses, just like phonebooks map people's names to their phone numbers. When you type URL www.yahoo.com into the browser, the browser contacts a DNS resolver that returns the server's IP address. DNS has a cost; typically it takes 20 to 120 milliseconds for it to look up the IP address for a hostname. The browser cannot download anything from the host until the lookup completes.&lt;br /&gt;&lt;br /&gt;10. Minify JavaScript and CSS&lt;br /&gt;Minification removes unnecessary characters from a file to reduce its size, thereby improving load times. When a file is minified, comments and unneeded white space characters (space, newline, and tab) are removed. This improves response time since the size of the download files is reduced.&lt;br /&gt;&lt;br /&gt;11. Avoid URL redirects&lt;br /&gt;URL redirects are made using HTTP status codes 301 and 302. They tell the browser to go to another location. Inserting a redirect between the user and the final HTML document delays everything on the page since nothing on the page can be rendered and no components can be downloaded until the HTML document arrives.&lt;br /&gt;&lt;br /&gt;12.Remove duplicate JavaScript and CSS&lt;br /&gt;Duplicate JavaScript and CSS files hurt performance by creating unnecessary HTTP requests (IE only) and wasted JavaScript execution (IE and Firefox). In IE, if an external script is included twice and is not cacheable, it generates two HTTP requests during page loading. Even if the script is cacheable, extra HTTP requests occur when the user reloads the page. In both IE and Firefox, duplicate JavaScript scripts cause wasted time evaluating the same scripts more than once. This redundant script execution happens regardless of whether the script is cacheable.&lt;br /&gt;&lt;br /&gt;12. Configure entity tags (ETags)&lt;br /&gt;Entity tags (ETags) are a mechanism web servers and the browser use to determine whether a component in the browser's cache matches one on the origin server. Since ETags are typically constructed using attributes that make them unique to a specific server hosting a site, the tags will not match when a browser gets the original component from one server and later tries to validate that component on a different server.&lt;br /&gt;&lt;br /&gt;13. Make AJAX cacheable&lt;br /&gt;One of AJAX's benefits is it provides instantaneous feedback to the user because it requests information asynchronously from the backend web server. However, using AJAX does not guarantee the user will not wait for the asynchronous JavaScript and XML responses to return. Optimizing AJAX responses is important to improve performance, and making the responses cacheable is the best way to optimize them.&lt;br /&gt;&lt;br /&gt;14. GET for AJAX requests&lt;br /&gt;When using the XMLHttpRequest object, the browser implements POST in two steps: (1) send the headers, and (2) send the data. It is better to use GET instead of POST since GET sends the headers and the data together (unless there are many cookies). IE's maximum URL length is 2 KB, so if you are sending more than this amount of data you may not be able to use GET.&lt;br /&gt;&lt;br /&gt;15. Reduce the number of DOM elements&lt;br /&gt;&lt;br /&gt;A complex page means more bytes to download, and it also means slower DOM access in JavaScript. Reduce the number of DOM elements on the page to improve performance.&lt;br /&gt;16. Avoid HTTP 404 (Not Found) error&lt;br /&gt;Making an HTTP request and receiving a 404 (Not Found) error is expensive and degrades the user experience. Some sites have helpful 404 messages (for example, "Did you mean ...?"), which may assist the user, but server resources are still wasted.&lt;br /&gt;&lt;br /&gt;17. Reduce cookie size&lt;br /&gt;HTTP cookies are used for authentication, personalization, and other purposes. Cookie information is exchanged in the HTTP headers between web servers and the browser, so keeping the cookie size small minimizes the impact on response time.&lt;br /&gt;&lt;br /&gt;18. Use cookie-free domains&lt;br /&gt;When the browser requests a static image and sends cookies with the request, the server ignores the cookies. These cookies are unnecessary network traffic. To workaround this problem, make sure that static components are requested with cookie-free requests by creating a subdomain and hosting them there.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;19. Avoid AlphaImageLoader filter&lt;br /&gt;The IE-proprietary AlphaImageLoader filter attempts to fix a problem with semi-transparent true color PNG files in IE versions less than Version 7. However, this filter blocks rendering and freezes the browser while the image is being downloaded. Additionally, it increases memory consumption. The problem is further multiplied because it is applied per element, not per image.&lt;br /&gt;&lt;br /&gt;20. Do not scale images in HTML&lt;br /&gt;Web page designers sometimes set image dimensions by using the width and height attributes of the HTML image element. Avoid doing this since it can result in images being larger than needed. For example, if your page requires image myimg.jpg which has dimensions 240x720 but displays it with dimensions 120x360 using the width and height attributes, then the browser will download an image that is larger than necessary.&lt;br /&gt;&lt;br /&gt;21. Make favicon small and cacheable&lt;br /&gt;A favicon is an icon associated with a web page; this icon resides in the favicon.ico file in the server's root. Since the browser requests this file, it needs to be present; if it is missing, the browser returns a 404 error (see "Avoid HTTP 404 (Not Found) error" above). Since favicon.ico resides in the server's root, each time the browser requests this file, the cookies for the server's root are sent. Making the favicon small and reducing the cookie size for the server's root cookies improves performance for retrieving the favicon. Making favicon.ico cacheable avoids frequent requests for it.</description><link>http://aspdotnetway.blogspot.com/2010/01/aspnet-performance-tips.html</link><author>noreply@blogger.com (Asp Dot Net Way)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2606438956889056479.post-963452137469812854</guid><pubDate>Sat, 09 Jan 2010 20:54:00 +0000</pubDate><atom:updated>2010-01-09T12:57:25.620-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">OOPS</category><title>what is overloading and overriding with example?</title><description>Overloading means two methods have the same method name and &lt;br /&gt;different argument list.&lt;br /&gt;&lt;br /&gt;For example, take the case of a Shape Class where you have &lt;br /&gt;a method with the name DrawShape();&lt;br /&gt;This method has two definitins with different parameters.&lt;br /&gt;&lt;br /&gt;1. public void DrawShape(int x1, int y1,int x2,int y2)&lt;br /&gt;{&lt;br /&gt;// draw a rectangle.&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;2. public void DrawShape(int x1,int y1)&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;// draw aline.&lt;br /&gt;}&lt;br /&gt;overriding means i have a super class and sub class,sub &lt;br /&gt;class extends the super class.Two classes containg the same &lt;br /&gt;method name and same arguments sub class overides the super &lt;br /&gt;class method ,this is nothing but method overriding&lt;br /&gt;for example&lt;br /&gt;Class Rectangle&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;publc void DrawRectangle()&lt;br /&gt;{&lt;br /&gt;// this method will draw a rectangle.&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Class RoundRectangle : Rectanlge&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;public void DrawRectangle()&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;//Here the DrawRectangle() method is overridden in the&lt;br /&gt;// derived class to draw a specific implementation to the&lt;br /&gt;//derived class, i.e to draw a rectangle with rounded &lt;br /&gt;corner.&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;}</description><link>http://aspdotnetway.blogspot.com/2010/01/what-is-overloading-and-overriding-with.html</link><author>noreply@blogger.com (Asp Dot Net Way)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2606438956889056479.post-8886672832152920532</guid><pubDate>Tue, 13 Oct 2009 04:56:00 +0000</pubDate><atom:updated>2009-10-12T22:00:05.642-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Asp.Net</category><title>How to download file from a link control?</title><description>string filename="myResume.doc";if (filename != "")&lt;br /&gt;{          &lt;br /&gt;string path = Server.MapPath(filename);         &lt;br /&gt;System.IO.FileInfo file = new System.IO.FileInfo(path);          &lt;br /&gt;if (file.Exists)          &lt;br /&gt;{                   &lt;br /&gt;Response.Clear();                   &lt;br /&gt;Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name);                   &lt;br /&gt;Response.AddHeader("Content-Length", file.Length.ToString());          Response.ContentType = "application/octet-stream";                   Response.WriteFile(file.FullName); &lt;br /&gt;Response.End();          &lt;br /&gt;}      &lt;br /&gt;   &lt;br /&gt;else   &lt;br /&gt;{                  &lt;br /&gt; Response.Write("This file does not exist.");         &lt;br /&gt; }}</description><link>http://aspdotnetway.blogspot.com/2009/10/how-to-download-file-from-link-control.html</link><author>noreply@blogger.com (Asp Dot Net Way)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2606438956889056479.post-2000804677687796247</guid><pubDate>Mon, 21 Sep 2009 09:34:00 +0000</pubDate><atom:updated>2009-09-21T02:34:00.770-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ADO.Net 3.0</category><title>.Net Framework 3.0 FAQ</title><description>What is an operation contract?&lt;br /&gt;An operation contract defines the parameters and return type of an operation. When creating an interface that defines the service contract, you signify an operation contract by applying the OperationContractAttribute attribute to each method definition that is part of the contract. The operations can be modeled as taking a single message and returning a single message, or as taking a set of types and returning a type. In the latter case, the system will determine the format for the messages that need to be exchanged for that operation.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is a message contract?&lt;br /&gt;A message contact describes the format of a message. For example, it declares whether message elements should go in headers versus the body, what level of security should be applied to what elements of the message, and so on.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is a fault contract?&lt;br /&gt;A fault contract can be associated with a service operation to denote errors that can be returned to the caller. An operation can have zero or more faults associated with it. These errors are SOAP faults that are modeled as exceptions in the programming model.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In Terms of WCF, what do you understand by metadata of a service&lt;br /&gt;The metadata of a service describes the characteristics of the service that an external entity needs to understand to communicate with the service. Metadata can be consumed by the Service Model Metadata Utility Tool ( Svcutil.exe) to generate a WCF client and accompanying configuration that a client application can use to interact with the service.&lt;br /&gt;&lt;br /&gt;The metadata exposed by the service includes XML schema documents, which define the data contract of the service, and WSDL documents, which describe the methods of the service.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is password fatigue?&lt;br /&gt;As the use of internet increases, as increases the danger of online identity theft, fraud, and privacy. Users must track a growing number of accounts and passwords. This burden results in "password fatigue," and that results in less secure practices, such as reusing the same account names and passwords at many sites.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What are activities in WWF?&lt;br /&gt;Activities are the elemental unit of a workflow. They are added to a workflow programmatically in a manner similar to adding XML DOM child nodes to a root node. When all the activities in a given flow path are finished running, the workflow instance is completed.&lt;br /&gt;&lt;br /&gt;An activity can perform a single action, such as writing a value to a database, or it can be a composite activity and consist of a set of activities. Activities have two types of behavior: runtime and design time. The runtime behavior specifies the actions upon execution. The design time behavior controls the appearance of the activity and its interaction while being displayed within the designer.</description><link>http://aspdotnetway.blogspot.com/2009/09/net-framework-30-faq_2386.html</link><author>noreply@blogger.com (Asp Dot Net Way)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2606438956889056479.post-1562716245224776249</guid><pubDate>Mon, 21 Sep 2009 09:33:00 +0000</pubDate><atom:updated>2009-09-21T02:33:00.549-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ADO.Net 3.0</category><title>.Net Framework 3.0 FAQ</title><description>What is a service contract ( In WCF) ?&lt;br /&gt;In every service oriented architecture, services share schemas and contracts, not classes and types. What this means is that you don't share class definitions neither any implementation details about your service to consumers.&lt;br /&gt;&lt;br /&gt;Everything your consumer has to know is your service interface, and how to talk to it. In order to know this, both parts (service and consumer) have to share something that is called a Contract.&lt;br /&gt;&lt;br /&gt;In WCF, there are 3 kinds of contracts: Service Contract, Data Contract and Message Contract.&lt;br /&gt;&lt;br /&gt;A Service Contract describes what the service can do. It defines some properties about the service, and a set of actions called Operation Contracts. Operation Contracts are equivalent to web methods in ASMX technology&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In terms of WCF, What is a message?&lt;br /&gt;A message is a self-contained unit of data that may consist of several parts, including a body and headers.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In terms of WCF, What is a service?&lt;br /&gt;A service is a construct that exposes one or more endpoints, with each endpoint exposing one or more service operations.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In terms of WCF, What is an endpoint?&lt;br /&gt;An endpoint is a construct at which messages are sent or received (or both). It comprises a location (an address) that defines where messages can be sent, a specification of the communication mechanism (a binding) that described how messages should be sent, and a definition for a set of messages that can be sent or received (or both) at that location (a service contract) that describes what message can be sent.&lt;br /&gt;&lt;br /&gt;An WCF service is exposed to the world as a collection of endpoints.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In terms of WCF, What is an application endpoint?&lt;br /&gt;An endpoint exposed by the application and that corresponds to a service contract implemented by the application.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In terms of WCF, What is an infrastructure endpoint?&lt;br /&gt;An endpoint that is exposed by the infrastructure to facilitate functionality that is needed or provided by the service that does not relate to a service contract. For example, a service might have an infrastructure endpoint that provides metadata information.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In terms of WCF, What is an address?&lt;br /&gt;An address specifies the location where messages are received. It is specified as a Uniform Resource Identifier (URI). The schema part of the URI names the transport mechanism to be used to reach the address, such as "HTTP" and "TCP", and the hierarchical part of the URI contains a unique location whose format is dependent on the transport mechanism.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In terms of WCF, What is binding?&lt;br /&gt;A binding defines how an endpoint communicates to the world. It is constructed of a set of components called binding elements that "stack" one on top of the other to create the communication infrastructure. At the very least, a binding defines the transport (such as HTTP or TCP) and the encoding being used (such as text or binary). A binding can contain binding elements that specify details like the security mechanisms used to secure messages, or the message pattern used by an endpoint.</description><link>http://aspdotnetway.blogspot.com/2009/09/net-framework-30-faq_21.html</link><author>noreply@blogger.com (Asp Dot Net Way)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2606438956889056479.post-2608889794898579844</guid><pubDate>Sun, 20 Sep 2009 09:30:00 +0000</pubDate><atom:updated>2009-09-20T02:30:00.212-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ADO.Net 3.0</category><title>.Net Framework 3.0 FAQ</title><description>What is XAML ?&lt;br /&gt;WPF relies on the eXtensible Application Markup Language (XAML). An XML-based language, XAML allows specifying a user interface declaratively rather than in code. This makes it much easier for user interface design tools like MS Expression Blend to generate and work with an interface specification based on the visual representation created by a designer. Designers will be able to use such tools to create the look of an interface and then have a XAML definition of that interface generated for them. The developer imports this definition into Visual Studio, then creates the logic the interface requires.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is XBAP?&lt;br /&gt;XAML browser application (XBAP) can be used to create a remote client that runs inside a Web browser. Built on the same foundation as a stand-alone WPF application, an XBAP allows presenting the same style of user interface within a downloadable browser application. The best part is that the same code can potentially be used for both kinds of applications, which means that developers no longer need different skill sets for desktop and browser clients. The downloaded XBAP from the internet runs in a secure sandbox (like Java applets), and thus it limits what the downloaded application can do.</description><link>http://aspdotnetway.blogspot.com/2009/09/net-framework-30-faq_5032.html</link><author>noreply@blogger.com (Asp Dot Net Way)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2606438956889056479.post-7682812953166229146</guid><pubDate>Sun, 20 Sep 2009 09:29:00 +0000</pubDate><atom:updated>2009-09-20T02:29:00.113-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ADO.Net 3.0</category><title>.Net Framework 3.0 FAQ</title><description>What contemporary computing problems WCS solves?&lt;br /&gt;WCS provides an entirely new approach to managing digital identities. It helps people keep track of their digital identities as distinct information cards. If a web Site accepts WCS logins, users attempting to log in to that site will see a WCS selection. By choosing a card, users also choose a digital identity that will be used to access this site. Rather than remembering a plethora of usernames and passwords, users need only recognize the card they wish to use. The identities represented by these cards are created by one or more identity providers. These identities will typically use stronger cryptographic mechanisms to allow users to prove their identity. With this provider, users can create their own identities that don't rely on passwords for authentication.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What contemporary computing problems WPF solves?&lt;br /&gt;&lt;br /&gt;user interface&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;needs to display video, run animations, use 2/3D graphics, and work with different document formats. So far, all of these aspects of the user interface have been provided in different ways on Windows. For example, a developer needs to use Windows Forms to build a Windows GUI, or HTML/ASPX/Applets/JavaScript etc. to build a web interface, Windows Media Player or software such as Adobe's Flash Player for displaying video etc. The challenge for developers is to build a coherent user interface for different kinds of clients using diverse technologies isn't a simple job.&lt;br /&gt;&lt;br /&gt;A primary goal of WPF is to address this challenge! By offering a consistent platform for these entire user interface aspects, WPF makes life simpler for developers. By providing a common foundation for desktop clients and browser clients, WPF makes it easier to build applications.</description><link>http://aspdotnetway.blogspot.com/2009/09/net-framework-30-faq_9069.html</link><author>noreply@blogger.com (Asp Dot Net Way)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2606438956889056479.post-2547826880969930547</guid><pubDate>Sun, 20 Sep 2009 09:28:00 +0000</pubDate><atom:updated>2009-09-20T02:29:01.739-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ADO.Net 3.0</category><title>.Net Framework 3.0 FAQ</title><description>What Improvements does WCF offers over its earlier counterparts?&lt;br /&gt;A lot of communication approaches exist in the .NET Framework 2.0 such as ASP.NET Web Services, .NET Remoting, System.Messaging supporting queued messaging through MSMQ, Web Services Enhancements (WSE) - an extension to ASP.NET Web Services that supports WS-Security etc. However, instead of requiring developers to use a different technology with a different application programming interface for each kind of communication, WCF provides a common approach and API.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What are WCF features and what communication problems it solves?&lt;br /&gt;WCF provides strong support for interoperable communication through SOAP. This includes support for several specifications, including WS-Security, WS-ReliableMessaging, and WS-AtomicTransaction. WCF doesn't itself require SOAP, so other approaches can also be used, including optimized binary protocol and queued messaging using MSMQ. WCF also takes an explicit service-oriented approach to communication, and loosens some of the tight couplings that can exist in distributed object systems, making interaction less error-prone and easier to change. Thus, WCF addresses a range of communication problems for applications. Three of its most important aspects that clearly stand out are:&lt;br /&gt;&lt;br /&gt;Unification of Microsoft's communication technologies.&lt;br /&gt;Support for cross-vendor interoperability, including reliability, security, and transactions.&lt;br /&gt;Rich support for service orientation development.</description><link>http://aspdotnetway.blogspot.com/2009/09/net-framework-30-faq_2248.html</link><author>noreply@blogger.com (Asp Dot Net Way)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2606438956889056479.post-4912090258568952415</guid><pubDate>Sun, 20 Sep 2009 09:28:00 +0000</pubDate><atom:updated>2009-09-20T02:28:00.607-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ADO.Net 3.0</category><title>.Net Framework 3.0 FAQ</title><description>System Requirements for Installing .NET Framework 3.0&lt;br /&gt;Processor &lt;br /&gt;Minimum: 400 megahertz (MHz) Pentium processor&lt;br /&gt;Recommended: 1 gigahertz (GHz) Pentium processor&lt;br /&gt;&lt;br /&gt;Operating System &lt;br /&gt;.NET Framework 3.0 can be installed on any of the following systems:&lt;br /&gt;Microsoft Windows 2003 Server Service Pack 1 (SP1)&lt;br /&gt;Windows XP SP2&lt;br /&gt;Windows Vista *&lt;br /&gt;&lt;br /&gt;*Windows Vista comes with .NET Framework 3.0. There is no separate installation package required. The standalone .NET Framework 3.0 packages are not supported on Vista.&lt;br /&gt;&lt;br /&gt;RAM &lt;br /&gt;Minimum: 96 megabytes (MB)&lt;br /&gt;Recommended:256 MB&lt;br /&gt;&lt;br /&gt;Hard Disk &lt;br /&gt;Up to 500 MB of available space may be required.&lt;br /&gt;CD or DVD Drive Not required.&lt;br /&gt;&lt;br /&gt;Display Minimum: 800 x 600, 256 colors&lt;br /&gt;Recommended:1024 x 768 high color, 32-bit&lt;br /&gt;&lt;br /&gt;Mouse Not required</description><link>http://aspdotnetway.blogspot.com/2009/09/net-framework-30-faq_20.html</link><author>noreply@blogger.com (Asp Dot Net Way)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2606438956889056479.post-3886132264380754735</guid><pubDate>Sat, 19 Sep 2009 09:21:00 +0000</pubDate><atom:updated>2009-09-19T02:21:00.091-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ADO.Net 3.0</category><title>.Net Framework 3.0 FAQ</title><description>What happens to the WinFX technologies?&lt;br /&gt;The WinFX technologies will now be released under the name .NET Framework 3.0. There are no changes to the WinFX technologies or ship schedule — the same technologies you're familiar with now simply have a new name.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is the .NET Framework 3.0 (formerly WinFX)?&lt;br /&gt;The .NET Framework 3.0 is Microsoft's managed code programming model. It is a superset of the .NET Framework 2.0, combining .NET Framework 2.0 components with new technologies for building applications that have visually stunning user experiences, seamless and secure communication, and the ability to model a range of business processes. In addition to the .NET Framework 2.0, it includes Windows Presentation Foundation (WPF), Windows Workflow Foundation (WF), Windows Communication Foundation (WCF), and Windows CardSpace.</description><link>http://aspdotnetway.blogspot.com/2009/09/net-framework-30-faq_6629.html</link><author>noreply@blogger.com (Asp Dot Net Way)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2606438956889056479.post-7779901379582795181</guid><pubDate>Sat, 19 Sep 2009 09:20:00 +0000</pubDate><atom:updated>2009-09-19T02:20:00.562-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ADO.Net 3.0</category><title>.Net Framework 3.0 FAQ</title><description>Will the name change be reflected in any of the existing .NET Framework 2.0 APIs, assemblies, or namespaces?&lt;br /&gt;There will be no changes to any of the existing .NET Framework 2.0 APIs, assemblies, or namespaces. The applications that you've built on .NET Framework 2.0 will continue to run on the .NET Framework 3.0 just as they have before.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How does the .NET Framework 3.0 relate to the .NET Framework 2.0?&lt;br /&gt;The .NET Framework 3.0 is an additive release to the .NET Framework 2.0. The .NET Framework 3.0 adds four new technologies to the .NET Framework 2.0: Windows Presentation Foundation (WPF), Windows Workflow Foundation (WF), Windows Communication Foundation (WCF), and Windows CardSpace. There are no changes to the version of the .NET Framework 2.0 components included in the .NET Framework 3.0. This means that the millions of developers who use .NET today can use the skills they already have to start building .NET Framework 3.0 applications. It also means that applications that run on the .NET Framework 2.0 today will continue to run on the .NET Framework 3.0.</description><link>http://aspdotnetway.blogspot.com/2009/09/net-framework-30-faq_1571.html</link><author>noreply@blogger.com (Asp Dot Net Way)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2606438956889056479.post-2626892846212257374</guid><pubDate>Sat, 19 Sep 2009 09:18:00 +0000</pubDate><atom:updated>2009-09-19T02:18:00.322-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ADO.Net 3.0</category><title>.Net Framework 3.0 FAQ</title><description>&lt;p&gt;Why is the .NET Framework 3.0 a major version number of the .NET Framework if it uses the .NET Framework 2.0 runtime a Compiler ?&lt;/p&gt;&lt;p&gt;The new technologies delivered in the .NET Framework 3.0, including WCF, WF, WPF, and CardSpace, offer tremendous functionality and innovation, and we wanted to signal that with a major release number.Which version of the Common Language Runtime (CLR) does the .NET Framework 3.0 use?The .NET Framework 3.0 uses the 2.0 version of the CLR. With this release, the overall developer platform version has been decoupled from the core CLR engine version. We expect the lower level components of the .NET Framework such as the engine to change less than higher level APIs, and this decoupling helps retain customers' investments in the technology.&lt;/p&gt;</description><link>http://aspdotnetway.blogspot.com/2009/09/net-framework-30-faq_19.html</link><author>noreply@blogger.com (Asp Dot Net Way)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2606438956889056479.post-3351658902370788030</guid><pubDate>Sat, 19 Sep 2009 09:17:00 +0000</pubDate><atom:updated>2009-09-19T02:17:00.143-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ADO.Net 3.0</category><title>.Net Framework 3.0 FAQ</title><description>What is .Net Framework 3.0&lt;br /&gt;&lt;br /&gt;The Microsoft .NET Framework 3.0 (formerly WinFX), is the new managed code programming model for Windows.&lt;br /&gt;&lt;br /&gt;It combines the power of the .NET Framework 2.0 with four new technologies: Windows Presentation Foundation (WPF), Windows Communication Foundation (WCF), Windows Workflow Foundation (WF), and Windows CardSpace (WCS, formerly "InfoCard").&lt;br /&gt;&lt;br /&gt;Use the .NET Framework 3.0 today to build applications that have visually compelling user experiences, seamless communication across technology boundaries, the ability to support a wide range of business processes, and an easier way to manage your personal information online. Now the same great WinFX technology you know and love has a new name that identifies it for exactly what it is – the next version of Microsoft’s development framework. This change does not affect the release schedule of the .NET Framework 3.0 or the technologies included as a part of the package.</description><link>http://aspdotnetway.blogspot.com/2009/09/net-framework-30-faq.html</link><author>noreply@blogger.com (Asp Dot Net Way)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2606438956889056479.post-2649509209406274330</guid><pubDate>Fri, 18 Sep 2009 20:06:00 +0000</pubDate><atom:updated>2009-09-18T13:06:00.794-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Asp.Net</category><title>ASP.NET Interview Questions</title><description>ASP.NET Interview Questions&lt;br /&gt;&lt;br /&gt;This is a list of questions I have gathered and created over a period of time from my experience, many of which I felt where incomplete or simply wrong.  I have finally taken the time to go through each question and correct them to the best of my ability.  However, please feel free to post feedback to challenge, improve, or suggest new questions.  I want to thank those of you that have contributed quality questions and corrections thus far.&lt;br /&gt;&lt;br /&gt;There are some questions in this list that I do not consider to be good questions for an interview.  However, they do exist on other lists available on the Internet so I felt compelled to keep them here for easy access.&lt;br /&gt;&lt;br /&gt;   1.&lt;br /&gt;      Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe in the page loading process.&lt;br /&gt;      inetinfo.exe is theMicrosoft IIS server running, handling ASP.NET requests among other things.When an ASP.NET request is received (usually a file with .aspx extension), the ISAPI filter aspnet_isapi.dll takes care of it by passing the request tothe actual worker process aspnet_wp.exe.&lt;br /&gt;       &lt;br /&gt;   2. What’s the difference between Response.Write() andResponse.Output.Write()?&lt;br /&gt;      Response.Output.Write() allows you to write formatted output. &lt;br /&gt;       &lt;br /&gt;   3. What methods are fired during the page load?&lt;br /&gt;      Init() - when the page is instantiated&lt;br /&gt;      Load() - when the page is loaded into server memory&lt;br /&gt;      PreRender() - the brief moment before the page is displayed to the user as HTML&lt;br /&gt;      Unload() - when page finishes loading. &lt;br /&gt;       &lt;br /&gt;   4. When during the page processing cycle is ViewState available?&lt;br /&gt;      After the Init() and before the Page_Load(), or OnLoad() for a control. &lt;br /&gt;       &lt;br /&gt;   5. What namespace does the Web page belong in the .NET Framework class hierarchy?&lt;br /&gt;      System.Web.UI.Page &lt;br /&gt;       &lt;br /&gt;   6. Where do you store the information about the user’s locale?&lt;br /&gt;      System.Web.UI.Page.Culture &lt;br /&gt;       &lt;br /&gt;   7. What’s the difference between Codebehind="MyCode.aspx.cs" andSrc="MyCode.aspx.cs"?&lt;br /&gt;      CodeBehind is relevant to Visual Studio.NET only. &lt;br /&gt;       &lt;br /&gt;   8. What’s a bubbled event?&lt;br /&gt;      When you have a complex control, like DataGrid, writing an event processing routine for each object (cell, button, row, etc.) is quite tedious. The controls can bubble up their eventhandlers, allowing the main DataGrid event handler to take care of its constituents. &lt;br /&gt;       &lt;br /&gt;   9. Suppose you want a certain ASP.NET function executed on MouseOver for a certain button.  Where do you add an event handler?&lt;br /&gt;      Add an OnMouseOver attribute to the button.  Example: btnSubmit.Attributes.Add("onmouseover","someClientCodeHere();"); &lt;br /&gt;       &lt;br /&gt;  10. What data types do the RangeValidator control support?&lt;br /&gt;      Integer, String, and Date. &lt;br /&gt;       &lt;br /&gt;  11. Explain the differences between Server-side and Client-side code?&lt;br /&gt;      Server-side code executes on the server.  Client-side code executes in the client's browser. &lt;br /&gt;       &lt;br /&gt;  12. What type of code (server or client) is found in a Code-Behind class?&lt;br /&gt;      The answer is server-side code since code-behind is executed on the server.  However, during the code-behind's execution on the server, it can render client-side code such as JavaScript to be processed in the clients browser.  But just to be clear, code-behind executes on the server, thus making it server-side code. &lt;br /&gt;       &lt;br /&gt;  13. Should user input data validation occur server-side or client-side?  Why?&lt;br /&gt;      All user input data validation should occur on the server at a minimum.  Additionally, client-side validation can be performed where deemed appropriate and feasable to provide a richer, more responsive experience for the user. &lt;br /&gt;       &lt;br /&gt;  14. What is the difference between Server.Transfer and Response.Redirect?  Why would I choose one over the other?&lt;br /&gt;      Server.Transfer transfers page processing from one page directly to the next page without making a round-trip back to the client's browser.  This provides a faster response with a little less overhead on the server.  Server.Transfer does not update the clients url history list or current url.  Response.Redirect is used to redirect the user's browser to another page or site.  This performas a trip back to the client where the client's browser is redirected to the new page.  The user's browser history list is updated to reflect the new address. &lt;br /&gt;       &lt;br /&gt;  15. Can you explain the difference between an ADO.NET Dataset and an ADO Recordset?&lt;br /&gt;      Valid answers are:&lt;br /&gt;      ·  A DataSet can represent an entire relational database in memory, complete with tables, relations, and views.&lt;br /&gt;      ·  A DataSet is designed to work without any continuing connection to the original data source.&lt;br /&gt;      ·  Data in a DataSet is bulk-loaded, rather than being loaded on demand.&lt;br /&gt;      ·  There's no concept of cursor types in a DataSet.&lt;br /&gt;      ·  DataSets have no current record pointer You can use For Each loops to move through the data.&lt;br /&gt;      ·  You can store many edits in a DataSet, and write them to the original data source in a single operation.&lt;br /&gt;      ·  Though the DataSet is universal, other objects in ADO.NET come in different versions for different data sources. &lt;br /&gt;       &lt;br /&gt;  16. What is the Global.asax used for?&lt;br /&gt;      The Global.asax (including the Global.asax.cs file) is used to implement application and session level events. &lt;br /&gt;       &lt;br /&gt;  17. What are the Application_Start and Session_Start subroutines used for?&lt;br /&gt;      This is where you can set the specific variables for the Application and Session objects. &lt;br /&gt;       &lt;br /&gt;  18. Can you explain what inheritance is and an example of when you might use it?&lt;br /&gt;      When you want to inherit (use the functionality of) another class.  Example: With a base class named Employee, a Manager class could be derived from the Employee base class. &lt;br /&gt;       &lt;br /&gt;  19. Whats an assembly?&lt;br /&gt;      Assemblies are the building blocks of the .NET framework. Overview of assemblies from MSDN &lt;br /&gt;       &lt;br /&gt;  20. Describe the difference between inline and code behind.&lt;br /&gt;      Inline code written along side the html in a page. Code-behind is code written in a separate file and referenced by the .aspx page. &lt;br /&gt;       &lt;br /&gt;  21. Explain what a diffgram is, and a good use for one?&lt;br /&gt;      The DiffGram is one of the two XML formats that you can use to render DataSet object contents to XML.  A good use is reading database data to an XML file to be sent to a Web Service. &lt;br /&gt;       &lt;br /&gt;  22. Whats MSIL, and why should my developers need an appreciation of it if at all?&lt;br /&gt;      MSIL is the Microsoft Intermediate Language. All .NET compatible languages will get converted to MSIL.  MSIL also allows the .NET Framework to JIT compile the assembly on the installed computer. &lt;br /&gt;       &lt;br /&gt;  23. Which method do you invoke on the DataAdapter control to load your generated dataset with data?&lt;br /&gt;      The Fill() method. &lt;br /&gt;       &lt;br /&gt;  24. Can you edit data in the Repeater control?&lt;br /&gt;      No, it just reads the information from its data source. &lt;br /&gt;       &lt;br /&gt;  25. Which template must you provide, in order to display data in a Repeater control?&lt;br /&gt;      ItemTemplate. &lt;br /&gt;       &lt;br /&gt;  26. How can you provide an alternating color scheme in a Repeater control?&lt;br /&gt;      Use the AlternatingItemTemplate. &lt;br /&gt;       &lt;br /&gt;  27. What property must you set, and what method must you call in your code, in order to bind the data from a data source to the Repeater control?&lt;br /&gt;      You must set the DataSource property and call the DataBind method. &lt;br /&gt;       &lt;br /&gt;  28. What base class do all Web Forms inherit from?&lt;br /&gt;      The Page class. &lt;br /&gt;       &lt;br /&gt;  29. Name two properties common in every validation control?&lt;br /&gt;      ControlToValidate property and Text property. &lt;br /&gt;       &lt;br /&gt;  30. Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box?&lt;br /&gt;      DataTextField property. &lt;br /&gt;       &lt;br /&gt;  31. Which control would you use if you needed to make sure the values in two different controls matched?&lt;br /&gt;      CompareValidator control. &lt;br /&gt;       &lt;br /&gt;  32. How many classes can a single .NET DLL contain?&lt;br /&gt;      It can contain many classes.&lt;br /&gt;       &lt;br /&gt;&lt;br /&gt;Web Service Questions&lt;br /&gt;&lt;br /&gt;   1. What is the transport protocol you use to call a Web service?&lt;br /&gt;      SOAP (Simple Object Access Protocol) is the preferred protocol. &lt;br /&gt;       &lt;br /&gt;   2. True or False: A Web service can only be written in .NET?&lt;br /&gt;      False &lt;br /&gt;       &lt;br /&gt;   3. What does WSDL stand for?&lt;br /&gt;      Web Services Description Language. &lt;br /&gt;       &lt;br /&gt;   4. Where on the Internet would you look for Web services?&lt;br /&gt;      http://www.uddi.org &lt;br /&gt;       &lt;br /&gt;   5. True or False: To test a Web service you must create a Windows application or Web application to consume this service?&lt;br /&gt;      False, the web service comes with a test page and it provides HTTP-GET method to test.&lt;br /&gt;       &lt;br /&gt;&lt;br /&gt;State Management Questions&lt;br /&gt;&lt;br /&gt;   1. What is ViewState?&lt;br /&gt;      ViewState allows the state of objects (serializable) to be stored in a hidden field on the page.  ViewState is transported to the client and back to the server, and is not stored on the server or any other external source.  ViewState is used the retain the state of server-side objects between postabacks. &lt;br /&gt;       &lt;br /&gt;   2. What is the lifespan for items stored in ViewState?&lt;br /&gt;      Item stored in ViewState exist for the life of the current page.  This includes postbacks (to the same page). &lt;br /&gt;       &lt;br /&gt;   3. What does the "EnableViewState" property do?  Why would I want it on or off?&lt;br /&gt;      It allows the page to save the users input on a form across postbacks.  It saves the server-side values for a given control into ViewState, which is stored as a hidden value on the page before sending the page to the clients browser.  When the page is posted back to the server the server control is recreated with the state stored in viewstate. &lt;br /&gt;       &lt;br /&gt;   4. What are the different types of Session state management options available with ASP.NET?&lt;br /&gt;      ASP.NET provides In-Process and Out-of-Process state management.  In-Process stores the session in memory on the web server.  This requires the a "sticky-server" (or no load-balancing) so that the user is always reconnected to the same web server.  Out-of-Process Session state management stores data in an external data source.  The external data source may be either a SQL Server or a State Server service.  Out-of-Process state management requires that all objects stored in session are serializable.</description><link>http://aspdotnetway.blogspot.com/2009/09/aspnet-interview-questions.html</link><author>noreply@blogger.com (Asp Dot Net Way)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2606438956889056479.post-7100065587124770760</guid><pubDate>Thu, 17 Sep 2009 19:12:00 +0000</pubDate><atom:updated>2009-09-17T12:12:00.385-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Asp.Net</category><title>Menu with MultiView</title><description>&lt;code&gt;&lt;br /&gt;Menu with MultiView&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;%@ Page Language="C#" %&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script runat="server"&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;protected void menuTabs_MenuItemClick(object sender, MenuEventArgs e)&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;{&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;multiTabs.ActiveViewIndex = Int32.Parse(menuTabs.SelectedValue);&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;}&lt;br /&gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;html xmlns="http://www.w3.org/1999/xhtml" &amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;head id="Head1" runat="server"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;style type="text/css"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;html&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;{&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;background-color:silver;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;}&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;.menuTabs&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;{&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;position:relative;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;top:1px;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;left:10px;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;}&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;.tab&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;{&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;border:Solid 1px black;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;border-bottom:none;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;padding:0px 10px;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;background-color:#eeeeee;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;}&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;.selectedTab&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;{&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;border:Solid 1px black;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;border-bottom:Solid 1px white;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;padding:0px 10px;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;background-color:white;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;}&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;.tabBody&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;{&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;border:Solid 1px black;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;padding:20px;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;background-color:white;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;}&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;/style&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;title&amp;gt;Menu Tab Strip&amp;lt;/title&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;form id="form1" runat="server"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;div&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;asp:Menu&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;id="menuTabs"&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;CssClass="menuTabs"&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;StaticMenuItemStyle-CssClass="tab"&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;StaticSelectedStyle-CssClass="selectedTab"&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Orientation="Horizontal"&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;OnMenuItemClick="menuTabs_MenuItemClick"&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Runat="server"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;Items&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;asp:MenuItem&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Text="Tab 1"&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Value="0" &lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Selected="true" /&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;asp:MenuItem&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Text="Tab 2" &lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Value="1"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;asp:MenuItem&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Text="Tab 3"&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Value="2" /&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;/Items&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;/asp:Menu&amp;gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;div class="tabBody"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;asp:MultiView&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;id="multiTabs"&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;ActiveViewIndex="0"&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Runat="server"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;asp:View ID="view1" runat="server"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Contents of first tab&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;/asp:View&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;asp:View ID="view2" runat="server"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Contents of second tab&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;/asp:View&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;asp:View ID="view3" runat="server"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Contents of third tab&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;/asp:View&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;/asp:MultiView&amp;gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;/form&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;</description><link>http://aspdotnetway.blogspot.com/2009/09/menu-with-multiview.html</link><author>noreply@blogger.com (Asp Dot Net Way)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2606438956889056479.post-46331004748823798</guid><pubDate>Wed, 16 Sep 2009 19:09:00 +0000</pubDate><atom:updated>2009-09-16T12:09:00.225-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Asp.Net</category><title>Code with Log File</title><description>In this article, we will adopt a simple mechanism to log errors and exceptions in website,&lt;br /&gt;The error will get logged in a text file on the server.&lt;br /&gt;The error file will be created on a daily basis, whenever the error is encountered&lt;br /&gt;&lt;br /&gt;Public Shared Sub WriteErrorLog(ByVal errorMessage As String, ByVal errorStack As String, ByVal methodName As String)&lt;br /&gt;Dim path As String = "~/LOG/" &amp; DateTime.Today.ToString("dd-MM-yy") &amp; ".txt"&lt;br /&gt;If (Not File.Exists(System.Web.HttpContext.Current.Server.MapPath(path))) Then&lt;br /&gt;File.Create(System.Web.HttpContext.Current.Server.MapPath(path)).Close()&lt;br /&gt;End If&lt;br /&gt;Using w As StreamWriter = File.AppendText(System.Web.HttpContext.Current.Server.MapPath(path))&lt;br /&gt;w.WriteLine(Constants.vbCrLf &amp; "Log DateTime : " &amp; DateTime.Now.ToString(System.Globalization.CultureInfo.InvariantCulture))&lt;br /&gt;w.WriteLine("Page :- " &amp; System.Web.HttpContext.Current.Request.Url.AbsolutePath.ToString.Trim)&lt;br /&gt;w.WriteLine("Function Name :- " &amp; methodName)&lt;br /&gt;w.WriteLine("Message :- " &amp; errorMessage)&lt;br /&gt;w.WriteLine("Stack Trace :- " &amp; errorStack)&lt;br /&gt;w.WriteLine("__________________________")&lt;br /&gt;w.Flush()&lt;br /&gt;w.Close()&lt;br /&gt;End Using&lt;br /&gt;End Sub&lt;br /&gt;Protected Sub btnTest_Click(ByVal sender As Object, ByVal e As System.EventArgs)&lt;br /&gt;Try&lt;br /&gt;Dim i As Integer = 1&lt;br /&gt;Dim j As Integer = 0&lt;br /&gt;Response.Write(i \ j)&lt;br /&gt;Catch ex As Exception&lt;br /&gt;WriteErrorLog(ex.Message, ex.StackTrace.ToString.Trim, ex.TargetSite.Name)&lt;br /&gt;End Try&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;OutPut&lt;br /&gt;__________________________&lt;br /&gt;&lt;br /&gt;Log DateTime : 07/15/2009 15:25:20&lt;br /&gt;Page :- /Default.aspx&lt;br /&gt;Function Name :- btnTest_Click&lt;br /&gt;Message :- Attempted to divide by zero.&lt;br /&gt;Stack Trace :- at Default.aspx.btnTest_Click(Object sender, EventArgs e) in D:\Test\Default.aspx.vb:line 107&lt;br /&gt;__________________________&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Same thing you can do in Globa.asax, at Application_Error event. You can get an Server last error by Server.GetLastError()&lt;br /&gt;&lt;br /&gt;Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)&lt;br /&gt;' Code that runs when an unhandled error occurs&lt;br /&gt;Dim objErr As Exception = Server.GetLastError().GetBaseException()&lt;br /&gt;&lt;br /&gt;'Function Name not be correct at application level error&lt;br /&gt;WriteErrorLog(objErr .Message, objErr .StackTrace.ToString.Trim, "")&lt;br /&gt;&lt;br /&gt;'IF you want you can redirect to user after log into log file here&lt;br /&gt;' Response.Redirect("Error.aspx")&lt;br /&gt;End Sub</description><link>http://aspdotnetway.blogspot.com/2009/09/code-with-log-file.html</link><author>noreply@blogger.com (Asp Dot Net Way)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2606438956889056479.post-441259686165482832</guid><pubDate>Wed, 16 Sep 2009 19:06:00 +0000</pubDate><atom:updated>2009-09-16T12:06:00.622-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Asp.Net</category><title>Getting week of the month from a Date</title><description>Getting week of the month from a DateTime variable&lt;br /&gt; // ---- GetWeekOfMonth ---------------------------&lt;br /&gt; //&lt;br /&gt; // Assuming Sunday starts a new week, get the ordinal&lt;br /&gt; // week a date is in...of the date's month&lt;br /&gt; // using Microsoft.VisualBasic;&lt;br /&gt;&lt;br /&gt; int GetWeekOfMonth(DateTime Date)&lt;br /&gt; {&lt;br /&gt; long Week;&lt;br /&gt;&lt;br /&gt; // get first day of month&lt;br /&gt; DateTime BaseDate = new DateTime(Date.Year, Date.Month, 1);&lt;br /&gt;&lt;br /&gt; // get difference, in weeks, between the date and first day of month&lt;br /&gt; Week = DateAndTime.DateDiff(DateInterval.WeekOfYear, &lt;br /&gt; BaseDate, &lt;br /&gt; Date, &lt;br /&gt; Microsoft.VisualBasic.FirstDayOfWeek.Sunday, &lt;br /&gt; FirstWeekOfYear.Jan1);&lt;br /&gt; &lt;br /&gt; // want it one, not zero based&lt;br /&gt; return (int)Week + 1;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; // test it&lt;br /&gt; protected void Button1_Click(object sender, EventArgs e)&lt;br /&gt; {&lt;br /&gt; DateTime Date = new DateTime(2007, 3, 1);&lt;br /&gt;&lt;br /&gt; while (Date.Month == 3)&lt;br /&gt; {&lt;br /&gt; int Week = GetWeekOfMonth(Date);&lt;br /&gt;&lt;br /&gt; Response.Write(String.Format("{0:d} : {1} &lt;BR&gt;", Date, Week));&lt;br /&gt; Date = Date.AddDays(1);&lt;br /&gt; }&lt;br /&gt; }</description><link>http://aspdotnetway.blogspot.com/2009/09/getting-week-of-month-from-date.html</link><author>noreply@blogger.com (Asp Dot Net Way)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2606438956889056479.post-1261330325522116296</guid><pubDate>Wed, 16 Sep 2009 19:05:00 +0000</pubDate><atom:updated>2009-09-16T12:05:00.496-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Asp.Net</category><title>RequiredFiledValidator For CheckBoxList</title><description>&lt;code&gt;&lt;br /&gt;RequiredFiledValidator For CheckBoxList&lt;br /&gt;&lt;br /&gt;function checkTemp(sender,args)&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; for(var i=0;i&amp;lt;=document.getElementById("CheckBoxList1").firstChild.children.length-1;i++)&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;if(document.getElementById("CheckBoxList1").firstChild.children(i).cells(0).children(0).checked)=='true'&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;args.IsValid=true&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;return&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; args.IsValid=false&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&amp;lt;asp:CustomValidator id="valcheckBoxTemp" runat="server" ClientValidationFunction="checkTemp" &lt;br /&gt;&lt;br /&gt;ErrorMessage="This is required control "&amp;gt;&amp;lt;/asp:CustomValidator&amp;gt;&amp;#160;&amp;#160;&lt;br /&gt;&lt;/code&gt;</description><link>http://aspdotnetway.blogspot.com/2009/09/requiredfiledvalidator-for-checkboxlist.html</link><author>noreply@blogger.com (Asp Dot Net Way)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2606438956889056479.post-2283377211693598570</guid><pubDate>Tue, 15 Sep 2009 19:04:00 +0000</pubDate><atom:updated>2009-09-15T12:04:00.358-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Asp.Net</category><title>Disable Copy Command</title><description>Disable Copy Command&lt;br /&gt;&lt;br /&gt;oncopy="return false;" onpaste="return false;" oncut="return false;"</description><link>http://aspdotnetway.blogspot.com/2009/09/disable-copy-command.html</link><author>noreply@blogger.com (Asp Dot Net Way)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2606438956889056479.post-6646997946674116242</guid><pubDate>Tue, 15 Sep 2009 19:03:00 +0000</pubDate><atom:updated>2009-09-15T12:03:00.680-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Asp.Net</category><title>Alternate image when the orginal image is missing</title><description>&lt;code&gt;&lt;br /&gt;How to provide an alternate image when the orginal image is missing?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;img border=0 src='&amp;lt;%# (Eval("Image").ToString() != null) ? "http://www.mynewsite.com/Images/thumb/" + Eval("Image") : "path_of_dummy_image" %&amp;gt;' /&amp;gt;&lt;br /&gt;&lt;/code&gt;</description><link>http://aspdotnetway.blogspot.com/2009/09/alternate-image-when-orginal-image-is.html</link><author>noreply@blogger.com (Asp Dot Net Way)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2606438956889056479.post-4247049697922021513</guid><pubDate>Tue, 15 Sep 2009 19:03:00 +0000</pubDate><atom:updated>2009-09-15T12:03:00.153-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Asp.Net</category><title>Finding Particular Controls in Page</title><description>Finding Particular Controls in Page&lt;br /&gt;private Control FindNestedControl(Control parent, string controlid)&lt;br /&gt;        {&lt;br /&gt;            Control c = parent.FindControl(controlid);&lt;br /&gt;            if (c != null)&lt;br /&gt;                return c;&lt;br /&gt;            else&lt;br /&gt;            {&lt;br /&gt;                foreach (Control child in parent.Controls)&lt;br /&gt;                {&lt;br /&gt;                    c = FindNestedControl(child, controlid);&lt;br /&gt;                    if (c != null)&lt;br /&gt;                        return c;&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            return null;&lt;br /&gt;        }&lt;br /&gt;Eg :- DropDownList ddlMyList = FindNestedControl(this.Page," ddlMyList") as DropDownList;</description><link>http://aspdotnetway.blogspot.com/2009/09/finding-particular-controls-in-page.html</link><author>noreply@blogger.com (Asp Dot Net Way)</author><thr:total>0</thr:total></item></channel></rss>