Wednesday, February 25, 2009

Control Execution Lifecycle

The server loads an ASP.NET page every time it is requested and then unloads it after the request is completed. The page and the server controls it contains are responsible for executing the request and rendering HTML back to the client. Although the communication between the client and the server is stateless and disconnected, the client experience must appear to be that of a continuously executing process.
This illusion of continuity is created by the ASP.NET page framework and by the page and its controls. On postback, a control must behave as if it were starting where it left off at the end of the previous Web request. The ASP.NET page framework makes it relatively easy to perform state management, but control developers must be aware of the control execution sequence to achieve the effect of continuity. Control developers need to understand which information is available to a control at each phase in its lifecycle, which data is persisted, and what the control's state is when it is rendered. For example, a control is unable to invoke its parent until the tree of controls on a page has been populated.

http://msdn.microsoft.com/en-us/library/aa719775(VS.71).aspx

Saturday, February 21, 2009

Introduction to Web Application Projects

Purpose of Web Application Projects
The goal of Web application projects is to address some of the feedback we have heard from customers. Some developers find migrating Visual Studio .NET 2003 applications to the new Web site model in Visual Studio 2005 impractical, especially because precompiling (publishing) a Visual Studio 2005 Web site creates multiple assemblies.
The new Web application project type also enables some scenarios where Visual Studio 2005 Web projects are different than in the previous version of Visual Studio. For example, the new model has different semantics for Web subprojects where the subproject is not an ASP.NET or IIS application, but instead feeds its generated assembly to a parent application's Bin folder.

http://msdn.microsoft.com/en-us/library/aa730880(VS.80).aspx

Useful when choosing which type of projects to use.

Thursday, February 19, 2009

Creating and working with content using Dreamweaver

To update large amount of HTML pages, dreamweaver is one of a great tool that can greatly reduce our workload. It includes templates and library items which can reduce repetitive work.
Let's see the following instruction to learn about it:

http://www.adobe.com/devnet/dreamweaver/golive_migration/content/content.html

Dreamweaver provides an intuitive and simple environment for creating and editing content. Through the use of the Properties inspector and the various other panels, creating your content, exactly how you want it, takes no time at all.
Working with templates
Working with snippets
Working with Library items

Thursday, February 12, 2009

Use javascript to check the loading of the page

document.onreadystatechange=function() {
if (document.readyState=="complete") {
//your work
}
}

Friday, February 6, 2009

Thursday, January 29, 2009

UrlScan Security Tool

Question: What is UrlScan?

Answer: UrlScan is a security tool that screens all incoming requests to the server by filtering the requests based on rules that are set by the administrator. Filtering requests helps secure the server by ensuring that only valid requests are processed. UrlScan helps protect Web servers because most malicious attacks share a common ? characteristic they involve the use of a request that is unusual in some way. For instance, the request might be extremely long, request an unusual action, be encoded using an alternate character set, or include character sequences that are rarely seen in legitimate requests. By filtering unusual requests, UrlScan helps prevent such requests from reaching the server and potentially causing damage.

Details:
http://technet.microsoft.com/en-us/security/cc242650.aspx

Friday, November 21, 2008

Silverlight Tips

Question: If the image is larger than its container, it will pass through the border of its container. How can I restrict the size of the image (or other objects)?

Answer:
Clip the object using Canvas.Clip



Question: How do I animate a object to simulate the zoom function?

Answer:
Set the Scale Transform and then use a storyBoard to control the ScaleX and ScaleY.
Remember to put the storyboard inside the Canvas.Resources (Assume you use Canvas here)

Question: How should I make an object disappear?

Answer:
Setting the object's opacity to zero is not a good way.

The following code should be used:
texbox.visibility = Visibility.Colapsed

Other articles you may be interested:

http://msdn.microsoft.com/en-us/library/cc295092.aspx

http://silverlight.net/forums/t/9422.aspx