Changing panel position.

Posted on 2009-04-20
Last Modified: 2013-11-19
How do I change the position of an panel (in code) at runtime?
Question by:jaerob
    LVL 16

    Expert Comment

    do you want to change it with javascript or codebehind?

    Author Comment

    Codebehind for sure.    :)
    LVL 16

    Accepted Solution

    for c# two ways
    if the control does not have the style set on it
    con.Style.Add(HtmlTextWriterStyle.Position, "absolute");
    con.Style.Add(HtmlTextWriterStyle.Top, "500px");
    con.Style.Add(HtmlTextWriterStyle.Left, "500px");

    If the style is set on it

    con.Style[HtmlTextWriterStyle.Position] = "absolute";
    con.Style[HtmlTextWriterStyle.Top] = "500px";
    con.Style[HtmlTextWriterStyle.Left] = "500px";

    Author Comment

    Cool... I'll give this a try and hit you back. Thanks.

    Author Closing Comment

    Awesome, burakiewicz!!! This was exactly what I needed. Thank you so much.
    LVL 16

    Expert Comment

    no prob

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Select distinct 25 44
    Problem to Popup 37 61
    Cannot add a service reference to WCF service to my project 3 27
    PHP foreach DB query 4 21
    Problem to be resolved in this article Currently, development of website and web application can be done without writing thousands of lines of programming code by hand. Description This can be done through by using a open source framework such …
    Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
    This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
    The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

    729 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

    16 Experts available now in Live!

    Get 1:1 Help Now