I'm trying to call a WebMethod (GetData()) for a control in a web page using javascript.
<script type="text/javascript">
$(document).ready(function () {
//this selector needs fixed
$('<%= Control1.ClientID %>').GetData();
});
</script>
<tel:RadScriptManager ID="RadScriptManager1" runat="server" />
<tel:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
<uc1:Control ID="Control1" runat="server" />
</tel:RadAjaxPanel>
The uc:Control code:
[WebMethod()]
[ScriptMethod()]
protected void GetData()
{
//stuff happens here
}
I can't figure out what kind of selector to use. I have multiple controls on the page, and i want to call them at different times. What kind of selector or what command do I use to run this WebMethod?