Gridview rowupdating error
Note the message at the top of the page, "The product Chang has been updated." This message remains on the screen until the user updates or deletes another product.
The message remains as the user pages or sorts the grid.
This change of the Label's property to Red is remembered across postbacks.
Therefore, unless it is explicitly set back to Black subsequent messages will be displayed in a red font.
The following screenshot shows the message after Aniseed Syrup has been updated with an appropriate price value.
Note how the message "The product Aniseed Syrup has been updated" is displayed in a red font.
At this point, the grid has been sorted and paged a number of times, yet the "The product Chang has been updated" message remains at the top of the screen.
There are two simple and straightforward techniques at our disposal for implementing such functionality. From the Grid View the user can page, sort, edit, and delete products.
This article examines these two approaches and includes a working demo available for download that highlights both approaches. On this page we would like to display a message when certain events transpire.
Likewise, there would be messages displayed for inserting a new record and messages displayed in the event of an error.
Such messages are typically displayed using a single Label Web control.