Click here to Skip to main content
15,921,226 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to convert byte[] to Stream Pin
musefan20-Mar-09 4:51
musefan20-Mar-09 4:51 
AnswerRe: How to convert byte[] to Stream Pin
Luc Pattyn20-Mar-09 4:18
sitebuilderLuc Pattyn20-Mar-09 4:18 
GeneralMessage Removed Pin
20-Mar-09 4:46
professionalN_tro_P20-Mar-09 4:46 
GeneralRe: How to convert byte[] to Stream Pin
Luc Pattyn20-Mar-09 5:00
sitebuilderLuc Pattyn20-Mar-09 5:00 
AnswerRe: How to convert byte[] to Stream Pin
Fayu20-Mar-09 4:45
Fayu20-Mar-09 4:45 
GeneralMessage Removed Pin
20-Mar-09 4:49
professionalN_tro_P20-Mar-09 4:49 
GeneralRe: How to convert byte[] to Stream Pin
Fayu20-Mar-09 4:53
Fayu20-Mar-09 4:53 
QuestionRich text to canvas Pin
damichab20-Mar-09 3:29
damichab20-Mar-09 3:29 
AnswerRe: Rich text to canvas Pin
musefan20-Mar-09 3:54
musefan20-Mar-09 3:54 
GeneralRe: Rich text to canvas Pin
damichab20-Mar-09 4:04
damichab20-Mar-09 4:04 
GeneralRe: Rich text to canvas Pin
musefan20-Mar-09 4:08
musefan20-Mar-09 4:08 
GeneralRe: Rich text to canvas Pin
damichab20-Mar-09 4:22
damichab20-Mar-09 4:22 
QuestionLaunch Program and embed it or place it on a child form Pin
Wallbert Elicot20-Mar-09 1:46
Wallbert Elicot20-Mar-09 1:46 
AnswerRe: Launch Program and embed it or place it on a child form Pin
DaveyM6920-Mar-09 2:01
professionalDaveyM6920-Mar-09 2:01 
Questionopen existing excel file as a new document. [modified] Pin
amit_8320-Mar-09 1:45
amit_8320-Mar-09 1:45 
QuestionProperty is IEnumerable Pin
Adriaan Davel20-Mar-09 1:35
Adriaan Davel20-Mar-09 1:35 
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 

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.