Click here to Skip to main content
15,885,365 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Creating Textboxes Dynamically Pin
n.podbielski28-Sep-12 1:12
n.podbielski28-Sep-12 1:12 
AnswerRe: Creating Textboxes Dynamically Pin
RichardGrimmer28-Sep-12 4:11
RichardGrimmer28-Sep-12 4:11 
Questionasp.net web form or asp.net mvc ?? Pin
Mohamad Shahmardan22-Sep-12 13:04
Mohamad Shahmardan22-Sep-12 13:04 
AnswerRe: asp.net web form or asp.net mvc ?? Pin
Vani Kulkarni23-Sep-12 18:30
professionalVani Kulkarni23-Sep-12 18:30 
AnswerRe: asp.net web form or asp.net mvc ?? Pin
John-ph23-Sep-12 18:43
John-ph23-Sep-12 18:43 
GeneralRe: asp.net web form or asp.net mvc ?? Pin
Mohamad Shahmardan24-Sep-12 3:06
Mohamad Shahmardan24-Sep-12 3:06 
GeneralRe: asp.net web form or asp.net mvc ?? Pin
n.podbielski28-Sep-12 1:13
n.podbielski28-Sep-12 1:13 
Questionjquery ui autocomplete Pin
lokesh.developer21-Sep-12 18:19
lokesh.developer21-Sep-12 18:19 
Help me
I am using jquery ui autocomplete but it's not working

i write this code

web page
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<link href="./Script/jquery-ui-1.8.1.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="./Script/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="./Script/jquery-ui-1.8.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("tbAuto").autocomplete({
source: function(request, response){
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "WebService.asmx/getDepartementName",
data: "{'Name':'" + request.term +"'}",
dataType: "json",
async: true,
success: function(data){
response(data.d);
},
error: function(result){
alert(result);
}
});
},
minLength: 1
});
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div class="demo">
<div class="ui-widget">
<label for="tbAuto">department name :<asp:TextBox ID="tbAuto" runat="server"></asp:TextBox> </label>
</div>
</div>
</form>
</body>
</html>

web service -

Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Data
Imports System.Data.OleDb
Imports System.Web.Script.Services
Imports System.Collections.Generic

<ScriptService()> _
<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class WebService
Inherits System.Web.Services.WebService
Dim con As New dbConnection
Dim da As OleDbDataAdapter
Dim tempDT As New DataTable
Dim SQL As String
Dim rows, i As Integer
Dim DepNames As New List(Of String)

<WebMethod()> _
Public Function getDepartementName(ByVal prefixText As String) As String()
Try
con.connect()
SQL = "select DEPARTMENT_NAME from TBLDEPARTMENT_1 where upper(DEPARTMENT_NAME) like upper('%" & prefixText & "%')"
da = New OleDbDataAdapter(SQL, con.con)
da.Fill(tempDT)
rows = tempDT.Rows.Count
If rows > 0 Then
For i = 0 To rows - 1
DepNames.Add(tempDT.Rows(i)(0))
Next
End If
Return DepNames.ToArray()
Catch ex As Exception
Throw ex
End Try
End Function

this webservice is works with ajax autocomplete extender but not with jquery
this not gives any error and not call webservice method.

thanks
AnswerRe: jquery ui autocomplete Pin
Sandeep Mewara21-Sep-12 19:34
mveSandeep Mewara21-Sep-12 19:34 
AnswerRe: jquery ui autocomplete Pin
jkirkerx22-Sep-12 14:03
professionaljkirkerx22-Sep-12 14:03 
AnswerRe: jquery ui autocomplete Pin
n.podbielski28-Sep-12 1:17
n.podbielski28-Sep-12 1:17 
QuestionHow to put line numbers in Textbox with multiline Pin
vinay_sinha21-Sep-12 2:28
vinay_sinha21-Sep-12 2:28 
AnswerRe: How to put line numbers in Textbox with multiline Pin
Shameel21-Sep-12 3:08
professionalShameel21-Sep-12 3:08 
AnswerRe: How to put line numbers in Textbox with multiline Pin
Sandeep Mewara21-Sep-12 6:28
mveSandeep Mewara21-Sep-12 6:28 
GeneralRe: How to put line numbers in Textbox with multiline Pin
vinay_sinha23-Sep-12 21:01
vinay_sinha23-Sep-12 21:01 
QuestionWCF / Single instance / multple concurrency question Pin
Luca Dominici20-Sep-12 5:58
Luca Dominici20-Sep-12 5:58 
AnswerRe: WCF / Single instance / multple concurrency question Pin
Expert Coming20-Sep-12 13:57
Expert Coming20-Sep-12 13:57 
GeneralRe: WCF / Single instance / multple concurrency question Pin
Luca Dominici20-Sep-12 21:36
Luca Dominici20-Sep-12 21:36 
GeneralRe: WCF / Single instance / multple concurrency question Pin
Expert Coming24-Sep-12 8:21
Expert Coming24-Sep-12 8:21 
GeneralRe: WCF / Single instance / multple concurrency question Pin
Luca Dominici24-Sep-12 21:10
Luca Dominici24-Sep-12 21:10 
QuestionAjax Tab Events And Gridview help Pin
HimalR820-Sep-12 1:57
HimalR820-Sep-12 1:57 
AnswerRe: Ajax Tab Events And Gridview help Pin
jkirkerx21-Sep-12 10:52
professionaljkirkerx21-Sep-12 10:52 
GeneralRe: Ajax Tab Events And Gridview help Pin
HimalR825-Sep-12 11:42
HimalR825-Sep-12 11:42 
GeneralRe: Ajax Tab Events And Gridview help Pin
jkirkerx25-Sep-12 12:53
professionaljkirkerx25-Sep-12 12:53 
QuestionMVC v MVVM Pin
eddieangel19-Sep-12 12:22
eddieangel19-Sep-12 12:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.