this is the aspx.cs page i want to hit the callme() method through ajax call
public void callme()
{
if (ddlApprovalType.SelectedValue == "1") // location
{
BindDropdownlist(ddlLocation, "LOC");// LOC = Location
}
else if (ddlApprovalType.SelectedValue == "2") // process
{
BindDropdownlist(ddlLocation, "LOC");// LOC = Location
ddlProcess.Items.Clear();
ddlSubProcess.Items.Clear();
ddlProcess.Items.Insert(0, new ListItem()
{
Value = "select",
Text = "---Select---",
Selected = true
});
ddlSubProcess.Items.Insert(0, new ListItem()
{
Value = "select",
Text = "---Select---",
Selected = true
});
}
}
this is my .aspx page
<asp:DropDownList runat="server" ID="ddlApprovalType" AutoPostBack="True" class="clsapprovalType" Style="font-family: arial;
font-size: 13px; color: #353535; width: 200px; border: solid 1px #353535; background-color: transparent;" />
<script type="text/javascript">
$(".clsapprovalType").change(function () {
var approvalTypeVal = $j(this).val();
if (approvalTypeVal == "1") {
("#trlocation").show();
}
$.ajax({url:'mypage.aspx/callme', method:get});
});
</script>
how to hit callme() method through $.ajax in asp.net using jquery without using update panel?