473,468 Members | 1,303 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

I would like to add a button that the user can click to execute query - fills gridView control

How can I do this with ASP controls & VB.NET

On click of button run query to fill gridView.

Jul 30 '07 #1
2 2641
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
"jonny" <ne******@hotmail.comwrote in message
news:11**********************@e9g2000prf.googlegro ups.com...
How can I do this with ASP controls & VB.NET

On click of button run query to fill gridView.
Jul 30 '07 #2
On Jul 30, 10:54 am, "Brandon Gano" <bg...@inocompany.comwrote:
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

"jonny" <nelso...@hotmail.comwrote in message

news:11**********************@e9g2000prf.googlegro ups.com...
How can I do this with ASP controls & VB.NET
On click of button run query to fill gridView.
Hi...

don't forget to visit the asp.net data tutorials...
every thing you need to work with data is there...
http://www.asp.net/learn/data-access/

Masudur

Jul 30 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: BerkshireGuy | last post by:
I have a optionbox with two options. Depending on what option the user selects, I have code that populates a listbox using a select statement. The code is working fine expect that when the...
0
by: VMI | last post by:
My web app, during Page_Load, fills up my gridview with a datatable. I have a button under the gridview that adds rows to the gridview. Why is it that gridview.datasource is null inside the...
1
by: weird0 | last post by:
I have created a GridView and dynamically added data to it by creating a DataTable(as advised) and bound it with a reader. Then, assigned the DataSource of GridView to DataTable. But even that aint...
5
by: bbawa1 | last post by:
Hi, I have a button field in GridView. It shows the ID. When I click on it should grab the id and open new ASpx page based on that ID. How can I do that. Thanks in advance
4
by: glbdev | last post by:
Hi, I posted this question yesterday but didn't get the answer I needed. I am DESPERATE to get this working so I'm re-posting it because I don't think I worded it correctly. I have a GridView...
2
by: Hrvoje Vrbanc | last post by:
Hello all! As I have only recently started to use native ASP.NET 2.0 data access controls (and found them to be very powerful), I have one question that I was unable to find the answer to: -...
2
by: William | last post by:
Hi I've created a page with only 'n blank table control on it. When clicking a button, the table populates with various textboxes and dropdown lists to make up a complete form. In the last row...
2
by: mturner64 | last post by:
Good Day! I am fairly new to asp.net. I am using Microsoft VWD 2008 express edition. I have linked an Access 2007 database to my asp.net application using a gridview control. On the webpage are...
3
by: mturner64 | last post by:
I am using Microsoft VWD 2008 express edition. I have linked an Access 2007 database to my asp.net application using a gridview control. On the webpage are four text boxes allowing a user to input...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.