aspx page i droge in a listbox to my form

Simon 466 Reputation points
2025-01-15T21:09:57.9466667+00:00

aspx page i droged in a listbox to my form

and i cannot move it

even i set in code the location and it dont help

it is staion on the feft side of the form and cannot move it

Developer technologies | ASP.NET | Other
{count} votes

Accepted answer
  1. Anonymous
    2025-01-16T01:51:22.9533333+00:00

    Hi @Simon,

    aspx page i droged in a listbox to my form and i cannot move it

    By default, the controls you create cannot be moved by dragging, but you can fix this by adding styles in your control:

    Style="position: absolute;"
    

    After the control is dragged and moved, it will automatically add its positioning properties: top and left.

    Best Regards,

    Xudong Peng


    If the answer is the right solution, please click "Accept Answer" and kindly upvote. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Albert Kallal 5,586 Reputation points
    2025-01-16T01:21:22.4733333+00:00

    Unfortunately, most web development does not allow you to "drag around" controls in the design view, since web browsers tend to work on markup, and "relative" addressing.

    So, for the most part, you need to adopt some css. You can actually quite much get by with just a few settings (that you have to learn).

    So, dropping a listbox into the markup, then we can set the LB to be left, right or center like this:

    centerlb

    So, if you just want to "bump" it over a bit, try float:left;margin-left:40% (change the 40% to say 10% or whatever).

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.