tag:blogger.com,1999:blog-65986697860515929052009-02-20T19:55:24.894-05:00Best Dot NetWe cover what a developer needs. Spend time once in a while. You are good. :)MJReddynoreply@blogger.comBlogger18125tag:blogger.com,1999:blog-6598669786051592905.post-74241263161150343442007-11-24T11:11:00.000-05:002007-11-24T11:17:19.285-05:00DataAdapter Vs DataReaderWhen to use SqlDataAdapter? and When to use SqlDataReader ?If you use a SqlDataAdapter to generate a DataSet or DataTable, note the following:You do not need to explicitly open or close the database connection. The SqlDataAdapter Fill method opens the database connection and then closes the connection before it returns. If the connection is already open, Fill leaves the connection open.If you MJReddynoreply@blogger.comtag:blogger.com,1999:blog-6598669786051592905.post-15684463706267248292007-11-24T11:00:00.000-05:002007-11-24T11:06:29.918-05:00Standard Naming Guide Lines in DotNetPascal case: The first letter in the identifier and the first letter of each subsequent concatenated word are capitalized. You can use Pascal case for identifiers of three or more characters. For example:BackColor Camel case:The first letter of an identifier is lowercase and the first letter of each subsequent concatenated word is capitalized. For example:backColor Uppercase: All letters in MJReddynoreply@blogger.comtag:blogger.com,1999:blog-6598669786051592905.post-88019499582466703082007-11-24T10:29:00.000-05:002007-11-24T11:00:24.497-05:00What is SerializationSerialization is the process of saving an object onto a storage medium (such as a file, or a memory buffer) or to transmit it across a network connection link in binary form. The series of bytes or the format can be used to re-create an object that is identical in its internal state to the original object. The process of recreating object is called de-serialization 'VB Example <Serializable()> MJReddynoreply@blogger.com0tag:blogger.com,1999:blog-6598669786051592905.post-39136917974684312752007-11-24T10:14:00.000-05:002007-11-24T10:16:28.188-05:00When an object is deserialized, does it call default constructor ?NooooooooooooooooooMJReddynoreply@blogger.com0tag:blogger.com,1999:blog-6598669786051592905.post-56259841271242892702007-11-24T09:59:00.000-05:002007-11-24T10:14:13.964-05:00Why is 'new' kewword used in function signaturesGenerally new is used in the following scenario: class BaseClass {   public int Add(int a, int b)    {    return a+b;    } } class DerivedClass:BaseClass {   public int new Add(int a, int b)    {    return a+b;    } } Client Code:   public static void main()    {    DerivedClass obj = new DerivedClass();    int i = obj.Add(5,4);    } Now, when the object of MJReddynoreply@blogger.comtag:blogger.com,1999:blog-6598669786051592905.post-20287272117872807962006-11-24T11:21:00.000-05:002007-11-24T11:28:49.230-05:00HTTP request to another page in ASP.netSometimes, one needs the html of a different page to embed the html in their page or use the html to get some data out the page. The following code demonstrates how that can be achieved. System.Net.HttpWebResponse Rs; System.Net.HttpWebRequest Rq; Rq = (HttpWebRequest)WebRequest.Create(url); Rq.Method = "GET"; Rq.ContentType = "text/html"; Rq.Proxy.Credentials = MJReddynoreply@blogger.comtag:blogger.com,1999:blog-6598669786051592905.post-72104980717333276962004-05-06T17:20:00.000-04:002007-11-08T20:59:21.683-05:00A simple example of .net remotingRemoting has 4 parts. Create Interface: To be used by Client and Remote Object Create Server: Is the actual remote object. Implements the interface Create Hosting Solution: This hosts the server on a specific protocol & port Create Client. Calls the remote object on the given protocol and port using the interface Create Interface (myInterface.dll): Create a Class Library project in Visual studioMJReddynoreply@blogger.comtag:blogger.com,1999:blog-6598669786051592905.post-77528715674648082352004-04-25T21:16:00.000-04:002007-10-26T19:04:41.166-04:00Asp.Net Page redirectResponse.Redirect(url,bln) Makes round trip to browser. The repsonse header contains a http status code of 302 (object moved), which directs browser to look into the header for the new url. Can be used to transfer to external pages that are not running on the same server. Server.Transfer(url,bln) No round trip to browser. Bowser continues to show old url in its address barIf bln == true, all theMJReddynoreply@blogger.comtag:blogger.com,1999:blog-6598669786051592905.post-66379316419356535902004-04-23T20:42:00.000-04:002007-11-04T11:14:57.270-05:00How many overload functions are possible for main functionThe following are the possible overloading of main function.... static void Main() {...} static void Main(string[] args) {...} static int Main() {...} static int Main(string[] args) {...} MJReddynoreply@blogger.comtag:blogger.com,1999:blog-6598669786051592905.post-90234923111906479592004-04-23T10:05:00.000-04:002007-11-24T09:56:59.976-05:00ASP.Net Windows AuthenticationWindows Authentication is most commonly used in intranet applications. It avoids the need to create a login form within an application, and does not require end-users to manually enter their username/password credentials to login to the application. This approach improves the end-user customer experience as users don’t have to their passwords, or maintain separate accounts. It also allows MJReddynoreply@blogger.comtag:blogger.com,1999:blog-6598669786051592905.post-28337154727333291222004-04-21T17:34:00.000-04:002007-11-04T10:23:47.520-05:00Simple ASP.Net Forms Authentication - Part: 1Forms authentication is one of the ways to authenticate users. This type of authentication is used for applications accessed over internet for general users (non-employees), like a web portal. A typical web application has three types of web pages. 1)Pages for all users. Generally home page, demo ect 2)Pages for registerd users 3)Pages for admins Example is, Amazon.com or Dell.com. They have MJReddynoreply@blogger.comtag:blogger.com,1999:blog-6598669786051592905.post-8760724907884719582004-02-16T19:10:00.000-05:002008-12-10T04:56:59.503-05:00Various layers of multi-tier application User interface (UI) components: Most solutions need to provide a way for users to interact with the application. User interfaces are implemented using Windows Forms, Microsoft ASP.NET pages, controls. User process components. In many cases, a user interaction with the system follows a predictable process. For example, in a retail application one could implement a procedure for viewing product MJReddynoreply@blogger.comtag:blogger.com,1999:blog-6598669786051592905.post-16069447434593933002003-11-08T20:35:00.000-05:002007-11-08T21:08:40.771-05:00How to locate open and used portsUse command prompt command 'NETSTAT' to find the ports the system currently listening to and also to find out the ports the system has currently established. c:>netstat -an |find /i "listening" c:>netstat -an |find /i "established" c:>netstat -an |find /i "listening" > c:\ports.txt Exports the results to file.MJReddynoreply@blogger.comtag:blogger.com,1999:blog-6598669786051592905.post-23626815907095125772003-04-11T18:10:00.000-04:002007-11-04T10:59:42.722-05:00Difference between Authentication and AuthorizationAuthentication is identifying the user. Authorization is determining what level of access the user has. Suppose, you have 2 types of users to your website normal and admins. When the user tries to access the website, you ask them to log in. This is authentication part. Once you know the user is valid, then you determine to which pages the user has access to. Normal users should not be able to MJReddynoreply@blogger.comtag:blogger.com,1999:blog-6598669786051592905.post-46495366908726361432002-11-04T11:44:00.000-05:002007-11-24T09:30:50.848-05:00What’s the difference between the System.Array.CopyTo() and System.Array.Clone()System.Array.CopyTo() performs a deep copy of the array. A deep copy constructs a new object and then, recursively, inserts copies into it of the objects found in the original. System.Array.Clone()performs shallow. A shallow copy constructs a new object and then inserts references into it to the objects found in the original. <!-- For additional Reading--> <!-- -->MJReddynoreply@blogger.comtag:blogger.com,1999:blog-6598669786051592905.post-41131664855942174332002-11-04T11:42:00.000-05:002007-11-04T11:42:54.531-05:00What’s the difference between Java and .NET garbage collectorsSun left the implementation of a specific garbage collector up to the JRE developer, so their performance varies widely, depending on whose JRE you’re using. Microsoft standardized on their garbage collection.MJReddynoreply@blogger.comtag:blogger.com,1999:blog-6598669786051592905.post-63186637285799942382002-11-04T11:39:00.000-05:002007-11-04T11:40:47.459-05:00What’s the difference between an interface and abstract class?In the interface all methods must be abstract, in the abstract class some methods can be concrete. In the interface no accessibility modifiers (like Public, private) are allowed, which is ok in abstract classes.MJReddynoreply@blogger.comtag:blogger.com,1999:blog-6598669786051592905.post-30388838582674203102002-11-04T11:37:00.000-05:002007-11-04T11:37:54.201-05:00What’s the top .NET class that everything is derived from?System.ObjectMJReddynoreply@blogger.com