I saw a couple of similar questions on the same topic, but none of them addressed my issue.
I've got a asp.net website, and want to show a status message (asp:label that will disappear in 5 seconds) to the user after the database was updated.
I want to assign the text to the label, and then hide it with Javascript.
I got the js part sorted out, the only problem is how do I call js function after I assigned the text to the control?
let's say i'm updating something in the database with following code:
<asp:Button ID="btnUploadFiles" runat="server" OnClick="buttonSubmit_Click" Text="Update" />
Code behind
protected void buttonSubmit_Click(object sender, EventArgs e)
{ try{// update the database
// change label text to tell the user update succeeded}
catch(Exception ex){...}
}
please help!
UPDATE: no jquery please, just plain javascript