Browse DevX
Sign up for e-mail newsletters from DevX


Creating Web Sites with ASP.NET Whidbey : Page 7

ASP.NET Whidbey adds a huge number of productivity features and enhancements. Although it's still early in the development process, Paul Sheriff and Ken Getz dig in and start playing with some of the new features, passing along what they've found.




Building the Right Environment to Support AI, Machine Learning and Deep Learning

Creating Your Own Web Part
It's easy to look at ASP.NET Web Parts and see them in action, but perhaps you'd like to create your own. Perhaps you're thinking they must be incredibly difficult to create. You'd be wrong?they're actually quite simple to create. Creating a Web Part can be as simple as dragging a user control into a WebPartZone control. To demonstrate how simple it can be to create a customizable Web Part, follow these steps.
  1. Create an Intranet site, using the ASP.NET Intranet Site template.
  2. Select Website and then Add New Item.
  3. From the list of templates, select Web User Control, and set the name to MyCalendar.aspx.
  4. Add an instance of the ASP.NET Calendar control to your new user control. (Select the Core tab on the Toolbox window to select the ASP.NET server controls.)
  5. Save your changes.
  6. Open the default.aspx page within the page editor, and select Design view by clicking on the Design tab at the bottom of the window.
  7. Click on the right WebPartZone controls where you see other controls such as Daily Links and My Weather. Click the WebPartZone's smart tag and select Edit Templates.
  8. Drag and drop an instance of the MyCalendar.ascx user control from the Solution Explorer to the default.aspx page immediately below the Daily Links, so it looks like Figure 14.
  9. On the Common WebPartZone Tasks smart tag, click End Template Editing.
  10. Run the application, and you will see your calendar appear just below the Daily Links. You can click the Personalize This Page link to set properties for this new Web Part.

Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date