Hi,
I have an asp button name btnSubmit in a web form
Here is the event handler declaration:
Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnSubmit.Click
How can I call this sub programatically? Of course I can just insert one
line of code with the Sub name, but what sender and e should I use?
TIA 3 1486
"=?Utf-8?B?RWQgQ2hpdQ==?=" <Ed****@discussions.microsoft.com> wrote in
news:7B**********************************@microsof t.com: Hi,
I have an asp button name btnSubmit in a web form
Here is the event handler declaration: Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
How can I call this sub programatically? Of course I can just insert one line of code with the Sub name, but what sender and e should I use?
You can use "nothing"
btnsubmit_click(nothing, nothing)
--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
Newmarket Volvo Sucks! http://newmarketvolvo.tripod.com
how about instead you put in a function in the btn event that you call, then
you can call that function from anywhere, anytime.... without worrying about
the button's events.
--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
"Ed Chiu" wrote: Hi,
I have an asp button name btnSubmit in a web form
Here is the event handler declaration: Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
How can I call this sub programatically? Of course I can just insert one line of code with the Sub name, but what sender and e should I use?
TIA
I agree. It is generally a bad practice to call a handler directly.
"Curt_C [MVP]" <software_at_darkfalz.com> wrote in message
news:76**********************************@microsof t.com... how about instead you put in a function in the btn event that you call, then you can call that function from anywhere, anytime.... without worrying about the button's events.
-- Curt Christianson site: http://www.darkfalz.com blog: http://blog.darkfalz.com "Ed Chiu" wrote:
Hi,
I have an asp button name btnSubmit in a web form
Here is the event handler declaration: Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
How can I call this sub programatically? Of course I can just insert one line of code with the Sub name, but what sender and e should I use?
TIA This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: JoeK |
last post by:
Hey all,
I am automating a web page from Visual Foxpro. I can control all the
textboxes, radio buttons, and command buttons using syntax such as:
...
|
by: mg |
last post by:
In a Web Form, I have a TextBox:
protected System.Web.UI.WebControls.TextBox TextBox1;
At design time, I double click on the TextBox and get an
event handler:
private void...
|
by: mg |
last post by:
How can I call an event handler (e.g., Button1_Click)
programmatically. That is, without having to click on the
button with the mouse.
|
by: jorge |
last post by:
Hello
I have the following situation: (everything is dynamic (controls.add))
1. Button.Init {
WasButtonClickFired = true
}
2. TextBox.TextChanged {
WasButtonClickFired?
|
by: Laurent Bugnion |
last post by:
Hi,
I am trying to programatically add an "onunload" event handler to the
"body" tag of an ASPX page. I am doing this from a Custom Control
located on this page.
To do this, I added...
|
by: lauralucas |
last post by:
Hi
I'm creating controls programatically. On postback, the events of the
controls are not triggered correctly. I need to not only rebind the
controls to their datasource on every load, but...
|
by: luisxx |
last post by:
WinSrv2003 SP1
IIS 6.0
ASP.NET C#, 2.0
SQL 2005
All on same machine
Hello everyone!
I have a method in ASP.NET 2.0 that I can't seem to get right,
Gridview1_rowcommand.
|
by: Kevin Attard |
last post by:
I am using a GridView inside a UserControl which has a template column for
deleting the rows. Before databinding the gridview i am attaching the
RowCommand and RowDataBound event.
I am using the...
|
by: hoofbeats95 |
last post by:
I don't think this should be this complicated, but I can't figure it
out. I've worked with C# for several years now, but in a web
environment, not with windows form. I have a form with a query...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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...
|
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...
|
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,...
| |