"SuccessMessage" does not exist in the current context

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
kirondedshem
User
Posts: 642

"SuccessMessage" does not exist in the current context

Post by kirondedshem »

I am trying to add another success message after arecord is inserted so am doing something as seen in examples of help menu like
public void Row_Inserted(Dictionary<string, object> rsold, Dictionary<string, object> rsnew) {
SuccessMessage = "Record Inserted";
}

BUT after generating all scripts when i try to compile the project in visual studio but the "SuccessMessage" is not in the scope anymore.

NOTE: CancelMessage still exists in this context, but i cant find WarningMessage,FailureMessage,SuccessMessage in this context BUT I can still access all these when am in events like page_load

ANOTHER QUESTION:
How would I set any of these messages during Row_Inserted event such that adding my message ie SuccessMessage does not overide existing success message, eg writing the following code
public void Row_Inserted(Dictionary<string, object> rsold, Dictionary<string, object> rsnew) {
SuccessMessage = "Record Inserted");
}

I want after it return to the list page two success mesage are shown, one for deafult addsuccess message, another is my "Record Inserted" message. Basically wat fucntion can i call to add a new meesage to the stack something like AddSuccessMessage, AddWarningMessage etc.


Webmaster
User
Posts: 9427

Post by Webmaster »

Try:

CurrentPage.SuccessMessage = "...";


kirondedshem
User
Posts: 642

Post by kirondedshem »

thanks it works, you can use it as below
CurrentPage.SuccessMessage = "My Other Message";
CurrentPage.WarningMessage = "My Other Message";
CurrentPage.FailureMessage = "My Other Message";


Post Reply