hello mam/sir

how to get different results by cliking the same button in vb.net.for eg if iam clicking button1 to get 'xyz' in txtbox1 then how to get some 'abc' in the same txtbox bycliking the same button

thnqqqqqqqqq

You can have two different function to get ABC and XYZ. In OnButtonClick function you decide which function to call. Exsmple:

Private Sub ButtonClicked_Method(..) Handles MyButton_Click
If (today=sunday) then
GetABC()
Else
GetXYZ()
End If
End Sub

Private Sub GetABC()
txtMyTextBox.Text = "ABC"
End Sub

Private Sub GetXYZ()
txtMyTextBox.Text = "XYZ"
End Sub

thnkuuuuuuuuu

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.