Solved

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

Posted on 2013-10-22
2
304 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
[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:murbro
ID: 39591193
Thanks
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

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 …
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

737 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