0

Hi:)the problem im facing is that i created a control Textfield.Example :the user types in 75000 in the textfield and after he or she presses enter the List view appears.
But i want them to hit a button so after hitting the button the list view appears?plz help

3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by CrappyCoder
0

>But i want them to hit a button so after hitting the button the list view appears?plz help

So you need to handle click event of button. Put necessary code inside the handler of button control.

0

Also you may have the AutoPostBack set to 'true' in the HTML of your textbox in which case it will do a postback on the enter key.

Delete this option, create a seperate button and do the postback on that

In your HTML...

<asp:Label ID="Label1" runat="server" Text="Enter Value"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

<asp:Button ID="btnContinue" runat="server" Text="Continue" onclick="btnContinue_Click" />

And in your code-behind...

protected void btnContinue_Click(object sender, EventArgs e)
{

// validate the textbox...

}

Edited by CrappyCoder: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.