Click here to Skip to main content
15,886,199 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralAdvertisement Pin
Not Active20-Feb-10 3:55
mentorNot Active20-Feb-10 3:55 
GeneralMessage Removed Pin
20-Feb-10 11:31
Grant_Briggs20-Feb-10 11:31 
GeneralRe: Advertisement Pin
Not Active20-Feb-10 12:34
mentorNot Active20-Feb-10 12:34 
GeneralMessage Removed Pin
20-Feb-10 14:01
Grant_Briggs20-Feb-10 14:01 
GeneralRe: Advertisement Pin
Not Active20-Feb-10 14:14
mentorNot Active20-Feb-10 14:14 
Questionajax autocomplete extender control Pin
MallikarjunaGupta20-Feb-10 3:02
MallikarjunaGupta20-Feb-10 3:02 
AnswerRe: ajax autocomplete extender control Pin
Not Active20-Feb-10 3:24
mentorNot Active20-Feb-10 3:24 
GeneralRe: ajax autocomplete extender control Pin
MallikarjunaGupta20-Feb-10 3:29
MallikarjunaGupta20-Feb-10 3:29 
In aspx page
I am trying like this this is not functioning.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %>



<title>Untitled Page




<asp:scriptmanager id="ScriptManager1" enablepagemethods="true" runat="server">
<services>
<asp:servicereference path="MyAutocompleteService.asmx">


<asp:textbox id="TextBox1" runat="server">
<asp:listbox id="lstMails" visible="True" runat="Server">
<cc1:autocompleteextender id="AutoCompleteExtender1" runat="server" servicepath="MyAutocompleteService.asmx"
="" servicemethod="GetLisBox" targetcontrolid="TextBox1" minimumprefixlength="1" completioninterval="10" enablecaching="true" completionsetcount="12" completionlistcssclass="AutoExtender" completionlistitemcssclass="AutoExtenderList" completionlisthighlighteditemcssclass="AutoExtenderHighlight" completionlistelementid="lstMails">






In WedbService

using System;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Collections.Generic;
using System.Xml;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Web.UI.WebControls;
///
/// Summary description for MyAutocompleteService
///

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.Web.Script.Services.ScriptService]
public class MyAutocompleteService : System.Web.Services.WebService
{

public MyAutocompleteService()
{

//Uncomment the following line if using designed components
//InitializeComponent();
}
public ListBox GetLisBox(string prefixText, int count)
{
ListBox lstEmail = new ListBox();
DataSet ds = new DataSet();
string conString = ConfigurationManager.ConnectionStrings["SqlOpenRopes"].ToString();
SqlConnection con = new SqlConnection(conString);
con.Open();
SqlDataAdapter da;
SqlCommand sqlCmd = new SqlCommand();
sqlCmd = new SqlCommand("SELECT ReservationId,Email FROM Reservations where email !='' AND Email Like '" + prefixText + "%'", con);
da = new SqlDataAdapter(sqlCmd);
da.Fill(ds);
if (ds != null)
{
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
ListItem lItem = new ListItem();
lItem.Text = ds.Tables[0].Rows[i]["Email"].ToString();
lItem.Value = ds.Tables[0].Rows[i]["ReservationId"].ToString();
lstEmail.Items.Add(lItem);
}
}
con.Close();
//for (int i = 0; i < count; i++)
// responses.Add(prefixText + (char)(i + 65));

return lstEmail;
}
}
GeneralRe: ajax autocomplete extender control Pin
Not Active20-Feb-10 3:33
mentorNot Active20-Feb-10 3:33 
GeneralRe: ajax autocomplete extender control Pin
MallikarjunaGupta20-Feb-10 3:39
MallikarjunaGupta20-Feb-10 3:39 
GeneralRe: ajax autocomplete extender control Pin
Not Active20-Feb-10 3:53
mentorNot Active20-Feb-10 3:53 
AnswerIGNORE REPORT Pin
Not Active20-Feb-10 3:34
mentorNot Active20-Feb-10 3:34 
Questionajax AutoCompleteExtender is not working Pin
MallikarjunaGupta20-Feb-10 1:09
MallikarjunaGupta20-Feb-10 1:09 
AnswerRe: ajax AutoCompleteExtender is not working Pin
s.mn20-Feb-10 1:39
s.mn20-Feb-10 1:39 
AnswerRe: ajax AutoCompleteExtender is not working Pin
Not Active20-Feb-10 3:23
mentorNot Active20-Feb-10 3:23 
Questionhow to get automatic no in alpha numeric no from database Pin
developerit20-Feb-10 0:21
developerit20-Feb-10 0:21 
AnswerRe: how to get automatic no in alpha numeric no from database Pin
CoderOnline20-Feb-10 1:02
CoderOnline20-Feb-10 1:02 
AnswerRe: how to get automatic no in alpha numeric no from database Pin
Bajrang Singh20-Feb-10 1:13
Bajrang Singh20-Feb-10 1:13 
QuestionWeb Application Pin
vipinsethumadhavan19-Feb-10 21:58
vipinsethumadhavan19-Feb-10 21:58 
AnswerRe: Web Application Pin
Chetan Patel19-Feb-10 23:06
Chetan Patel19-Feb-10 23:06 
AnswerRe: Web Application Pin
Abhijit Jana19-Feb-10 23:09
professionalAbhijit Jana19-Feb-10 23:09 
AnswerRe: Web Application Pin
sashidhar19-Feb-10 23:50
sashidhar19-Feb-10 23:50 
QuestionProblem loading stylesheet Pin
anushh19-Feb-10 21:14
anushh19-Feb-10 21:14 
AnswerRe: Problem loading stylesheet Pin
R. Giskard Reventlov20-Feb-10 0:03
R. Giskard Reventlov20-Feb-10 0:03 
GeneralRe: Problem loading stylesheet Pin
anushh24-Feb-10 14:55
anushh24-Feb-10 14:55 

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.