Click here to Skip to main content
15,903,203 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
when a new row inserted or record updated in Database.... How will system find that a new record is created or an older record is updated in database??
Posted
Updated 18-May-14 23:44pm
v3
Comments
DamithSL 19-May-14 5:41am    
Improve question with your code
A.R Farooqui 19-May-14 5:46am    
and whats that code should be???
A.R Farooqui 20-May-14 0:53am    
actually i dont have code ... thats what i am searching for... should i use timer and update page after a fix time .. but this will create extra load on my web

There are many ways to display messages...

1. Using Session("SuccessMsg") = "Data Inserted Successfully." and using this session to your label.text.

2. Using Javascript alert("Data Inserted Successfully") using register startup script : Registerstartupscript-vs

3. Display Alert Message
 
Share this answer
 
Comments
A.R Farooqui 19-May-14 5:36am    
hey thanx Kaushal for your reply.... Actually Issue is not to show the message... issue is, how system find that a new row is inserted or any row is updated in a table in database???
//query
C#
int a = cmd.ExecuteNonQuery();
If(a>0)
{
ScriptManager.RegisterStartupScript(this, GetType(), "message", 
        "alert('Data Inserted Successfully');", true);
}
else 
{

ScriptManager.RegisterStartupScript(this, GetType(), "message", 
        "alert('Error');", true);
}
 
Share this answer
 
Comments
KaushalJB 19-May-14 5:49am    
Yeah tats good and simple solution..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900