Solved

ASP.NET Dynamic Creation of controls

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

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

706 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

19 Experts available now in Live!

Get 1:1 Help Now