Solved

ASP.NET Dynamic Creation of controls

Posted on 2003-12-06
4
282 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

911 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

23 Experts available now in Live!

Get 1:1 Help Now