Handling Articles and Categories for an ASP.NET AJAX Client-Centric Wiki Application - Why is it More Challenging?
(Page 4 of 4 )
Here the "challenging" maybe only aims at me. Anyway, let me point out the challenge in dealing with the XML data.
The first challenge lies in the path. In my experiment, as you may expect, I created a folder under the App_Data folder to store all the .xml files and the .xsl template files, but I failed in rendering the XML data in the client side—nothing about the XML data appears. Why? Regrettably, it’s just for this reason that I had to put all the .xml and .xsl files under the root folder.
The second challenge lies in refreshing the XML data. When I clicked the Reply button to post comments to the current article I could not find the proper means to immediately refresh the posted data, provided that I used MS AJAX client-side controls XsltView and XmlDataSource. However, as far as I know, we can use ASP.NET 2.0 XML and XmlDataSource controls or leverage the "original" AJAX techniques to gain our ends. Thus, although I put a "refresh" link on the page, the refreshing could not happen, and so I commented out all the related code just for your reference.
Finally, as has been implemented before, when the user clicks the Reply button to add some comments to the current article he should be logged in, or else he will be sent back to the 'login.aspx’ page.
Write a New Article Using the Original AJAX Technique
At the top and bottom parts of the aforementioned MsgList.aspx page there have been put two ‘Write a New Post’ hyperlinks. When you click either hyperlink (in fact the two have exactly the same function for the users’ convenience) and you are a valid user, you will be navigated to the ‘SendMsg.aspx’ page where you can post your own new article. The following Figure 12 shows the design-time snapshot of this page.
Figure 12—the design-time snapshot for writing a new article.

Some readers may ask: why do you use the original AJAX technique to write a new article? The answer is that I have to. Unlike the MS AJAX client-side control DataSource that provides the load and save operation, the XMLDataSource control has supplied us with only a load method, which means we can only read the XML data from the client side. However, in this case, since we want to write the XML data back to the server side we have to fall back on the original AJAX technique—to manually send back the XML data to the server side still, but in the AJAX way. Next, we will delve into them from the client side and the server side, respectively.
Please check back tomorrow for the conclusion to this article.
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |