StrSaveText = "Saving...";
try
{
bool BlResult = await SaveData.SaveDeclaration(aProperty);
if (BlResult == true)
{
StrSaveText = "Saved";
}
else {
StrSaveText = "Couldn't save!";
}
}
catch (Exception e)
{
StrSaveText = "Couldn't save!";
}
I need some help as to why the above code works as it does.
I use the string "StrSaveText" in blazor, to update the text of a save-button. Guessing this is all down to C#: the variable StrSaveText never updates after I set it on the first line. If I step through code with breakpoints it hits the lines that
should update the variable, but this is never reflected on the button text, that should show the new text. Why is this?