Solved

How to make an imageButton fire both CommandEventsArgs and ImageClickEventArgs?

Posted on 2006-07-18
2
1,301 Views
Last Modified: 2012-06-27
I have an imageButton control on my page.  When it is clicked I need to retrieve the following things:

  1. x coordinate
  2. y coordinate
  3. commandArgument

The first 2 are found in ImageClickEventArgs, but the 3rd is in CommandEventArgs.  Is it possible to retrieve all three?

I'm working in VB by the way...

Thanks in advance.
0
Comment
Question by:Rouchie
2 Comments
 
LVL 14

Accepted Solution

by:
Ramuncikas earned 500 total points
ID: 17128617
Command argument is the one that is assigned to imageButton itself. So you can do like this in your imagebutton's Click event:

Dim CommandArg as String
CommandArg = imageButton.CommandArgument

Dim _X As Integer
_X = e.X

Dim _Y As Integer
_Y = e.Y
0
 
LVL 25

Author Comment

by:Rouchie
ID: 17128830
Thank you very much!
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Turn on intranet settings 1 56
C# MVC and a global static factory that never dies 4 58
.NET tools for adding thread safety to a web app? 3 33
imap mails 1 22
I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question