473,320 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

link buttons

Hi,

i use VS 2005 and i have a form with 2 buttons on it, my question is how i
can link to button 2 what button 1 do without put the hole code that button 1
do to button 2?

Thanks.
Jun 11 '06 #1
1 1281
"Avi G" <Av**@discussions.microsoft.com> a écrit dans le message de news:
5F**********************************@microsoft.com...

| i use VS 2005 and i have a form with 2 buttons on it, my question is how i
| can link to button 2 what button 1 do without put the hole code that
button 1
| do to button 2?

Simply write the code in a method that satisies the pattern of a button
event handler and link the Click event of both buttons to that method.

private void CommonCode(object sender, EventArgs e)
{
// do something
}

Having declared this method, you should find that the event selector for the
Click event will show it as an option for both buttons. Just drop down the
combobox in the property editor instead of double-clicking on the button.

Joanna

--
Joanna Carter [TeamB]
Consultant Software Engineer
Jun 11 '06 #2

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

Similar topics

3
by: rachel | last post by:
Hi all, I am new in ASP.Net. I have a question on link multiple web forms together. Here is the scenario: I create an Index.aspx WebForm which consists of a banner and three navigator...
0
by: Steve Lloyd | last post by:
Hi, I am having lots of problems when using a link button in a page that include modules, it is very strange, the javascript that is generated to submit the form comes up with an error and does...
1
by: brian | last post by:
'visual studio 2002 pro 1.0 framwork' I am creating dynamic Link buttons on my intranet site and assigning a click_event to them. A user clicks a link and I call the method to recreate the...
1
by: Gopal Krish | last post by:
I'm have coded a simple menu (using link buttons as menu items) in a user control to be reused across many ASPX pages. In the page_load method I dynamically create the link buttons as follows ...
26
by: Mica Cooper | last post by:
Hi, I need to pass some info in a javascript submit. <a href="javascript:document.formName.submit();">Submit Form</a> Normally a link would do page.jsp?x1=1&x2=2&x3=3 and you would pull x1,...
0
by: prashantnurvi | last post by:
I have programaticaaly created several Link Buttons on my ASPX page, I would like to raise the Click event of these Link buttons, passing in appropriate parameters depending on the Link button I...
3
by: Mark | last post by:
Assume you want to dynamically add one to many link button controls to a web page dynamically at run time. Each link button needs to post back and execute code. As the link buttons are created at...
5
by: Matt | last post by:
Creating Dynamic aspnet link buttons with in user control, Then i use the control on ever page with wraped with master page. I get the url of the link buttons from xml. Parameter from xml also...
9
by: lilOlMe | last post by:
Hi there! I have generated a GridView that looks something like: SportName| CompanyNameX |CompanyNameY |CompanyNameZ Hockey.....| Shipping------------ |Accounting-------- |Shipping------------...
3
by: =?Utf-8?B?UGxhdGVyaW90?= | last post by:
I have link buttons in a Gridview that, depending on the value in another column (Not the Key column) will need to be disabled. For example, (Column2 has link buttons) Column1 ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.