C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Articles » ASP.NET/Web Applications »

How to set the Top and left property of a web control dynamically?


Posted Date: 21 May 2004    Resource Type: Articles    Category: ASP.NET/Web Applications
Author: ManojRajanMember Level: Gold    
Rating: 1 out of 5Points: 5



Some time you may want to change the position of your web control at runtime. Though it is possible to set other properties like height and width, you can set all these properties using the add method of the style property. Let us see an example,


The example shows how to dynamically set various properties using the Style property.

Button1.Style.Add("Style", "Z-INDEX: 103; LEFT: 262px; POSITION: absolute; TOP: 115px")
Button1.Style.Add("runat", "server")
Button1.Style.Add("Width", "500px")
Button1.Style.Add("Height", "50px")
Button1.Style.Add("Font-Bold", "True")
Button1.Style.Add("Font-Size", "Large")
Button1.Style.Add("ForeColor", "Navy")



Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Accessing Controls from a datagrid
Previous Resource: Introduction to ADO.NET
Return to Discussion Resource Index
Post New Resource
Category: ASP.NET/Web Applications


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use