Jan 03, 2013, 11:17 AM
function is not calling Directmethod
In my code I am not able to Call directMethod from the javascript function
Below is my code
Below is my code
protected void Submit(object sender, DirectEventArgs e)
{
id = Convert.ToInt32(e.ExtraParams["Id"]);
objTemp.ProjectID = id;
if (e.ExtraParams["command"] == "Delete")
{
X.Msg.Confirm("Confirm", "Are you sure you want to do that?", new JFunction { Fn = "showResult" }).Show();
//objTemp.Delete();
//BindGrid();
//ProjectStore.DataBind();
}
else
{
//For edit
}
Function var showResult= function (btn)
{
if(btn=='yes')
{
//Ext.Msg.notify("Button Click", "You clicked the " + btn + " button");
Ext.net.DirectMethods.CommitDelete();
}
};
Directmethod [DirectMethod()]
public void CommitDelete()
{
//objTemp.ProjectID = id;
//this.Label1.Text = DateTime.Now.ToLongTimeString();
objTemp.Delete();
BindGrid();
ProjectStore.DataBind();
}
Now javascript function is not calling this Directmethod
Last edited by Vaishali; Jan 03, 2013 at 11:21 AM.