Hi Guys i want to know how to access one method from another. i have two buttons.one method is button1_click and second button2_click.What i want to do is to put a if condintion in button2, something like if(button1.click = true).Can anyone help me with this.Thanks
sdhawan -2 Junior Poster
Recommended Answers
Jump to PostI didn't get it! can you please clarify!
If you want to handle two buttons click in one handler you set the event handler for each of which by its properties window to button_Click method.void button_Click(object sender, EventArgs e) { Button clickedButton = (Button)sender; if(clickedButton.Name == …
Jump to PostBuddy, It's a business scenario! what the technical problem you face?!
Jump to PostThat's the code when you click on the button -when you assign button_Click method to its Click event handler-
void button_Click(object sender, EventArgs e) { //here change the properties of the LinkedButton... }
Jump to PostGive me your code :) with just exceptions I can't assume what did you write.
Jump to PostReasonable! You handle the Click event of Button then cast it as LinkLabel! Use another event handler for the Click of LinkLabel.
All 24 Replies
Ramy Mahrous 401 Postaholic Featured Poster
sdhawan -2 Junior Poster
Ramy Mahrous 401 Postaholic Featured Poster
sdhawan -2 Junior Poster
Ramy Mahrous 401 Postaholic Featured Poster
sdhawan -2 Junior Poster
Ramy Mahrous 401 Postaholic Featured Poster
PierlucSS 52 Junior Poster
sdhawan -2 Junior Poster
Ramy Mahrous 401 Postaholic Featured Poster
sdhawan -2 Junior Poster
Ramy Mahrous 401 Postaholic Featured Poster
sdhawan -2 Junior Poster
Ramy Mahrous 401 Postaholic Featured Poster
sdhawan -2 Junior Poster
PierlucSS 52 Junior Poster
sdhawan -2 Junior Poster
Ramy Mahrous 401 Postaholic Featured Poster
sdhawan -2 Junior Poster
PierlucSS 52 Junior Poster
sdhawan -2 Junior Poster
sdhawan -2 Junior Poster
ddanbe 2,724 Professional Procrastinator Featured Poster
sdhawan -2 Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.