Maintain Image Relative To A Fixed Location Even Though It Scales Anchored By Its Top?

Jul 13, 2010

This is very programming related but a somewhat non-programming question. I am performing image scaling in a web based application and I need to maintain my image relative to a fixed location even though it scales anchored by its top, left corner. Hope the graphic make this possible.The idea is that C is a fixed location that I want to maintain as my scaling origin rather than B which which is the current css behavior. C may or may not be within the actual image. So as the image scale, B needs to move relative to C. Example: if the image was scaled 50%, then B would move 1/2 the distance to C. If the image grew to 200% of its size, then B would move twice the distance away from C.Ultimately looking for a formula for x & y for B given the location of C and a scaling factor for the image. Not sure the size of the image needs to be part of this but I have it if needed.

View 5 Replies

Similar Messages:

Show An Image (Map Of A Floor) With The Scales?

Mar 19, 2010

I have a requirement to show an image which is a map of a floor , i need to show as a map with scales in the x axis and y axis. way to do this or any control is available

View 2 Replies

Specifying Relative File Location In Web.config For Use By Standard C# Class Library?

Jan 6, 2011

I'm struggling to find a way of specifying a file location in web.config appSettings that avoids using hard-coded paths but allows a non-'web aware' C# library to find a file. The C# library uses standard File.Open, File.Exists methods, etc. to operate on a data file, which is stored in my web application (ASP.NET MVC) tree, e.g. under:



I want to be able to specify my path like, e.g.:

this--> <add key="MyFileLocation" value="~contentdataMyDataFile.txt" />
not --> <add key="MyFileLocation" value="c:inetpubwwwrootfoocontentdataMyDataFile.txt" />

I don't want the C# library to be aware of the web application it's being used in, as it is used in other software, and the web application has no need to know about the configuration of the C# library.

View 3 Replies

HTML Img - ASP Image And Relative Paths

Mar 4, 2011

What is the correct way to reference an image in ASP.NET for live deployment on IIS? The following works in dev and production:

<asp:ImageButton ID="ibnEdit" runat="server" OnClick="ibnEdit_Click" ImageUrl="~/App_Themes/Default/images/one.png" Visible="false" ToolTip="Edit" />

The following doesn't work in either: (why not?)

<img src="~/App_Themes/Default/images/two.gif" />

The following works in dev but not in production:

<img src="../App_Themes/Default/images/two.gif" />

View 2 Replies

Forms Data Controls :: How To Reference Image Location Stored In DB From An Image Control

Apr 20, 2010

I'm not even sure if this is the correct approach for this -

I have a DB that stores information, as well as a location to where images are stored

ie ProductImage = ~/ProductImages/BulkRetail.JPG

I'm using a repeater to list all the products, which works fine for all the labels I use but not for the image location. I'm using something like this, but it doesn't work:

<asp:Image runat="server" ImageAlign="Left" ImageUrl='<%# Eval("ProductImage") %>' />

View 2 Replies

Streamreader For Remote Site And Relative Image Src?

Jul 15, 2010

I am trying to create a small app that will stream read a remote web page (specified by user input)find all images within the page (using regular expressions)stream read these imagesadd them as LinkedResource 's to a HTML emailI have got it working fine when the images and defined using absolute urls but not when they are relative - How can I can webRequest / streamReader to behave like a web browser does and locate the images based on their relative location.I have thought about manipulating the main web url and prefixing it to the source of the image, but I am not sure how I would deal with am image source such as


View 2 Replies

AJAX :: SlideShowExtender Control Image Relative Path?

Feb 20, 2011

I am using SlideShowExtender and I am using a Slideservice webservice located also in root folder. It works fine. My image folder is in ROOT FOLDER. But I have member webpage folders and a general web pages folder. Now, when I click on webpages of any of these folders, the slideshowextender stops working because it looks for my IMAGE folder in those Webpage Folders. I know this happens because I can see it trying to download the image from that URL which DOESNT EXIST(looking for my image folder in webpage folders).

