Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


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
  • 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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 …
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month13 days, 13 hours left to enroll

580 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