Hi,
I have an asp.net application and I have used Ajax. I have implemented the function in code behind and calling in the javascript function during the form load time then it shows the "Object doesn't support this property or method " error. I have checked type of the function, it is correct and the same thing is working in the other page....I don't know the reason..
here is the function I implemented in the code behing
using Ajax;
- protected void Page_Load(object sender, EventArgs e)
-
{
-
-
-
Ajax.Utility.RegisterTypeForAjax(typeof(ProceedWorkflowExecution));
-
-
}
-
-
-
[Ajax.AjaxMethod(HttpSessionStateRequirement.ReadWrite)]
-
public void GetIncidentAttachment(int moduleRefId , int moduleTypeId)
-
{
-
-
IncidentWebService.IncidentService incident = new IncidentWebService.IncidentService();
-
-
DataSet ds = new DataSet();
-
-
try
-
{
-
string XmlPath = Server.MapPath(@"~/XML");
-
-
ds = Common.GenerateDataSet(incident.GetAttachmentsDetails(moduleRefId , moduleTypeId, 1));
-
-
if (ds.Tables.Count > 0)
-
{
-
ds.WriteXml(XmlPath + "/IncidentAttachments" + 1 + ".Xml");
-
}
-
-
}
-
catch (Exception ex)
-
{
-
throw ex;
-
}
-
finally
-
{
-
ds = null;
-
}
-
}
-
-
-
in the .aspx page
- <script language="javascript" type="text/javascript">
-
-
function GetAttachments()
-
{
-
debugger
-
try
-
{
-
var mid = '<%=Request.QueryString["mid"].ToString() %>';
-
var mtype = '<%=Request.QueryString["mtype"].ToString() %>';
-
-
-
ProceedWorkflowExecution.GetIncidentAttachment(mid , mtype);
-
-
-
-
}
-
catch (ex)
-
{
-
alert (ex);
-
}
-
}
-
-
GetAttachments();
-
-
-
</script>