Saturday 10 September 2011

Thursday 8 September 2011

Using a Form tag or Panel to handle Submit on pressing Enter

If you need to submit a form when the enter key is pressed there are a couple of simple options.

There is a property on both the Form Tag, and an ASP Panel called 'DefaultButton' simply specifying the ID of the button in this property will fire the button click when the enter key is pressed whilst in that container.

Tuesday 6 September 2011

Show label on ReportViewer report based on whether its the last page

If you need to show a field on a Reportviewer report based on whether its the last page of the report or no (eg Totals etc) then it can be achieved with the following code:

To Show on Last page should be:


To Show on All pages but the last should be:

Show Page X of Y in ReportViewer Footer

if you need to show the current page and total page count on a ReportViewer report it can be achieved with the following expression: