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