Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 6th, 2003, 10:57 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default Make a control Clickable

I have a control that draws a progress bar. (from www.surano.com/aspnet).

It is very basic- but meets my needs. Except in one place- I need to make it clickable so it can "drill down" (I am using it as a reporting tool to show completion). The control doesn't seem to support any way to do that and when I went into the HTML view of the page and surrounded it with a's it didn't seem to do anything...

So, My question is, is there a way to make it clickable?



Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
__________________
Hal Levy
 
Old November 7th, 2003, 01:36 AM
Authorized User
 
Join Date: Jun 2003
Posts: 46
Thanks: 0
Thanked 1 Time in 1 Post
Default

(Actually, I think this question belongs in the HTML forum...)

Anyway, I'm not sure, but you could try surrounding it with a <DIV> or <SPAN> tag with onclick=myclick() and the myclick function might then respond to the click event.


-Van
(Old dog learning new tricks...)
 
Old November 7th, 2003, 12:58 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

It's an ASP.NET issue.. not a HTML issue.. as it's making an ASP.NET control clickable..

Since absolute positioning is used-- the <DIV> and <SPAN> tags loose their effectiveness- as they don't layout "around" the ASP.NET control.... I don't think what I am trying to do is possible....


Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
 
Old November 7th, 2003, 01:24 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Hal,

I never work with absolute positioning, so I don't know how pages are drawn out with it, but I thought of something...

I looked at the example at the site you linked to and they had their bars in a table. If you put your bar in a table you should be able to use the onclick event of the table cell.

Just did a quick test in VS, dropped a HTML table on the page and put in a asp image control. Looks like items in the table cells are actually in the cell so you can use the cell's onClick event. (Come to think of it, even if the object isn't in the cell in code, but "in" it visually, you could still use the cell's click handler. You'd just be using the cell as a mouse hit area.)

Shut off everything on the table to make it hidden if you need to (no borders, etc), then also add this into the cell's style attribute: "cursor:hand;" so you get the right mouse icon for a clickable area.

Let us know if that works.

Peter
------------------------------------------------------
Work smarter, not harder.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Clickable background AbrarNazeer CSS Cascading Style Sheets 4 April 9th, 2008 12:22 AM
Clickable images Using xml and xsl(Urgent) Akriti XSLT 11 June 4th, 2007 05:45 AM
An activex control to make VOIP serhatyusuf Visual C++ 1 February 10th, 2007 02:30 PM
How to make an ActiveX control Bajrang General .NET 3 December 8th, 2006 12:36 AM
Clickable images in grid or detailsview ewhizz ASP.NET 2.0 Basics 1 August 2nd, 2006 10:33 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.