asp.net - populating a gridview with a button's click event -
I have a page with two dropdown list (second for location for another department), employee search textbox and a button. On the second page, I have a gridview. Now, what I want to achieve is that when a user types an employee's name in the text box control, the location selects a location from the dropdown list, and the section dropdown From the list, and the button (the search), on the second, the gridview will appear on the page The page should show the required information of a single employee, only one row should be shown.
I have created a database for employees I know how to do this with autopostback, but I have not tried using a button click. NB: Gridview should only show one line of selected employee. I am using ASP.NET VB
Your help will be appreciated.
try it
& lt; ASP: Button ID = "srch button" text = "dot data" run = "server" onclic = "dot data" /> & Lt; Asp: GridView id = "GridView1" runat = "server" & gt; & Lt; / ASP: GridView & gt; Protected Zero BindData (Object Sender, EventArgs e) {Gridview1.Datasource = YourDataSource; GridView1.DataBind ()}
Comments
Post a Comment