Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
  Database
Automation
OS/Networking
Graphics
Links
Tools
» Regular Expr Tester
» Free Tools

Dynamically moving a server control

Total Hit ( 2749)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article

Rating


 


Dynamically moving a server control instance on the page is very easy, thanks to the possibility to add any style attribute to the control. In this case, you can dynamically add the control's LEFT and TOP coordinates, and another attribute that says you want to use DHTML's absolute positioning. To try this, just add a button control on the form, and add the following code in the button's Click event:

Click here to copy the following block
Private Sub Button1_Click(...) Handles Button1.Click
  Button1.Style.Add("POSITION", "absolute")
  Button1.Style.Add("LEFT", "300px")
  Button1.Style.Add("TOP", "200px")
End Sub

Run the page and click the button. When the form is reloaded, after the postback, the button will be positioned in the new location.



Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.