|
Rank: Member Groups: Member
Joined: 8/21/2011 Posts: 13
|
Is there a away to determine which button is clicked in a MsgBox if the button types are images?
I'm able to create 2 "image type" MsgBoxButtons in a MsgBox, but I don't see how I can capture which one was clicked.
Thanks,
Jim
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You would use MsgBoxButton.CommandName to distinguish which button has been clicked inside your ButtonClick event handler.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 8/21/2011 Posts: 13
|
How would I go about passing which button was clicked (when I create the buttons)? For the image type button, Im doin this:
MsgBox1.MsgBoxButtonType = MsgBoxButtonType.ImageButton Dim buttonYes As MsgBoxButton = New MsgBoxButton("Images/Yes.gif") Dim buttonNo As MsgBoxButton = New MsgBoxButton("Images/No.gif") MsgBox1.Show("Confirmation", strContent, Nothing, buttonYes, buttonNo)
Thanks,
Jim
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
We have already answered your question in our original reply ---- you would use MsgBoxButton.CommandName property. That is a property on the MsgBoxButton class. We are not in a position to show you how to work with a property on a class.
Thanks
|
|
Rank: Member Groups: Member
Joined: 8/21/2011 Posts: 13
|
I think I didn't explain my challenge correctly.
When I use the following method to create a simple button, it works OK (I can use CommandName to detect the button that was clicked):
Dim buttonYes As MsgBoxButton = New EO.Web.MsgBoxButton("Yes", Nothing, "Yes")
But when I go to create an image button, your documented example says to use the following format:
Dim buttonYes As MsgBoxButton = New MsgBoxButton("Images/Yes.gif")
But this has only one value (not 3 like the first example). When I try to use your image button format, there is no value for the CommandName to grab.
Thanks, Jim
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi Jim,
I believe we understood your question correctly and have answered your question sufficiently. You have two extremely simple and almost identical lines of code with one working and the other one not working, yet you are asking us how to fix the one that's not working for you. We don't do this level of troubleshooting for our users. Please try to work out such coding issues yourself.
This issue is closed.
Thanks
|
|