I was curious if there is a way to pass 3 values through an asp web service. I have the control working well with two values but I would like to add an additional value to pass. Everytime I try I get an error.
Here is my code.
Code Behind
Here is my code.
<script type="text/javascript"> function SelectedName(source, eventArgs) { var txt = eventArgs.get_text(); var val = eventArgs.get_value(); var radWidow = $find("<%= radDashboard.ClientID%>"); var textbox = document.getElementById("<%=txtSearch.ClientID%>"); if (val == '') { alert('You must pick a recruit from drop down list.'); } else { radWidow.show(); radWidow.maximize(); radWidow.setUrl("ManageProcessor.aspx?Pass=" + val); textbox.value = ''; } } </script> <link href="../Recuiting.css" rel="stylesheet" /> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="BodyContent" Runat="Server"> <telerik:RadAjaxPanel ID="radajax" runat="server"> <div style="width:auto"> <div class="dvGridWrapper"> <asp:HiddenField ID="HFRecruit" runat="server" /> <asp:TextBox ID="txtSearch" runat="server" Width="260px" ToolTip="Enter Last Name First Name"></asp:TextBox> <asp:TextBoxWatermarkExtender ID="txtSearch_WME" runat="server" TargetControlID="txtSearch" WatermarkText="Lookup Processor" WatermarkCssClass="Watermark"></asp:TextBoxWatermarkExtender> <asp:AutoCompleteExtender ID="txtSearchr_ACE" runat="server" TargetControlID="txtSearch" DelimiterCharacters="" Enabled="True" ServiceMethod="FindRecName" ServicePath="~/Recruiting.asmx" UseContextkey="true" MinimumPrefixLength="2" OnClientItemSelected="SelectedName" EnableCaching="true" CompletionInterval="1"></asp:AutoCompleteExtender>
Code Behind
<WebMethod()> _ Public Function FindRecName(ByVal prefixText As String, ByVal count As String) As String() Dim items As New List(Of String) sql = "select intRecruitID, intEnlistmentTypeID, strlastname + ' ' + strFirstname + ' ' + strMiddleName + ' (' + SUBSTRING(strssn, 6, 9) + ')' Name from Recruit where strLastName like '" & prefixText & "%' ORDER BY Name ASC" myDataTable = New DataTable myDataTable = getData(sql) If myDataTable.Rows.Count > 0 Then For Each dRow As DataRow In myDataTable.Rows items.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(dRow("Name"), dRow("intRecruitID"))) Next End If Return items.ToArray End Function