Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ASP.NET Dynamic Creation of controls

Posted on 2003-12-06
4
Medium Priority
?
289 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
3 Comments
 
LVL 29

Accepted Solution

by:
David H.H.Lee earned 200 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 200 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

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…
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…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

783 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