473,385 Members | 1,912 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

is it possible to convert obj into textbox - read inside TIA


is it possible to do this.
object obj;
TextBox tb;

obj="textbox"+strA+strB;
tb=obj;

THANK YOU
Nov 16 '05 #1
5 2319
Les
Why not just try it instead of wasting bandwidth?
-----Original Message-----

is it possible to do this.
object obj;
TextBox tb;

obj="textbox"+strA+strB;
tb=obj;

THANK YOU
.

Nov 16 '05 #2
Les
Why not just try it instead of wasting bandwidth?
-----Original Message-----

is it possible to do this.
object obj;
TextBox tb;

obj="textbox"+strA+strB;
tb=obj;

THANK YOU
.

Nov 16 '05 #3
Are you asking: is it possible to take a string and use it to identify an
object that you want to create, and create that object?
Yes.

Take a look at System.Reflection

--- Nick

<Co**********@al.com> wrote in message
news:cc**********@newsg3.svr.pol.co.uk...

is it possible to do this.
object obj;
TextBox tb;

obj="textbox"+strA+strB;
tb=obj;

THANK YOU

Nov 16 '05 #4
Are you asking: is it possible to take a string and use it to identify an
object that you want to create, and create that object?
Yes.

Take a look at System.Reflection

--- Nick

<Co**********@al.com> wrote in message
news:cc**********@newsg3.svr.pol.co.uk...

is it possible to do this.
object obj;
TextBox tb;

obj="textbox"+strA+strB;
tb=obj;

THANK YOU

Nov 16 '05 #5
Hi Co**********@al.com,

I think you need to modify your code a bit.

object obj;
string strA = "Hello ";
string strB = "World";
obj = "textbox" + strA + strB;
textBox1.Text = obj.ToString();

1) You need to have textBox1.Text instead of just textBox1, as you want to make TextBox to display it.

2) You need to cast the object to string.

Correct me if i am wrong. Can i use reflection to achieve it? Thanks.
--
Regards,
Chua Wen Ching :)
"Co**********@al.com" wrote:

is it possible to do this.
object obj;
TextBox tb;

obj="textbox"+strA+strB;
tb=obj;

THANK YOU

Nov 16 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: anna | last post by:
I have a grid with some columns that are BOUND columns. I have three more columns that are TEMPLATE columns with textboxes inside. i need to populate one of the textboxes with information based on...
1
by: Epson Barnett | last post by:
Hi, I'm new to C# and I'd like to be able to reference a field of an object using a variable instead of literal text. In the PHP scripting language, you can create a variable: $var = "name";...
0
by: | last post by:
thanks Chua Wen Ching + others , I'm sorry I didn't maker my intentions clear. I did try the code but it obviously didnt work thats why I was asking for HELP. basically I was trying to write...
2
by: Pham Nguyen | last post by:
Has anyone seen an example of a textbox server control that has built-in client-side validation? I'd like to build a server control that extends the System.Web.UI.WebControls.TextBox class to allow...
1
by: guoqi zheng | last post by:
Dear sir, I have a textbox inside a repeart control, autopostback set to true for that textbox. When the value of this textbox changes, I need to access current row and update database. ...
2
by: VMI | last post by:
In the Page_Load() of my webForm, I have the following code, and on my HTML button, the onclick button calls writeVal() (the javascript function). When I click on the button, I see the messagebox...
1
by: sunshine2007 | last post by:
Hi everybody,I am new and I am doing a project for Pocket PC using evc 3 here is my question, I have declared a STRUCT to the Binary file struct config{ int rtuid; int netid; char *...
5
by: =?Utf-8?B?RmFtaWx5IFRyZWUgTWlrZQ==?= | last post by:
I'm sorry, but I've read your code a couple of times and just don't see where the Form1 is initialized. Form1 also sounds like a class name, and this would be how you could do some form operations...
0
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.