Solved

ASP.net Change the position of an image in the Site.Master file

Posted on 2013-10-22
2
300 Views
Last Modified: 2013-10-22
Hi

I am using the following code in the load of my Default.aspx page to specify which resource to use for an image in  the Site.Master file then change its height. How do I get the current position of the image and move it slightly to the left?
Thanks

        Dim img1 As Image = DirectCast(Master.FindControl(oControl_Name), Image)
     
         img1.ImageUrl = "~/Resources/" & oResource_Name
                            If IsNumeric(oHeight) = True Then
                                Dim Hgt As Integer = CInt(oHeight)
                                img1.Height = Hgt
                            End If
0
Comment
Question by:murbro
2 Comments
 
LVL 22

Accepted Solution

by:
Ivo Stoykov earned 500 total points
ID: 39590608
you cannot do this on server because the image in not rendered yet. It is put just in the response stream. When the browser receives it then and only then it will decide how to render (depending on the flow and css)

If you need to manipulate it do it after the page has been loaded using JacaScript.

HTH

Ivo Stoykov
0
 

Author Closing Comment

by:murbro
ID: 39591193
Thanks
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now