Click here to Skip to main content
15,890,579 members
Home / Discussions / C#
   

C#

 
AnswerRe: Property is IEnumerable Pin
moon_stick20-Mar-09 2:29
moon_stick20-Mar-09 2:29 
GeneralRe: Property is IEnumerable Pin
Adriaan Davel20-Mar-09 3:50
Adriaan Davel20-Mar-09 3:50 
GeneralRe: Property is IEnumerable Pin
moon_stick20-Mar-09 4:13
moon_stick20-Mar-09 4:13 
GeneralRe: Property is IEnumerable Pin
Adriaan Davel20-Mar-09 4:43
Adriaan Davel20-Mar-09 4:43 
QuestionAdding an icon to my control library ! Pin
Mohammad Dayyan20-Mar-09 1:34
Mohammad Dayyan20-Mar-09 1:34 
AnswerRe: Adding an icon to my control library ! Pin
DaveyM6920-Mar-09 2:00
professionalDaveyM6920-Mar-09 2:00 
GeneralRe: Adding an icon to my control library ! Pin
Mohammad Dayyan20-Mar-09 17:39
Mohammad Dayyan20-Mar-09 17:39 
QuestionAjax autocomplete in asp.net Pin
gopinathtamil20-Mar-09 0:56
gopinathtamil20-Mar-09 0:56 
The below code is i tryed for ajax auto complete on my site..


plz say if their is any bugs...


default2.aspx



]]>





<title>


function IAmSelected(source, eventArgs) {
alert(" Key : " + eventArgs.get_text() + " Value : " + eventArgs.get_value());
}






<asp:scriptmanager id="ScriptManager1" runat="server" xmlns:asp="#unknown">
<services>
<asp:servicereference path="~/WebService.asmx">


<asp:textbox id="TextBox1" runat="server" xmlns:asp="#unknown">
<ajaxtoolkit:autocompleteextender id="AutoCompleteExtender1" runat="server" onclientitemselected="IAmSelected" xmlns:ajaxtoolkit="#unknown">
BehaviorID="AutoCompleteEx" TargetControlID="TextBox1" ServicePath="WebService.asmx" MinimumPrefixLength="3" EnableCaching="true" ServiceMethod="GetCompletionList">







autocomplete.cs

using System;

using System.Collections.Generic;

using System.Web.Services;

using System.Data;

using System.Data.SqlClient;

using System.Web.Script.Services;

///
/// Summary description for WebService
///

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
// [System.Web.Script.Services.ScriptService]
public class WebService : System.Web.Services.WebService
{

public WebService () {

//Uncomment the following line if using designed components
//InitializeComponent();
}

[WebMethod]
public string[] GetCompletionList(string prefixText)

{

{

string sql = "select Aname From Pincode Where Aname like @prefixText";

SqlDataAdapter da = new SqlDataAdapter(sql, "Server=sql346.mysite4now.com;uid=aitts_85478;password=aitts;database=aitts_85478");

da.SelectCommand.Parameters.Add("@prefixText", SqlDbType.VarChar, 50).Value = prefixText + "%";

DataTable dt = new DataTable();

da.Fill(dt);

// List<string> items = new List<string>();

string[] items = new string[dt.Rows.Count];

int i = 0;

foreach (DataRow dr in dt.Rows)

{

items.SetValue(dr["Aname"].ToString(), i);

//items.Add(dr["Location_Name"].ToString());

i++;

}

// return items.ToArray();

return items;

}

}

}

webservice.asmx

]]>

its not working for me....
AnswerRe: Ajax autocomplete in asp.net Pin
Michael Bookatz20-Mar-09 1:11
Michael Bookatz20-Mar-09 1:11 
QuestionText and image on ListBox Pin
CodingLover20-Mar-09 0:48
CodingLover20-Mar-09 0:48 
AnswerRe: Text and image on ListBox Pin
DaveyM6920-Mar-09 0:56
professionalDaveyM6920-Mar-09 0:56 
QuestionRe: Text and image on ListBox Pin
CodingLover20-Mar-09 1:01
CodingLover20-Mar-09 1:01 
AnswerRe: Text and image on ListBox Pin
DaveyM6920-Mar-09 1:39
professionalDaveyM6920-Mar-09 1:39 
QuestionConfiguration file for data inputs. Pin
AksharRoop20-Mar-09 0:36
AksharRoop20-Mar-09 0:36 
AnswerRe: Configuration file for data inputs. Pin
DaveyM6920-Mar-09 1:01
professionalDaveyM6920-Mar-09 1:01 
AnswerRe: Configuration file for data inputs. Pin
Simon P Stevens20-Mar-09 1:01
Simon P Stevens20-Mar-09 1:01 
QuestionHow to handle Idle loop processing for windows CE application Pin
saksp20-Mar-09 0:00
saksp20-Mar-09 0:00 
AnswerRe: How to handle Idle loop processing for windows CE application Pin
Eddy Vluggen20-Mar-09 2:41
professionalEddy Vluggen20-Mar-09 2:41 
AnswerRe: How to handle Idle loop processing for windows CE application Pin
Alan N20-Mar-09 3:34
Alan N20-Mar-09 3:34 
QuestionWinForms DataGridView Alternative Pin
MatthysDT19-Mar-09 23:27
MatthysDT19-Mar-09 23:27 
AnswerRe: WinForms DataGridView Alternative Pin
Michael Bookatz20-Mar-09 1:15
Michael Bookatz20-Mar-09 1:15 
GeneralRe: WinForms DataGridView Alternative Pin
MatthysDT20-Mar-09 3:44
MatthysDT20-Mar-09 3:44 
QuestionHooking MessageBox YES/NO button Text Pin
lalmama19-Mar-09 23:19
lalmama19-Mar-09 23:19 
AnswerRe: Hooking MessageBox YES/NO button Text Pin
Eddy Vluggen20-Mar-09 2:14
professionalEddy Vluggen20-Mar-09 2:14 
QuestionRead 2D || QR Barcode from Compact Framework Pin
Tyler4519-Mar-09 22:43
Tyler4519-Mar-09 22:43 

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.