Tuesday, April 8, 2008

Escape Characters in .net calling readviewentries in Domino

One of our applications is written in .net and calls some Lotus Notes databases using the very helpful ?readviewentries command.

The issue is that, by default, readviewentries returns the number of entries specified by a value in the server doc. For one of our customers, this was creating an issue, since they need to return 200 entries.

We store the URL to retrieve the values in a .net application config file. So, we simply wanted to update our ?readviewentries call to include the &count=200 value.

Here was our original entry:
http://stsample.instant-tech.com/itsample.nsf/lcspendingconversion?readviewentries" />

This was our first try (which of course fails since we need to escape out the ampersand)

After escaping the ampersand with amp; the new key is something that looks like:


Problem solved...