积极答复者
如何实现邮件地址自动填充

问题
答案
-
恩。谢谢。不过这两个链接的内容对我这样的初学者没有太大的意义。我是想在短期内实现这个效果的,没有太多时间去研究。
新人一枚。。这样,我从CodePlex下载一个AutoComplete示例代码,改造了一下给你(源代码在:http://autocompletedotnet.codeplex.com/releases/72821/download/277587)。
1)项目结构:
2)关键代码:
namespace AspNetAutoComplete
{
public class CountriesRepository
{
public IEnumerable<Country> GetCountriesStartingWith(string startsWith)
{
List<Country> strings = new List<Country>();
strings.Add(new Country { Name = startsWith + "@163.com" });
strings.Add(new Country { Name = startsWith + "@126.com" });
strings.Add(new Country { Name = startsWith + "@qq.com" });
strings.Add(new Country { Name = startsWith + "@sohu.com" });
return strings;
}
}
}3)运行结果:
QQ我:
下载MSDN桌面工具(Vista,Win7)
我的博客园
慈善点击,点击此处
- 已编辑 ThankfulHeart 2012年1月30日 7:08
- 已标记为答案 大头老鼠 2012年1月30日 7:10
全部回复
-
試試看使用ASP.NET AJAX AutoComplete。
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/AutoComplete/AutoComplete.aspx
或是jQuery的AutoComplete。
http://jqueryui.com/demos/autocomplete/
以上說明若有錯誤請指教,謝謝。
http://www.dotblogs.com.tw/terrychuang/ -
恩。谢谢。不过这两个链接的内容对我这样的初学者没有太大的意义。我是想在短期内实现这个效果的,没有太多时间去研究。
新人一枚。。这样,我从CodePlex下载一个AutoComplete示例代码,改造了一下给你(源代码在:http://autocompletedotnet.codeplex.com/releases/72821/download/277587)。
1)项目结构:
2)关键代码:
namespace AspNetAutoComplete
{
public class CountriesRepository
{
public IEnumerable<Country> GetCountriesStartingWith(string startsWith)
{
List<Country> strings = new List<Country>();
strings.Add(new Country { Name = startsWith + "@163.com" });
strings.Add(new Country { Name = startsWith + "@126.com" });
strings.Add(new Country { Name = startsWith + "@qq.com" });
strings.Add(new Country { Name = startsWith + "@sohu.com" });
return strings;
}
}
}3)运行结果:
QQ我:
下载MSDN桌面工具(Vista,Win7)
我的博客园
慈善点击,点击此处
- 已编辑 ThankfulHeart 2012年1月30日 7:08
- 已标记为答案 大头老鼠 2012年1月30日 7:10