By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,515 Members | 1,110 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,515 IT Pros & Developers. It's quick & easy.


P: n/a
I have a VB .Net web app and I want to reposition a textbox control on the
webform programmatically. I'm not sure how to do that ... can someone help

Thanks ...
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a

Mayb can this old sample of me help you?
Keep in mind that when you are moving on the page the form has or forever to
send back or you have to do it with javascript on the clientside.

I hope this helps?

Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim mybutton(31) As Button
Dim i As Integer
For i = 0 To New Date().DaysInMonth _
(New Date().Year, New Date().Month) - 1
mybutton(i) = New Button
mybutton(i).BackColor = Drawing.Color.White
mybutton(i).Text = (i + 1).ToString
mybutton(i).Width = New Unit(30)
AddHandler mybutton(i).Click, AddressOf mybutton_Click
If (i + 1) Mod 5 = 0 Then
Me.Panel1.Controls.Add(New LiteralControl("<BR>"))
End If
End Sub
Private Sub mybutton_Click _
(ByVal sender As Object, ByVal e As System.EventArgs)
Dim mylabel As New Label
Me.Panel1.Controls.Add(New LiteralControl("<BR><BR>"))
mylabel.Text = "The day is: " & DirectCast(sender, Button).Text
End Sub
Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.