c# - how to invoke text change method without lossing focus -


i developing application in have text box writing supplier , shows list of supplier match input text calling text change method , shows result in grid view problem is, method invoked when click outside text box want it, fire user types in text box

asp code

 <table style="width: 100%;">                 <tr>                     <td style="font-weight: bold; font-size: medium; text-align: right;">                         &nbsp;                         supplier name                     </td>                     <td style="text-align: left">                         &nbsp;<asp:textbox id="txtsuppname" runat="server" width="357px"></asp:textbox>                     </td>                 </tr>                 </table>             <asp:panel id="panel1" runat="server" height="616px" scrollbars="auto">                 <asp:updatepanel id="updatepanel1" runat="server">                     <contenttemplate>                         <asp:gridview id="gvsupppayment" runat="server" autogeneratecolumns="false"                              cellpadding="4" forecolor="" gridlines="none" width="100%"                               onrowcommand="getsupporderdetails" borderstyle="solid" cssclass="shadow">                                <columns>                                 <asp:templatefield headertext="emaiil id">                                 <itemtemplate>                                                  <asp:linkbutton id="restorantname" runat="server"  commandname="email"  commandargument='<%#eval("supp_email_id")+ ";" +eval("supp_name")+ ";" +eval("area") %>'  text='<%# bind("supp_email_id") %> '>linkbutton</asp:linkbutton>                                    </itemtemplate>                                 </asp:templatefield>                                 <asp:boundfield datafield="supp_name" headertext="supp name" />                                 <asp:boundfield datafield="area" headertext="area" />                                 <asp:boundfield datafield="total_orders" headertext="total orders" />                                 <asp:boundfield datafield="total_amount" headertext="total amount" />                                 <asp:boundfield datafield="total_ammount_recievable"                                      headertext="total ammount recievable" />                                 <asp:boundfield datafield="total_ammount_payable"                                      headertext="total ammount payable" />                                 <asp:boundfield datafield="is_deleted" headertext="is deleted" />                             </columns>                              <headerstyle backcolor="#454545" font-bold="true" forecolor="#35a7c1" />                              <rowstyle cssclass="cartbackground" />                          </asp:gridview>                     </contenttemplate>                 </asp:updatepanel>             </asp:panel> 

c# code

protected void txtsuppname_textchanged(object sender, eventargs e)         { datatable customrangepaymentdt = new datatable(); customrangepaymentdt = srchldobj.balsearchviewaccess("select *from payment_view trimmed_date between '" + (convert.todatetime(txtfromdate.text)).tostring("mm/dd/yyyy") + "' , '" + (convert.todatetime(txttodate.text)).tostring("mm/dd/yyyy") + "'");                 if (customrangepaymentdt.rows.count == 0)                 {                     lblerror.text = "sorry! no result found";                     lblerror.visible = true;                 } gvsupppayment.datasource = customrangepaymentdt;                 gvsupppayment.databind();          } 

thanks in adv..

upto can understand is, want auto suggestion functionality textbox. need in keydown event of textbox. can make ajax call suggestion.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -