13.07.2015 Views

Applied XML Programming for Microsoft .NET.pdf - Csbdu.in

Applied XML Programming for Microsoft .NET.pdf - Csbdu.in

Applied XML Programming for Microsoft .NET.pdf - Csbdu.in

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

"SERVER=localhost;DATABASE=northw<strong>in</strong>d;UID=sa;");DataSet ds = new DataSet();adapter.Fill(ds);return ds.GetXml();}Figure 14-5 shows the sample page <strong>in</strong> action.Figure 14-5: The sample page now shows filtered data from the Customers table. The <strong>XML</strong>data has been carried us<strong>in</strong>g a hidden field.NoteAnother key technique you can use to refresh the page us<strong>in</strong>g clientsidedata leverages DHTML. Although this approach can beeffective and powerful, it doesn't comb<strong>in</strong>e well with managed code.DHTML refers to the page object model and is designed <strong>for</strong>script<strong>in</strong>g. The page object model is exposed as a suite of COMobjects, and driv<strong>in</strong>g it from with<strong>in</strong> managed code is certa<strong>in</strong>lypossible but not particularly easy.ConclusionUs<strong>in</strong>g <strong>XML</strong> data islands to import sensitive data <strong>in</strong>to HTML pages is a technique thatdeserves further <strong>in</strong>vestigation. Creat<strong>in</strong>g <strong>XML</strong> data islands is easier with ASP.<strong>NET</strong> butwas not rocket science even prior to the advent of the .<strong>NET</strong> Framework. Access<strong>in</strong>g thecontents of a data island on the client is still based on Javascript code, and there<strong>for</strong>e isnot a feature that has been affected by the .<strong>NET</strong> Framework. So what's the problemwith us<strong>in</strong>g <strong>XML</strong> and the .<strong>NET</strong> Framework on the client?The .<strong>NET</strong> Framework classes provide a far richer object model that has a lot to offer <strong>in</strong>terms of <strong>XML</strong> data manipulation, as we saw <strong>in</strong> Chapter 8, Chapter 9, and Chapter 10.Exploit<strong>in</strong>g this bounty of functions on the client is possible thanks to the browserdeployableW<strong>in</strong>dows Forms controls that we exam<strong>in</strong>ed <strong>in</strong> this chapter. Code that uses<strong>XML</strong> and the .<strong>NET</strong> Framework on the client, although based on ASP.<strong>NET</strong> code, is notInternet-oriented because it imposes two key restrictions on the client environment: the502

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!