How do I make a relative URL for the images so that the slideshowextender still POINTS to the ROOT FOLDER of images and displays images at all times.

I cannot make the slideshowextender work when I am logged into the system.

View 4 Replies

Web Forms :: Relative Path Of Image In Master Page?

Jul 22, 2010

I have got a master page(Project>>MasterPages>>MainPage.master) and some images in that page with some path like "../../Images/bg_main_menu.png".

I refer this master page in two forms. One of those form is oresent in the path :

Project>>Forms>>Form1.aspx and the other one is : Project>>Forms>>NewFolder>>Form2.aspx

Now for Form2.aspx the image is not getting loaded.

I tried the image path with "~Images/bg_main_menu.png". But it is not working.

View 2 Replies

Java Script - Relative Image-path In Js-file And Masterpages?

Mar 23, 2011

I'm using a jQuery Menu in my Masterpage. This masterpage is used for several pages in the root directory of the webapplication. Now i have a page in a sub-directory and all the image-, stlyesheet and javascript-files paths are invalid there. I solved it almost by using servercontrols, tilde(~) and adding scriptreferences to the ScriptManager as you can see here:


I could use absolute paths, but that would work only on the productive system and not on the development systems. Is there no other way to handle this?

View 2 Replies

Upload Image Then Resize With Fixed Width And Height?

Mar 19, 2010

which is better all user to crop the image with fixed width and height or let user upload the image then resize it with fixed width and height?

View 11 Replies

MVC :: Finding Image Location In JavaScript?

Dec 30, 2010

I created a HTMLExtension method for a DatePicker. I reference it from the view as follows (see bolded text for image location):


The HTMLExtension method:


Everything works when run on the development server but when run with IIS, the image is not found. Generally I would use "Url.Content" to fix these problems but I can't place that in the Javascript.

View 9 Replies

Browse An Image Location Using Fileupload?

Feb 14, 2011

how to browse an image location using fileupload and display it into an image control

View 1 Replies

Javascript - Location Of Image Resources?

Feb 24, 2011

I have a plugin that runs off my customer's websites. The plugin is at [URL], and needs to pull in some images. The problem is that the javascript seems to try to pull images from the customer's site, rather than from my own site. Here is the JS: = 'position:absolute;top:-20px;right:-20px;background-image:url(/Resource/Button.png);

In the above JS, the retrieval URL is (the site where the plugin runs), rather than my sites

Note that I cannot use absolute paths, as they become a pain between environments (test/prod) and also because my image retrieval must use http/https based on the client environment (otherwise you can errors if http is used on an https site).

View 4 Replies

Set A Location For Alternative Text In <asp:image Button>

Mar 21, 2011

<asp:ImageButton ID="ImageButton2" runat="server" Width="100px"
AlternateText='<%# Eval("Img_Id")%>' Height="100px"/>

In the AlternateText='<%# Eval("Img_Id")%>' I have to write something like this:

'~/images/<%# Eval("Img_Id")%>'

View 2 Replies

Nhibernate - MVC Image Upload Store Location (db Versus Filesystem)

Apr 28, 2010

I am writing web application using ASP.NET MVC + NHibernate + Postres stack. I wonder if images uploaded should be stored in database as binary blobs or on filesystem (and reference only in db).

One advantage of db storage I can think of is easy backup/recovery of all data without reverting to filesystem copy tools. On the other hand I suspect that filesystem access may be faster (but is it especially when dealing with many concurrent requests?)

View 3 Replies

Social Networking :: Get Distance From Current Location To Destination Location Google Map

Mar 26, 2016

URL....This link shows a demo that let user to put origin and destination then get direction. I want to know how to add a option which is let user to use their current location as origin location (Location from).

View 1 Replies

Forms Data Controls :: Want To Have Hyperlink Or Button In The Links Location In The Transcript Location Fields

Apr 7, 2010

I have a table in my database, in which a certain field holds the locations of text or doc files (the files are of a transcript for a chat session).

