Cross-page postback is a feature that makes it possible to post values from one page to another, without Server.Transfer or other far fetched techniques. We all know that in ASP.NET 1.xx you could only post a page back to itself, which was pretty annoying.

What do we do?

The way it works is that all controls that implement the new System.Web.UI.WebControls.IButtonControl got a property called:PostBackUrl

When we have a Button on a WebForm (a Button implements IButtonControl), we set the PostBackUrl to the Webform we want to postback to.

What we get is:


How does it work?

When the PostBackUrl property of the 'IButtonControl' is set, the ASP.NET framework binds the corresponding HTML element to new JavaScript function named 'WebForm_DoPostBackWithOptions'. The corresponding HTML rendered by the ASP.NET 2.0 will look like this:



One problem with cross-page posting is the new page presumably needs the view state of the page posted from. The view state is page specific; it contains information, for example, about controls embedded on the particular page. ASP.NET 2.0 resolves this by embedding a hidden input field name, '__POSTBACK' . This field is embedded only when there is an 'IButtonControl' on the page and its 'PostBackUrl' property is set to a non-null value. This field contains the view state information of the poster page. To access the view state of the poster page, you can use the new PreviousPage property of the page:




And with:




We can find all controls on the posting (previous) page and read it's state.

Henry Cordes
My thoughts exactly...

Yesterday I attended a session about Visual Studio 2005 Team System at Tech-Ed 2005 Europe. Microsoft's goal is to make the developing proces more productive with the help of Team System.
Developers adding features that don't map to requirements, they argue with the architects and testers are sitting around workless, while the deadline is coming near. This kind of scenario is what Team System should help prevent.

A point was made out of the notion that the Source Control part of Team System ISNOT Visual Sourcesafe. Visual Sourcesafe was designed for small teams. The sourcecontrol part of Team System is being designed and built from the ground up.
Microsoft wants the Windows team to use Team System eventually, to show they are committed to this product. In this mindset they even offer small developingteams (I believe up to 5 developers) Team System for free, if they only have client licenses. This to show how much they like us to use Team sytem.
The idea is to let every member of the developingteam use the tools they are familiair with. The projectmanagers use MS Project or Excel, developers use Visual Studio and they all can continue to do so with Team System.

Visual Studio 2005 Team System is designed to achieve four goals:

  • Be productive by reducing the complexity of delivering modern service-oriented solutions;
  • Be integrated with all tools and facilitate better team collaboration;
  • Be capable by being robust, secure and scalable and by having the ability to work remotely
  • Be extensible by allowing processes to be customized

The last goal means that third parties must be able to introduce Team System addins. The presentation showed a third party Linux tool that works with the Team System Server (same functionality as the windows client over https). So it looks like that goal is being taken seriously.

Team System supports methodologies and two are being included with Team System:

  • MSF for Agile Software Development
  • MSF for CMMI Process Improvement

Microsoft Solution Framework for Agile Software Development
MSF Agile is intended for smaller shops (5 to 20 members) and the tenets that Agile agrees on are:

  • Individuals are more important than processes and tools
  • Customer collaboration is more important than contracts
  • Working software is more important than comprehensive documentation
  • Responding to change is more important than following a plan

Quality and constant delivarebles define an Agile process. Agile is the default methodology for Visual Studio 2005 Team System.

Microsoft Solution Framework for CMMI Process Improvement
CMMI stands for Capability Maturity Model Integration. It's goal is to provide a model for continuous process improvement. It should result in reduced software development-lifecycle times and improved quality. If your organization is trying to achieve a measured baseline competency in software development this is an excellent process to use. For the bigger organizations that need a more formal development process that reduces risk on large software projects this is a good process. It provides a measurable baseline that can be used to achieve certifications in ISO 9000/9001.

How does Team System support methodologies?
Team System takes a workstream approach.
It defines a process by offering a collection of activities and subactivities. This model fits well with most Agile methodologies.
For example, Team System knows about the WSF Agile elements: roles, activities, work streams and work items.
Roles: Project manager, developer, architect and tester.
Activities: Provide guidance to a task performed by a person playing a role in a project.
                 Activities are grouped together in work streams.
Work streams: Groups of related activities associated with one or more roles.
Work items: documents, spreadsheets, project plans, source code and other tangible output from activities.
                   Work items are created when certain activities are created.
                   They can also be prerequisites to perform an activity.

Methodology vs Tool
All this sounds really cool, finally developers will be forced to work only on requirements. Unit testing must pass succesfully before code can be checked in. Everybody knows what other teammembers are doing and why.
But all this only by buying a tool? I think that tools are the means not the target. The developing process must be in place, only then a tool can help to achieve more productivity and quality.

Henry Cordes
My thoughts exactly...

Tech·Ed 2005 Europe

Published 7/8/2005 by hendaman

Today I've been to the Tech·Ed 2005 Europe in Amsterdam. The sessions I attended where:








ASP.NET 2.0: Under the Covers – Exploring Internals, Page Lifecycle and the Compilation Model




Microsoft Visual Studio 2005 Team System: Enterprise-Class Source Control




ASP.NET 2.0: advanced Server Controls and Web Parts with ASP.NET 2.0




Software Factories: How and when?




Retry Abort Cancel? Appropriate Handling of Transaction Failures in Connected Systems Application Code




From Dusk Til Dawn: Choose *Your* Approach to Design and Develop Web Services Applications on the .NET Platform

There where some cool things in the presentations I attended. Ofcourse the Team System is something that is going to change the lifes of (MS) developers, but it's scope obviously goes much further than that.

In ASP.NET 2.0 it will be possible using callbacks to change, per example, a value in a control on your page, instead of always having to make a roundtrip to the server by means of a postback.
Asynchronous calls can be used (going on rendering your page while in the background another task is being processed).
If you want you can deploy only compiled binaries (assemblies) without codebehind's and even without .aspx or .ascx files. So your sourcecode is better protected (what about Reflector.FileDisassembler from Dennis Bauer?)
Master pages, ofcourse and webparts.

I attended a discussion on how MS the next 'hot thing': Software Factories. quite interesting, although I need to get an update on this. Edward Bakker is experimenting with Software Factories as you can read in his blog.

In the Retry, Abort, Cancel? Session Clemens Vasters spoke about Transactions and building robust connected systems applications. On his weblog there are lots of cool 'helpers', he wrote and is offering them for free in the Open Source kinda way:

I hope to write some more on these topics in the next days.

Henry Cordes
My thoughts exactly...


Published 7/2/2005 by hendaman

Well, after reading peoples logs for some time, now I think it's time to start my own.
Although I can't imagine anyone ever reading my stuff, my ego seems big enough to start my very own blog.
I will try to log my adventures while doing projects for my new employee . Since 01-03-2005 I started working for this organisation and I really hope I am getting to do some cool projects.

My competence is Microsoft, so the logs will have a MS flavour. Yesterday I passed the 070-315 exam (C# WebApps). I allready am a "certified" VB6 MCSD, but 'the firm' likes me to be .NET MCSD too.

I don't think this will make me a better developer, but it sure is nice to push that button and read....
Your score: 962
Yeah, to be honest, I like!

Next week I got permission to go one day to TechEd 2005 in Amsterdam, so I will be attending Friday 8 July.
If you see a guy that drinks coffee all through the day, it probably is me.

It's nice to have the opportunity to write down:

My thoughts exactly...
Henry Cordes