Last post Jan 08, 2007 01:34 PM by Jrod
Jan 08, 2007 01:38 AM|CapBBeard|LINK
This is a fairly general question, but I've been appointed a task but am unsure about how I should set out to go about it.
The idea is to have a map of the layout of my workplace with icons representing printers, wireless access points, etc. These icons would ideally show status (something like green for good, yellow for a problem and red for a serious problem), and perhaps
other little pieces of handy information. I will get the status information using SNMP, which I can take care of no problem. Clicking an icon will take you to the equipment's http page or a more detailed information page.
Anyway, the problem I'm having is how I should go about creating the map itself, and the icon functionality. I want it to be reasonably dynamic. I mean sure, I can grab a plan of my workplace and draw icons on it and just use an image map or something, but
I'd rather it was a blank map with icons drawn on it at runtime, so it can be updated easily.
I think that should explain where I want to go with this anyway. Does anyone have any suggestions about how I should implement this? I'm fairly new to .NET and have been thrown in the deepend somewhat. Any help would be greatly appreciated :)
Jan 08, 2007 01:34 PM|Jrod|LINK
On the HTML side:
Maybe create the floor plan for your office and save that image.
Then use use absolute positioning and place a generic icon where you want the dynamic image to be like style="Z-INDEX: 100; LEFT: 7px; POSITION: absolute; TOP: 6px"
Give the icons a name like btnProduct1..btnProduct2
Take these steps in your code:
1. Call stored procedure
2. Create a temp button btnTemp
3. Create DataReader
4. While DataReader.Read
5. btnTemp = Page.FindControl("btnProuct" + Counter)
6. btnTemp.ImageURL -- do your image logic here
7. btnTemp.NavigateURL = "ProductInfo?id=" + .. your page about the equipment
8. End While
Is this the direction you were thinking??