hola a todos!!!
Resulta que hice un modulo donde cargo archivos y se los asigno a un usuario de mi sitio web, entonces tengo un label donde indico "ingrese el usuario a quien desee asignarle el archivo", seguidamente puse un textbox y le puse el extensor "autocomplete" , cree un web service, les escribo el codigo para q sepan la situacion:
-----------------------ESTE ES EL FORMULARIO-----------------
<div id="div4" style="display:block;">
<asp:Label ID="lbl_nom_usu" runat="server"
Text="Ingrese el nombre del usuario al cual se le asignara este documento:" Font-Underline="True"></asp:Label>
<asp:TextBox ID="txt_nom_usu" runat="server"></asp:TextBox>
<asp:AutoCompleteExtender ID="txt_nom_usu_AutoCompleteExtender" runat="server" MinimumPrefixLength="2" ServiceMethod="ObtListaUsuarios"
DelimiterCharacters="" Enabled="True" ServicePath="WebService_autocom.asmx" EnableCaching="true" CompletionSetCount="10"
TargetControlID="txt_nom_usu" CompletionInterval="100">
</asp:AutoCompleteExtender>
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Services>
<asp:ServiceReference Path="WebService_autocom.asmx" />
</Services>
</asp:ScriptManager>
</div>
--------------------------------------ESTE ES EL WEB SERVICE-------------------------------------------------
<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<System.Web.Script.Services.ScriptService()> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class WebService_autocom
Inherits System.Web.Services.WebService
<WebMethod()> _
Public Function ObtListaUsuarios(ByVal prefixText As String, ByVal count As Integer) As String()
Dim con As New SqlConnection(ConfigurationManager.ConnectionStrings("CorpocesarConnectionString").ConnectionString)
Dim comando As New SqlCommand("select Username from ca_Users where Username LIKE '%' + @param + '%' ", con)
comando.Parameters.AddWithValue("param", prefixText)
Dim dr As SqlDataReader
comando.Connection.Open()
dr = comando.ExecuteReader
Dim lista As New List(Of String)
While dr.Read
lista.Add(dr.Item("Username"))
End While
comando.Connection.Close()
Return lista.ToArray
End Function
End Class
-------------------------------------------------------------------------------------------------------------------------------------
RESULTA QUE DEPURO Y ME SALE EL SIGUIENTE ERROR EN EL NAVEGADOR
A critical error has occurred.
Object reference not set to an instance of an object.
y ME DI CUENTA Q ES POR EL SCRIPTMANAGER, PORQUE APENAS LO PONGO COMO COMENTARIO, SI ME SALE POR LO MENOS EL FORMULARIO, SI NO LO COMENTO ENTONCES ME SALE ESTE ERROR, AGRADEZCO LA PRONTA COLABORACION ESTOY VUELTA UN 8 CON ESOO :s :s :s :s