?
Solved

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

Posted on 2013-10-22
2
Medium Priority
?
306 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:Murray Brown
[X]
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 Comments
 
LVL 22

Accepted Solution

by:
Ivo Stoykov earned 2000 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:Murray Brown
ID: 39591193
Thanks
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

752 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