Solved

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

Posted on 2013-10-22
2
305 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 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:Murray Brown
ID: 39591193
Thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

690 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