SUPER_USER
SUPER_USER

Reputation: 273

Input button click event

I have input button and on this button I write some code. I select data from table and display in grid view when I click on button, but when I select data from drop down and then when I click on button then button event no call?

I need to display data when I click on button

How can I do this?
Here's my code:

protected void search_data_Click(object sender, EventArgs e)
{
    //query
}

<input type="button" ID="search_data" runat="server" class="sear_btn"  value="Search Data" onclick="search_data_Click" />

Upvotes: 0

Views: 183

Answers (1)

Mairaj Ahmad
Mairaj Ahmad

Reputation: 14604

You can use OnServerClick

<input type="button" value="Click me" runat="server" id="btnSave" OnServerClick="search_data_Click" />

Upvotes: 1

Related Questions