Solved

ASP.NET Dynamic Creation of controls

Posted on 2003-12-06
4
283 Views
Last Modified: 2011-10-03
Hello,

      Is there any way i can set the position of a web control such as web textbox or lable dynamically,(its top and left properties).I know it doesn't support top and left properties. Is there any way i can do that inside .aspx.vb or .aspx.cs.

thanks
Raman
0
Comment
Question by:araman
4 Comments
 
LVL 29

Accepted Solution

by:
David H.H.Lee earned 50 total points
ID: 9889211
araman,
-Create a label named="lblTest" inside aspx file
-I used a button to change label to new location : [code-behind].aspx.vb

    Private Sub btnChange_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnChange.Click
        lblTest.Style("POSITION") = "absolute"
        lblTest.Style("left") = 40
        lblTest.Style("top") = 100
    End Sub

-You can adjust the value according to your desired position.

Regards
x_com
0
 
LVL 8

Assisted Solution

by:nishikanth
nishikanth earned 50 total points
ID: 9902583
This has the code for creating controls dynamically and setting the properties

http://support.microsoft.com/default.aspx?scid=kb;EN-US;317515
0
 
LVL 8

Expert Comment

by:fozylet
ID: 12062172
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
    Split: x_com {http:#9889211} & nishikanth {http:#9902583}

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

fozylet
EE Cleanup Volunteer
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

777 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