TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Shruti Rao
NA
9
0
How do I convert type string to System.Windows.Form.TextBox?
Mar 22 2010 2:51 AM
I am creating textboxes dynamically. So I want a unique (Name) for every textbox I create, as I want to save the contents of every textbox in a file.
for
(
int
p = 1; p <= 4; p++)
{
string
str =
"txt"
+ b + a;
//How so I convert this into textBox form???
TextBox
txt = (
TextBox
)str;
//ERROR
a++;
txt =
new
TextBox
();
panel1.Controls.Add(txt);
Please suggest an effective code, Thank you in advance.
Reply
Answers (
2
)
when datagrid is empty?
How do I convert type string to System.Windows.Form.TextBox?