How to call void function (Non Static Method) in Static Method....
I have a function named drawmenu after saving by json(webmethod c#) it should be called...how is it possible ?? i want to refresh my menu list after saving without post back ....
Thanks
void drawMenu()
{
int i = 0;
string InnerHTML = "";
string str = select query
SqlDataAdapter sqladp = new SqlDataAdapter(str, Conn);
DataTable dt = new DataTable();
sqladp.Fill(dt);
for (i = 0; i < dt.Rows.Count; i++)
{
InnerHTML = my query data
}
divmenu.InnerHtml = InnerHTML;
}
DivMenu is my Div ...
[WebMethod]
public static string Update(string CAT_ID, string CAT_NAME, string DESCRIPTION, string PID)
{
var UID = int.Parse(CAT_ID);
var UPID = int.Parse(PID);
string retMessage = string.Empty;
DATABASE db = new DATABASE();
var empQuery = from t in CAT
where (t.CAT_ID == UID)
select t;
CAT obj = empQuery.Single();
obj.CAT_NAME = CAT_NAME;
obj.DESCRIPTION = DESCRIPTION;
obj.PID = UPID;
db.SaveChanges();
return retMessage;
}
now i want call my void function in Update(Static Method) .....=