Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ASP.NET Dynamic Creation of controls

Posted on 2003-12-06
4
Medium Priority
?
288 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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…
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/…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

715 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