<asp:TextBox ID="txtPatName" runat="server" AutoPostBack="True" CssClass="textSearch"
OnTextChanged="txtPatName_TextChanged" Width="300px"></asp:TextBox>
<div id="divwidth">
</div>
<cc1:AutoCompleteExtender ID="txtPatName_AutoCompleteExtender" runat="server" Enabled="True"
MinimumPrefixLength="1" ServiceMethod="GetEmrPatientList" ServicePath="~/Service/EMRWebService.asmx"
TargetControlID="txtPatName" CompletionSetCount="20" CompletionListItemCssClass="AutoExtenderList"
CompletionListCssClass="AutoExtender" CompletionListHighlightedItemCssClass="AutoExtenderHighlight"
CompletionListElementID="divwidth" DelimiterCharacters="">
</cc1:AutoCompleteExtender>
//Web Service As
private List<String> List(string key)
{
List<String> List = new List<string>();
DataTable dtEmrPat = new DataTable();
using (cls obj = new cls())
{
if (Session["XYZ"].ToString().Equals(""))
{
dt = obj.GetList(key);
}
else
{
dt = obj.GetAllLists(key);
}
if (dt != null && dt.Rows != null && dt.Rows.Count > 0)
{
Session["EmrPatients"] = dt;
foreach (DataRow dr in dt.Rows)
{
stringname = dr["Name"].ToString();
List .Add(stringname );
}
}
return List ;
}
}
OnTextChanged="txtPatName_TextChanged" Width="300px"></asp:TextBox>
<div id="divwidth">
</div>
<cc1:AutoCompleteExtender ID="txtPatName_AutoCompleteExtender" runat="server" Enabled="True"
MinimumPrefixLength="1" ServiceMethod="GetEmrPatientList" ServicePath="~/Service/EMRWebService.asmx"
TargetControlID="txtPatName" CompletionSetCount="20" CompletionListItemCssClass="AutoExtenderList"
CompletionListCssClass="AutoExtender" CompletionListHighlightedItemCssClass="AutoExtenderHighlight"
CompletionListElementID="divwidth" DelimiterCharacters="">
</cc1:AutoCompleteExtender>
//Web Service As
private List<String> List(string key)
{
List<String> List = new List<string>();
DataTable dtEmrPat = new DataTable();
using (cls obj = new cls())
{
if (Session["XYZ"].ToString().Equals(""))
{
dt = obj.GetList(key);
}
else
{
dt = obj.GetAllLists(key);
}
if (dt != null && dt.Rows != null && dt.Rows.Count > 0)
{
Session["EmrPatients"] = dt;
foreach (DataRow dr in dt.Rows)
{
stringname = dr["Name"].ToString();
List .Add(stringname );
}
}
return List ;
}
}
No comments:
Post a Comment