J
jonny
How can I do this with ASP controls & VB.NET
On click of button run query to fill gridView.
On click of button run query to fill gridView.
I think you want something like this (forgive the sloppy VB; I'm a C# guy):
--aspx--
<asp:Button ID="MyButton" runat="server" Text="Fill"
OnClick="MyButton_Click" />
<asp:GridView ID="MyGrid" runat="server" ...>
...
</asp:GridView>
--aspx.vb--
Protected Sub MyButton_Click(ByVal sender As Object, ByVal e As EventArgs)
'TODO: Create data source (MyDataSource)
MyGrid.DataSource = MyDataSource
MyGrid.DataBind()
End Sub
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.