Working with XML Data Using LINQ, a TreeView, and a ListView :: Editing Data 30 Apr 2008 00:00 GMT
ASP.NET includes a variety of tools for displaying and editing XML documents. A previous article, Working
with XML Data Using LINQ, a TreeView, and a ListView :: Displaying Data, showed how with a TreeView control, a ListView control, an XmlDataSource control,
a LinqDataSource control, and about 50 lines of code we could create a web page that displayed the contents of a hierarchical XML file. Specifically,
the page displayed the contents from a fictional employee phonebook, which allowed for an arbitrary number of employees nested within branches and
departments. The TreeView and XmlDataSource controls displayed the various branches and departments, while the ListView and LinqDataSource controls
displayed the employees belonging to the selected branch or department (or one of its subdepartments).
In addition to displaying data, the ListView and LinqDataSource controls can be augmented to edit, insert, and delete data. This article examines how
to update the ListView and code to enable the visitor to add, edit, and delete employee phone records. By the conclusion of this article we will have
constructed a web page that displays XML data and enables an end user to modify the data from a simple, easy-to-use web page interface. Read on to
learn more!
Read More >
Source: 4GuysFromRolla Running In the Field: How to Make Your Handheld Your Best Friend 23 Apr 2008 04:53 GMTEnterprises take note: as handheld devices become both more capable and more user-friendly, they're also becoming "must-have" equipment for people who work away from the office, replacing their heavy laptops with smaller and lighter but still fully-functional equipment.
Source: DevX Working with XML Data Using LINQ, a TreeView, and a ListView :: Displaying Data 23 Apr 2008 00:00 GMT
With more and more data being stored in XML, web applications today commonly need some way to view and edit the data stored in an XML file from a web
page interface. If the XML data is relatively "flat" and tabular in nature, we can use data Web controls like the DataGrid, GridView, and Repeater. (See Quickly
Editing XML Data for an example of editing XML data through a DataGrid control.) But what if the XML data is more hierarchical and in a less tabular
format? Consider a company-wide phone book, which is recursively structured into branches and departments, subdepartments, and so forth. How can this XML
data, which can have any number of nodes and any level of children, be displayed and edited through a web page?
In this article we will build a web page that displays the contents of a company-wide phone book whose information is encoded in an XML file. The page
will recursively display the phone book XML data using a TreeView to list the branches and departments and a ListView to enumerate the employees that
belong to the selected branch or department. In particular, the ListView will display the employees that belong to the selected branch or department
as well as all the employees that belong to any subdepartments. (In a future article we will look at how to extend the ListView to enable the user
to add, edit, and delete phone book entries.)
Read on to learn more!
Read More >
Source: 4GuysFromRolla SharePoint Applied—Stsadm Is Your Friend 22 Apr 2008 21:31 GMTI am a self-confessed command line junkie. Sure, I see value in GUIs—and they're great for getting accustomed to a tool—but after crawling, the command line lets you walk, run, and then fly!
Source: DevX Examining ASP.NET's Membership, Roles, and Profile - Part 10 16 Apr 2008 00:00 GMT
The Membership system automatically tracks the last
date and time each user's account has been accessed. With the SqlMembershipProvider, this information is
stored in the aspnet_Users database table in a datetime column named LastActivityDate. This
column is automatically updated to the current UTC date and time whenever a user
logs into the site, whenever their user account information is updated, and whenever their user account information is retrieved.
In addition to tracking each user's last activity date and time, the Membership system includes a method named
GetNumberOfUsersOnline.
This method returns the number of users whose last activity date and time is within a specified window; by default, this method returns the number of
users whose aspnet_Users.LastActivityDate value falls within the last 15 minutes.
This article, the tenth installment of a multipart article series on ASP.NET's Membership, Roles, and Profile systems, examines
the GetNumberOfUsersOnline method and see how to extend the Membership system to include additional user
activity information. Specifically, we will add a new table to the database used by the SqlMembershipProvider that associates a description
of each user's current action. We will then update our ASP.NET pages to update the records in this table to include a description of the user's
current action. For example, when visiting the home page we may use the description, "Viewing the home page." Finally, we will create a web page that displays
the list of currently logged on users and their last known action. Read on to learn more!
Read More >
Source: 4GuysFromRolla Live from the Web! Bring the Windows Live Messenger Experience to Your Web Applications 10 Apr 2008 01:46 GMTThe collective features of the Windows Live Messenger IM Control, the Windows Live Messenger Presence API, and the Windows Live Messenger Library go beyond the simplicity of a chat application, making it possible to embrace this new era of social networking by leveraging a built-in Windows Live network within any web application.
Source: DevX Creating an Online Boggle Solver :: Solving the Puzzle 09 Apr 2008 00:00 GMT
My family enjoys playing games and one of our favorites is Boggle, an addictive word game where players attempt to find as many words in a 4x4 grid of
letters. At the end of a game, players are left wondering whether there were any unearthed words. To answer this question once and for all, I created an
online Boggle solver using ASP.NET version 3.5.
This article is the second installment in a two-part series. Last week's article, Building
the User Interface, examined the Boggle solver web page's user interface, which consists of 16 TextBox Web controls arranged in a 4x4 grid and three
Button Web controls for solving the user-entered puzzle, solving a randomly-generated puzzle, and clearing the board. A ListView control is used to display
the solutions in a three-column HTML <table>. The user interface also included a handful of JavaScript functions to ease entering the
board data.
This second and final installment details the code used to solve the puzzle. Solving the puzzle requires having a dictionary of legal words and objects
that mirror the structure and functionality of the board and of solutions. These objects are implemented as classes that include internal data structures
that use a number of features in the .NET Framework, including: Generics; automatic properties; and caching. The complete source code is available for
download at the end of the article.
Try out the live demo or read on to learn more!
Read More >
Source: 4GuysFromRolla