Enter in Textbox by calling button event

Asked

Viewed 298 times

1

When I hit enter in a textbox, it is calling the "Filtrogridview" and then it calls the button event.

<div class="TextRight">
<asp:TextBox ID="txtBuscaNome" runat="server" CssClass="text_field upper-case" OnTextChanged="FiltroGridView" />
</div>

I do not know if I formulated the question well, because I am doing it this way but I do not know if it is the most correct.

I created a Hidden

<asp:HiddenField ID="hfGrid" runat="server" />

And at the end of the "Filtrogridview" value =1

hfData.Value = "1";

And see if he’s 1 at the button event. (For he always enters here at Ubmit)

if (hfData.Value == "1")
return
  • What is the error? Ontextchanged="Filtrogridview"

  • What is the goal? Not to enter the event?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.