Placing controls on an .jpg image in a User Control

Posted on 2005-04-01
Medium Priority
Last Modified: 2010-08-05
I have a 400 x 600 .jpg image.  I want to take that image and place
ASP.NET controls (like command buttons and textboxes) on specific areas of the image.  
The controls have to be in the exact areas of the image where I want them.
What I have is an image from a catalog with products on it, and I want to add buttons
like "Add to Cart" next to the products.
Is there anyway of doing this using a Web User Control?
I need to load the User Control into a Web Form.
Question by:MikeMCSD
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Accepted Solution

apb2 earned 2000 total points
ID: 13681251

Off the top of my head the simplist solution would to create a table and put set that image as a background of that table. The simply use the gridlayout to position your controls.

If you're using vs.net this should be really simple.
LVL 16

Author Comment

ID: 13681841
I put the image as a background, but the image is not showing when it
is loaded into the page:

This is in my User Control:
<%@ Control Language="vb" AutoEventWireup="false" Codebehind="Rosaries20.ascx.vb" Inherits="DCP2.Rosaries20" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>

<TABLE WIDTH="642" HEIGHT="1110" BACKGROUND="../images/Rosaries.jpg" BORDER="0" CELLSPACING="0" CELLPADDING="0">
When I click on Design view, from HTML view, it's there.
any ideas?
LVL 16

Author Comment

ID: 13682745
Found out the problem . . I have  User Controls in a folder under the root. For
some reason, it wasn't picking up the image in my images folder, in the root.
I created another folder in the User Controls folder and put the image in it and
it worked. Now I have line up the buttons.


Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

801 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