Ajax PageMethods in asp.net
<script type="text/Javascript">
function CallPageMethod()
{
var sDate= document.getElementById('<%=txtSDate.ClientID%>').value;
var eDate=document.getElementById('<%=txtEDate.ClientID%>').value;
PageMethods.GetValue(sDate, eDate);
var eDate=document.getElementById('<%=txtEDate.ClientID%>').value;
PageMethods.GetValue(sDate, eDate);
}
</script>
</script>
.aspx.cs
[WebMethod]
public void GetValue(DateTime dtsDate,DateTime dtEDate)
{
Cert.StartDate = dtsDate;
Cert.EndDate = dtEDate;
}
public void GetValue(DateTime dtsDate,DateTime dtEDate)
{
Cert.StartDate = dtsDate;
Cert.EndDate = dtEDate;
}
No comments:
Post a Comment
Comments