Hi,
I'm using jQuery and setInterval method in my asp.net web application.
I call the webservice every 5 seconds in order to check for DB changes. When i see a change, i want to change the photo of the linkButton that located on the master page, but i can to that due to static constrains.
An object reference is required for the non-static field, method, or property 'System.Web.UI.Page.Master.get'
my c# code is:
[WebMethod()]
public static bool checkDBChange(string userId)
{
DBConnection dbConnection = new DBConnection();
if (dbConnection.isChanged(userId))
{
((Site1)Master).SetImageUrl = "~/Icons/a.ico";
}
return false;
}
The SetImageUrl is a setter in my master page that sets the new url to the linkButton.
Any idea how i can implement it?