Feeds:
Posts
Comments

Archive for the ‘.NET’ Category

In C# .NET there is another way to automatically implement property besides using right click menu.  This method uses tab to achieve this goal. Simply type prorp and tab twice. The following will be generated:

Then change property name and property type.

Read Full Post »

C# .NET has a right click option that automatically implements get and set functions. To use this follow these steps:

  • Create a variable

 

  • Right click on the variable and select Refactor and Encapsulate Field option

 

  • Click OK on the Encapsulate Field window

 

Therefore the following is generated automatically:

Read Full Post »

Adding a page to Silverlight application requires these steps:

  • In the Solution Explorer right click on View folder under Silverlight application

 

  • From the right click menu select Add and then New Item option
  • From Add New Item window, select Silverlight (from left hand side) then select Silverlight Page option. Name the page and click OK

 

Read Full Post »

The requirements for Silverlight 5 are Visual Studio 2010 and Visual Studio 2010 service pack. This link contains Visual Studio 2010 service pack installation: http://www.microsoft.com/download/en/confirmation.aspx?id=23691

And the following link contains installation for Silverlight 5: http://www.silverlight.net/getting-started

Read Full Post »

Silverlight and MVC have their own advantages. It is possible to create an application that contains both. I used the follow these steps to create such web application:

  • Open Visual Studio 2010
  • From File menu select New and Project option
  • From New Project window, select Silverlight (from left hand side). Then select Silverlight Navigation Application. This window also allows you to select project’s Name and Location. Once you have selected the options click OK
  • In the New Silverlight Application window, in section New Web project type drop down select ASP .NET MVC Web Project and select OK

 

Read Full Post »

Sometimes you need to add an existing file to your project. To do so, select the project you want to add the file to in Solution Explorer, right select Add, and Existing Item options. This will bring up a dialog box to browse to the file’s location.

 

After selecting the file click OK and now the file should be added to your project.

Read Full Post »

Visual Studio sets a project to be a startup project. This means once the solution is run, the startup project runs first. The startup project is bolded in the Solution Explorer. To set a project as startup project first select the project in Solution Explorer, right click and select Set as Startup Project option.

Read Full Post »

It has happened to me that I closed Solution Explorer, Toolbox, and Server Explorer several times. If you close any of these windows in your development, to get them back click on View menu, then from the drop down menu choose the desired window. This act will add back the selected window to your environment.

Read Full Post »

High Level MVC Components

MVC framework contains the following components:

  • Models – is application’s data session. In other words it is in charge of getting data from database and writing back to the database.
  • Controllers – is application’s user interface. In other words the form that contains the controls. This session only displays information.
  • Views – is application’s session that responds to user interactions.

Read Full Post »

DateTime object in Visual Studio .NET has a property named DayOfWeek which returns DayOfWeek enum. This assist if your data is sensitive based on week days. The DayOfWeek enum contains the following values:

Read Full Post »

« Newer Posts - Older Posts »