Articles - Microsoft.net

0

Like

The following key things are to be addressed:

1.It should be on the top-center of the page.
2.It should be on top of all the other HTML controls.
3.When scrolling, it should be placed on a relative position to the current scroll position.
To achieve this, we can use many alternatives, but I would use a simple approach. In addition to the UpdatePanel, I will use div, CSS styles, and JavaScript. ...Read more
Posted by: Teena
On 12 Sep 2011 | Views: 791 | Categories: AJAX
0

Like

This article will help you create high quality thumbnail from an image as well as resize image dynamically.
GetThumbnailImage method of class Bitmap produces a thumbnail image from the file specified. Life is so easy with it. Not always though. Sometimes the thumbnail produced has low quality - pixelated and blurred.

Why it Happens? Why My Images are Pixelated and Blurred?
Image formats like jpeg may store the thumbnail inside the same file. If we use System.Drawing.Bitmap method GetThumbnailImage, method checks if there’s a thumbnail image stored into the file and, if the thumb is fou ...Read more
Posted by: Michael
On 08 Sep 2011 | Views: 1424 | Categories: ASP.NET
0

Like

Here I am explaining 2 way to rewrite URL in asp.net.
URL rewrining using web.config and URL rewriting using global.asax

URL rewrining using web.config:
URL rewriting in web.config is only use for small number of pages. Here you have to rewrite every page manually in web.config. I am writing sample code for 4 urls. ...Read more
Posted by: Teena
On 07 Sep 2011 | Views: 1152 | Categories: ASP.NET
0

Like

In this part of the tutorial, you'll make some improvements to the automatically generated Details and Delete methods. These changes aren't required, but with just a few small bits of code, you can easily enhance the application.

Improving the Details and Delete Methods

When you scaffolded the Movie controller, ASP.NET MVC generated code that worked great, but that can be made more robust with just a few small changes.

Open the Movie controller and modify the Details method by returning HttpNotFound when a movie isn't found. You should also modify the Details method to set a default v ...Read more
Posted by: Michael
On 07 Sep 2011 | Views: 717 | Categories: MVC
0

Like

In this section you'll add validation logic to the Movie model, and you'll ensure that the validation rules are enforced any time a user attempts to create or edit a movie using the application.

Keeping Things DRY

One of the core design tenets of ASP.NET MVC is DRY ("Don't Repeat Yourself"). ASP.NET MVC encourages you to specify functionality or behavior only once, and then have it be reflected everywhere in an application. This reduces the amount of code you need to write and makes the code you do write much easier to maintain.

The validation support provided by ASP.NET MVC and Entit ...Read more
Posted by: Michael
On 07 Sep 2011 | Views: 687 | Categories: MVC
0

Like

n this section you'll make some changes to the model classes and learn how you can update the database schema to match the model changes.

Adding a Rating Property to the Movie Model

Start by adding a new Rating property to the existing Movie class. Open the Movie.cs file and add the Rating property like this one: ...Read more
Posted by: Michael
On 07 Sep 2011 | Views: 613 | Categories: MVC
0

Like

In this section, you'll examine the generated action methods and views for the movie controller. Then you'll add a custom search page.

Run the application and browse to the Movies controller by appending /Movies to the URL in the address bar of your browser. Hold the mouse pointer over an Edit link to see the URL that it links to. ...Read more
Posted by: Michael
On 07 Sep 2011 | Views: 722 | Categories: MVC
0

Like

In this section, you'll create a new MoviesController class and write code that retrieves the movie data and displays it in the browser using a view template. Be sure to build your application before proceeding.

Right-click the Controllers folder and create a new MoviesController controller. Select the following options:

Controller name: MoviesController. (This is the default. )

Template: Controller with read/write actions and views, using Entity Framework.

Model class: Movie (MvcMovie.Models).

Data context class: MovieDBContext (MvcMovie.Models).

Views: Razor (CSHTML). (The ...Read more
Posted by: Michael
On 07 Sep 2011 | Views: 839 | Categories: MVC
0

Like

In this section you'll add some classes for managing movies in a database. These classes will be the "model" part of the ASP.NET MVC application.

You’ll use a .NET Framework data-access technology known as the Entity Framework to define and work with these model classes. The Entity Framework (often referred to as EF) supports a development paradigm called Code First. Code First allows you to create model objects by writing simple classes. (These are also known as POCO classes, from "plain-old CLR objects.") You can then have the database created on the fly from your classes, which enables a ...Read more
Posted by: Michael
On 07 Sep 2011 | Views: 735 | Categories: MVC
0

Like

In this section you're going to modify the HelloWorldController class to use view template files to cleanly encapsulate the process of generating HTML responses to a client.

You'll create a view template file using the new Razor view engine introduced with ASP.NET MVC 3. Razor-based view templates have a .cshtml file extension, and provide an elegant way to create HTML output using C#. Razor minimizes the number of characters and keystrokes required when writing a view template, and enables a fast, fluid coding workflow.

Start by using a view template with the Index method in the HelloWo ...Read more
Posted by: Michael
On 07 Sep 2011 | Views: 796 | Categories: MVC
Page 91 of 94
Other lins

.Net Techies
Other lins