I am using SPD, and modified dispform.aspx and I have added 1
paramater as mentioned below
<ParameterBinding Name="ListItemId" Location="QueryString
(ID)" DefaultValue="0"/>
Then added following variables
<xsl:param name="ListItemId"/>
<xsl:variable name="RedirectLocNext">DispForm.aspx?ID=<xsl:value-of
select="$ListItemId+1"/></xsl:variable>
<xsl:variable name="RedirectLocBack">DispForm.aspx?ID=<xsl:value-of
select="$ListItemId -1"/></xsl:variable>
Then I have added 2 buttons with following properties
<input name="Button1"
type="button" value="Back" onclick="javascript:
{ddwrt:GenFireServerEvent(concat('__redirect=
{',$RedirectLocBack,'}'))}"/>
<input name="Button2"
type="button" value="Next" onclick="javascript:
{ddwrt:GenFireServerEvent(concat('__redirect=
{',$RedirectLocNext,'}'))}"/>
Back and Next record navigation works perfect till if any listtem id
is missing in sequence like if you are navigating listitem from
77,78,80,81,82, now as listitem id 79 is missing it gives you error,
becoz this item either deleted or it is not there.
Can anyone tell me how do I handle this situtation?