|
-
Nov 13th, 2002, 12:48 AM
#1
Thread Starter
New Member
Add textbox using code
How can I add a textbox into the form by using vb.net code for my web application?
I write the following code but the textbox didn't appear:
Dim newTxt As TextBox = New TextBox()
newTxt.Wrap = True
newTxt.Text = "Hello"
Me.Controls.Add(newTxt)
-
Nov 13th, 2002, 01:14 AM
#2
Re: Add textbox using code
Originally posted by Lim
How can I add a textbox into the form by using vb.net code for my web application?
I write the following code but the textbox didn't appear:
Dim newTxt As TextBox = New TextBox()
newTxt.Wrap = True
newTxt.Text = "Hello"
Me.Controls.Add(newTxt)
make sure you choose the correct location for it....
newTxt.Location = new point (....
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Nov 13th, 2002, 02:07 AM
#3
Thread Starter
New Member
But 'location' is not a member of 'System.Web.UI.WebControls.TextBox'
-
Nov 13th, 2002, 02:16 AM
#4
Originally posted by Lim
But 'location' is not a member of 'System.Web.UI.WebControls.TextBox'
are you making a web application ? perhaps you would post this in the ASP.NET section then. (if that's asp , I really dunno anything about web apps)
I just tried this in a windows form applicatoin and it worked. (textbox inherits from system.windows.forms when making win form apps)
Dim txt As New TextBox()
Me.Controls.Add(txt)
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|