Getting a button's code to run programatically
Please support our VB.NET advertiser: DiscountASP.NET – 3 Months Free on VB.NET Web Hosting
Thread Solved
![]() |
•
•
Posts: 86
Reputation:
Solved Threads: 0
I have a button that when pressed displays all the customers in the table. Other buttons are used to add or delete a customer record, or upload a batch of numbers. How can I fire the Click event of the View button after the Add or Delete buttons code has been executed? For example, this is the code for the Upload button
I want the code that is in my view button to execute after my UploadScript() Sub. Any ideas?
Private Sub btnImport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnImport.Click
AddBatch(LocationCode, filename)
BuildScript()
SaveScript()
UploadScript()
End SubI want the code that is in my view button to execute after my UploadScript() Sub. Any ideas?
Hi,
Add the below code within your sub where xxx is the name of the button you want to click:
xxx.PerformClick()
Add the below code within your sub where xxx is the name of the button you want to click:
xxx.PerformClick()
It is never about the number of languages you know, you either have the logic of programming or you don't ...
Some of the codes I post are collected from different sites during the past couple of years, so I would like to thank them for their help and for enabling me to help.
Some of the codes I post are collected from different sites during the past couple of years, so I would like to thank them for their help and for enabling me to help.
![]() |
Similar Threads
Other Threads in the VB.NET Forum
- Help:What would happen when the code is run? (C++)
- last button code (VB.NET)
- Alert box, then cancel action (Javascript) (JavaScript / DHTML / AJAX)
- How do i run perl on windows 98 (Perl)
- [Tweak] Renaming your Start Button (Windows tips 'n' tweaks)
- Recognizing when a button is pressed. (Java)
- Printing using Web Control Print button VB.NET (JavaScript / DHTML / AJAX)
- Printing using Web Control Print button. (ASP.NET)
- Run-Time Error 424 (Visual Basic 4 / 5 / 6)
Other Threads in the VB.NET Forum
- Previous Thread: Background program that runs straight away
- Next Thread: WrapText in an AxOWC10.AxSpreadsheet Control
•
•
•
•
Views: 1925 | Replies: 2 | Currently Viewing: 1 (0 members and 1 guests)





Linear Mode