Microsoft.NET

Properties and Indexers in Depth

All the object-oriented languages support encapsulation, inheritance and polymorphism. What is different about C# is that it supports additional features like properties, events, indexers, delegates, etc. That is why C# is often termed as a modern object-oriented (OO) language. In this article we will discuss two modern OO concepts—properties and indexers. Properties Properties provide an Properties and Indexers in Depth

Partial Classes in Depth

Partial classes permit splitting a single class, interface, or struct into multiple, separate files. There are several advantages to splitting these elements into many files, including permitting more than one developer to work on the same class. OR partial classes mean that your class definition can be split into multiple physical files. Logically, partial classes Partial Classes in Depth

Nullable Types in Depth

This Article explains the Nullable Types in .NET 2.0 Nullable Types are instances of the System.Nullable struct introduced in .NET 2.0. Null means value undefined or value not known. Reference types by design support storing null but values types have been designed to store only the range of values they are made for. They don’t Nullable Types in Depth

N-Tier Application – A Brief Introduction

Introduction Creating N-tier applications is not a new concept now. Since VB4 days Developers are building such applications. .NET provides great support for building such applications. This article is intended to give you an overview of n-tier architecture as applicable to .NET and how various technology choices offered by .NET fit in the picture. What N-Tier Application – A Brief Introduction

Get Date of the Monday in the Current Week

Please find code snippet for getting date of Monday in current week. protected void Page_Load(object sender, EventArgs e) { DateTime FirstDayOfWeek = DateTime.Now; DayOfWeek WeekDay = FirstDayOfWeek.DayOfWeek; Culture = “en-GB”; switch (WeekDay) { case DayOfWeek.Monday: break; case DayOfWeek.Tuesday: FirstDayOfWeek = FirstDayOfWeek.AddDays(-1); break; case DayOfWeek.Wednesday: FirstDayOfWeek = FirstDayOfWeek.AddDays(-2); break; case DayOfWeek.Thursday: FirstDayOfWeek = FirstDayOfWeek.AddDays(-3); break; case Get Date of the Monday in the Current Week

Add custom verbs into Web Part

Problem :I want to add some custom verbs for each of the web part i have. Along with Minimize, Close verbs i want to add Save, MyFavorite, Edit etc to the web part verb. And after clicking on that verbs lets say [Help] i need to do some server side processing. Solution: We can do Add custom verbs into Web Part

Web Part Personalization according to user

Problem 1:I want to set the webparts personalization according to login user i.e. If user1 closed a webpart in the appliaction then this should not reflect to user2. How can i achieve this ? Problem 2:I have a Users table containing username and password fields. A user has to first login into a form that Web Part Personalization according to user

After closing webpart how to get back?

Problem:Usually when we click on the close menu of web-part it is disappear from screen. I want to display a window in which all the web-parts which were disappear so user can select and get back ? Solution: Just put a CatalogZoneWebPart with PageCatalog inside it and after running the appliaction you’ll find that your After closing webpart how to get back?

Closed Web Part is not appearing in Catalog Zone

Problem: If I set the HeaderText=”&nbsp” in WebPartZone ,then I am  not able to see any text for this Zone in CatalogZone . Solution: Well CatalogZone contains closed WebPart name followed by a checkbox and there is a combo box that contains the value of all the WebPartZones placed in that page. Now if you Closed Web Part is not appearing in Catalog Zone