473,840 Members | 1,523 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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


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

obj="textbox"+s trA+strB;
tb=obj;

THANK YOU
Nov 16 '05 #1
5 2332
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.Reflecti on

--- Nick

<Co**********@a l.com> wrote in message
news:cc******** **@newsg3.svr.p ol.co.uk...

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

obj="textbox"+s trA+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.Reflecti on

--- Nick

<Co**********@a l.com> wrote in message
news:cc******** **@newsg3.svr.p ol.co.uk...

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

obj="textbox"+s trA+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**********@a l.com" wrote:

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

obj="textbox"+s trA+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
1299
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 a parameter... the code below works on a textbox outside of the grid. how would you use the logic to populate txtDiscCov inside a grid. If Not IsPostBack Then sqlPropLU.Parameters("@PropID").Value = lblEntryType.Text SqlRating.Open() Dim...
1
2083
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"; and another variable: $name = "Epson"; Then you can refer to $name, or $$var. They will equal the same thing.
0
984
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 code for the following. textboxobj= (TextBox) Obj; I have grid of textboxes and need a coomon routine
2
3924
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 javascript checks for things like valid e-mail addresses or phone numbers (without having to add a separate control for validation). One idea I did some work on was having the control implement the IValidator interface and basically recreating...
1
2201
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. Repeater is bind to a dataset. VS.NET generate a below event on double click. However, I did not see any way to access current row. Public Sub TxtQuantity_TextChanged(ByVal sender As Object, ByVal e As System.
2
2185
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 from the Alert(), but the server-side Textbox text is not set to 'TEST'. I get a javascript error saying, "document.getElementById(...) is null or is not an object.". What could the problem be? The textbox is inside a Wizard control. Here's the...
1
5565
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 * wlstationcode; char * rfstationcode; char * stationname; char * lastdate;
5
2368
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 in vb6, but not in .Net. This would explain why the messagebox works, as it is not instantiated, but called statically as you did in your code. I think you need this where your MsgBox is called: dim ui as New Form1() ui.txt_rec.Text =...
0
10795
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 inside an image, hide your complete image as text ,search for a particular image inside a directory, minimize the size of the image. However this is not a new concept, there is a concept called Steganography which enables to conceal your secret...
0
9856
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9698
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10657
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10299
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9436
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7836
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7022
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5684
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
4071
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.