Cross-page posting
In Whidbey, you will be able to post Web Forms to pages other than the page on which the input is entered. Postback target is chosen based on the PostTargetUrl attribute of a control that causes a postback. On the target page, you will be able to access all of the controls, viewstate, etc. of the page that caused the web form post. Whidbey passes a page object called PreviousPage to the current page for accessing controls,viewstate and all others contents of previous page. For example consider you are filling your personal details in one page and then you need to post this details to next page for processing. In ASP.NET v1.0 you need to post this values to that same page and then you need to redirect to the next page. But in Whidbey you can directly post this values to the next page.
Page1.aspx
Page2.aspx.vb
Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Label1.Text = DirectCast(PreviousPage.FindControl("TextBox1"), System.Web.UI.WebControls.TextBox).Text
End Sub
ValidationGroups
You can now have validator controls optionally validate depending on which button on the page is pushed. You can group validation rules into “groups“ so that all controls within that group fire or don't fire.The new feature validation groups allows you to logically group a set of validation controls, and only validate the fields that are in the group to which belongs the postback control that the user clicks. Uses the ValidationGroup attribute to implement in declarative tags. The key here is that you can have two sets of form fields that aren't typically used together, and implement validation on both sets of fields, without the non-used fields causing the page to fail validation. This feature is very useful in the page where you are having two sets of forms for example you might have a page which has search pane in the top and the registration details at the bottom. when find button is clicked you need to validate only the search page controls and similarly when you press create login, you need to validate the controls in registration form. For this type of requirement, this validation groups is very useful. In our example, we have two textbox and two buttons. When one button is pressed we need to validate only one textbox and similarly for other button. Each button has validationgroup attribute set to particular groups which will validate only one textbox.
Wizard UI
New
Step 1 : Fill your Name
Step 2 : Fill your Address
You can find new tags like
ASP.NET Themes
A theme is a collection of property settings that allow you to define the look of pages and controls and then apply the look consistently across pages. You can apply theme settings to an entire application (Web site), to a page and its controls, or to an individual control. If you take popular websites like yahoo they have implemented theme in their site, for example you need to have theme of yellow color. Then you will view that website in yellow color if you want to change to red, then all the controls will change to red. ASP.NET makes available some predefined themes (global themes) that can be applied to any ASP.NET Web application. For example, ASP.NET includes a theme called BasicBlue that defines a common style for most ASP.NET Web server controls.You can create your own themes, called page themes, to apply to your site or to individual pages.
ASP.NET Site Navigation
When you create Web applications that consist of anything more than a few pages, you will find it useful to provide a consistent way for users to navigate around the site. One solution is to include hyperlinks within pages that allow users to jump to other pages. However, if your site becomes large and as you move pages in the site, it quickly becomes difficult to manage all the links. To create consistent, easily managed navigation for your site, you can use ASP.NET site navigation. If you take this website you can see site navigation bar at the left side. This site navigation can be created with very minimal code using following two new controls ,
SiteMapPath control: This control displays a navigation path (also known as a breadcrumb or eyebrow) that shows the user the current page location and displays links as a path back to the home page. The control provides many options for customizing the appearance of the links.
TreeView controls: This control displays a tree structure, or menu, that users can traverse to get to different pages in your site.
URL Rewriting/Mapping
New built-in module for rewriting paths. With this new feature you can map url's to aspx pages in web.config file. This feature can be used to hide the url from the user. If you need to change the location of your aspx page, then you no need to worry. Just change your url mappings in web.config. Since user is exposed to a url which doesnt change you wont get 404 error. Web.config setting for urlmapping is as follows.
If you are requesting for UrlMappings.aspx, then actually you will get the response of Crosspage.aspx. But the user will think that he is getting UrlMappings.aspx only. If you change the Crosspage.aspx location also, you only need to change this setting in web.config.
Site Counters
This feature can be used to montior a web site. For example if you want to know during certain time if you want to know how many hits is made to a particular virutal folder or file. Then you can use this feature. This services exposes many API's like GetTotalCount,GetRows,GetTotalNavigateUrlCount,etc for monitoring a website. Can also be accessed through attributes (CountClicks, CounterGroup, etc.) on declarative tags, as well as through web.config. Using this feature you can efficiently log or report page hits,button click in a page or any other events. For enabling Site counters, you need to place following code in web.config
Client Script Goodies
Server buttons now have an OnClientClick attribute for client-side handling. Focus mechanisms are now built into the page and controls. A page can also have a default button and a default focused control. All these features emit the appropriate client-side script. There will also be automatic scroll position maintenance in the beta release of Whidbey. Here are few examples