Solved

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

Posted on 2013-10-22
2
301 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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 …
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

863 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

19 Experts available now in Live!

Get 1:1 Help Now