In the Gridview right now i able to show the link locations. But i want to have Hyperlink or Button in the links location in the Transcript Location fields.And on the click of which the txt or doc file opens up in notepad or microsoft word.

View 2 Replies

Social Networking :: Draw (Plot) Route Between User Location And Specified Location On Google Maps V3

May 7, 2015

Following is my code when user enters hospital name and city, he will be navigated to this page to show location on map. Now I want to get user current location and draw the route between current location and destination. Is there any way to integrate to geocoding and geolocation?  

<!DOCTYPE html>
<html xmlns="">
<head runat="server">
html, body, #map-canvas

[Code] ....

View 1 Replies

How To Get A Relative Path In MVC

Sep 9, 2010

How do you calculate a relative path in ASP.NET MVC?

View 2 Replies

Relative Links In PDF?

Jun 9, 2010

Have written an ASP.Net application. Part of the application deals with being able to view PDFs. The initial PDF viewed acts as an index to access other PDF documents. You click a link in the Index PDF and it jumps to another PDF file. Legal documents, agreements, etc.

This scenario works on some computers and on others it doesn't. I managed to figure out what the problem was. On some of the computers the initial Index PDF was being hosted within the browser and on some other computers it was actually jumping out of the browser and directly into Adobe Acrobat. As soon as the PDF jumps out of the browser and into Acrobat the relative links in the Index PDF stop working because it is hosted client side via Acrobat but the additional PDFs it is trying to access are on the server.

I figured out why some computers stay in browser and why some jump out. There is an option within Acrobat itself that determines this behavior. It is under Edit--> Preferences ----> Display PDF in Browser.

I am in a jam because I am not in control of the PDF documents themselves and how they are written, and I obviously have no control over the options selected in Acrobat on each and every computer. My problem is also compounded by the fact that our firm has just recently purchased a new PDF reader called Nuance that will be pushed out firm wide soon and I don't think it even has the option to have PDFs hosted in browser.

I can get what I need to work if I create the index in HTML, but the problem is I don't write the Indexes and the people who do are not trained in HTML. I can get the people who write the indexes to change from relative links to absolute links, but then I run into the problem of what if we change where we are hosting the PDF files? All the links will break again? I think we are stuck with relative URLs, but how can I make it work?

I am thinking about maybe hosting the PDFs within Silverlight?

View 2 Replies

Getting Relative Path In JavaScript?

Jun 21, 2010

I've got this app where I'm using an IHttpHandler to serve JSON data to my JavaScript method.


This works fine on my "localhost" webserver, but I've also got a staging server for my clients to use.

The problem that I'm having is that when the app is hosted on the staging server, the theSource is mapped incorrectly (contains /ClientSite/). I could do something like a String.Replace but I'm looking for a more elegant way of achieving this.

View 1 Replies

Get A FileStream From A Relative Path?

Apr 24, 2010

I am trying to get a FileStream from a relative path. The file is in my project, but when I try to do that it automatically appends C:\ in front of that.

1. Does the FileStream only works if the file is on a local Hard Dive?

2. Also if it works from the local hard drive, then does my application needs some permission to read the file from C Drive?

View 2 Replies

.net - Absolute Vs Relative Path?

Dec 14, 2010

Possible Duplicate: Absolute path & Relative Path

When to use absolute path, relative path and what is the difference between both?

View 2 Replies

Relative Path - Different Project?

Sep 20, 2010

I have three projects inside my solution and i using some same images on all of three projects. How can i create relative path from one project to another?

View 4 Replies

CPU Usage Relative To Number Of Users?

May 1, 2010

My application uses 25-30% of the CPU on a test server which has 600 MB Ram on it.

I can see the asp_wb process taking that much percentage of CPU.

This is when I am testing using one user.

How many users can the server afford then without falling over?

Is there a relationship between the CPU Usage and number of user aka if there are 2 users my application will sky rocket to 60% of memory usage?

View 1 Replies

Copyrights 2005-15, All rights reserved