The Artima Developer Community
Sponsored Link

.NET Buzz Forum
XY coordinates after clicking a button

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Paschal

Posts: 1621
Nickname: bigapple
Registered: Nov, 2003

Paschal is a .Net developer
XY coordinates after clicking a button Posted: Jan 28, 2004 11:27 AM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Paschal.
Original Post: XY coordinates after clicking a button
Feed Title: help.net
Feed URL: http://www.asp.net/err404.htm?aspxerrorpath=/pleloup/Rss.aspx
Feed Description: .Net for mankind !
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Paschal
Latest Posts From help.net

Advertisement

Just in case someone interested by this tip.

I have on a page a server image button linked to a click event. This button has indeed two different functions, one to go back to the homepage, the other to go to another page.

For different reasons, I didn't want to use an image map to make the distinction between my two embedded actions.

The trick I used is quite simple but works well, and should work also with more than 2 buttons.
In the server click event I just test the coordinates using Request.Form("Nameofmybutton.x") for the horizontal position and Request.Form("Nameofmybutton.y") for the vertical position

If CInt(Request.Form("Mybutton.x")) > 83 Then

  Response.Redirect("~/Email.aspx")

Else

   Response.Redirect("~/Default.aspx")

End If

 

Read: XY coordinates after clicking a button

Topic: Geek Notes 2004-01-26 Part 2 Previous Topic   Next Topic Topic: Fried eye anyone?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use