473,385 Members | 1,856 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.

Runtme controls

have a Placeholder on whch a dynamically add controls at run tme, TextBox
DropDownList or CheckBox. I can populate these and providing I save the
placeholder n the SessionState etc. clear them etc.

However if I type into a dynamically added TextBox I can find no way of
getting at the text n code.

Any ideas?
Guy
Oct 27 '07 #1
3 885
"guy" <gu*@discussions.microsoft.comwrote in message
news:B0**********************************@microsof t.com...
Any ideas?
Not without seeing your code...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 27 '07 #2
Hello guy,

all controls are stored into page hierarch, nonwithstanding the fact how
you add them - statically or dynamically.

everything you need to do is just use FindControl method recursely on the
root objects to find your added control.

You can use the following codesnippets
- http://weblogs.asp.net/palermo4/arch...control-t.aspx
- http://www.codekeep.net/snippets/045...e9fa69393.aspx

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
ghave a Placeholder on whch a dynamically add controls at run tme,
gTextBox DropDownList or CheckBox. I can populate these and providing
gI save the placeholder n the SessionState etc. clear them etc.
g>
gHowever if I type into a dynamically added TextBox I can find no way
gof getting at the text n code.
g>
gAny ideas?
g>
gGuy
g>
Oct 28 '07 #3
On 27 Oct, 11:45, guy <g...@discussions.microsoft.comwrote:
have a Placeholder on whch a dynamically add controls at run tme, TextBox
DropDownList or CheckBox. I can populate these and providing I save the
placeholder n the SessionState etc. clear them etc.

However if I type into a dynamically added TextBox I can find no way of
getting at the text n code.

Any ideas?

Guy
Hi Guy

I was faced with a similar situation. My solution was to give the
dynamically added controls a unique code in the ID field and store
them in Session state. On postback any changes to content are shown in
the Request.Header list (a dictionary list of events and control
states in the form (client_ID, value)) against the client_ID
(allocated by the server except that underscore characters are
replaced with $). Although client_ID is not under the programmers
control it will have a construction based on the ID property and will
have the special code embedded within it. You'll then need to use
string search functions to identify it in the list of controls stored
in Session state.

HTH

Oct 28 '07 #4

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

Similar topics

7
by: Bil Muh | last post by:
Esteemede Developers, I would like to Thank All of You in advance for your sincere guidances. I am developing a software using Visual C++ .NET Standard Edition with Windows Form (.NET)...
16
by: TD | last post by:
This is the code under a command button - Dim ctl As Control For Each ctl In Me.Controls If ctl.BackColor <> RGB(255, 255, 255) Then ctl.BackColor = RGB(255, 255, 255) End If Next ctl
0
by: Mark Johnson | last post by:
Sometimes Controls that have been added to a GroupBox do not show up. What I am doing : 1) I am not using the designer, but create all the Controls per hand: groupBoxProdukt_01 = new...
3
by: Roger | last post by:
Hi In a Windows forms application I have 2 forms A and B; Form B inherits from form A. Form A is never displayed and its only purpose is to be inherited from and therefore contains mostly...
1
by: Robert Howells | last post by:
Perhaps I'm just too new at this to pull it off, or perhaps it's just bad architecture. I'd appreciate some feedback on the the wisdom (or lack thereof) in attempting the following: I'm not new...
66
by: Cor | last post by:
Hi, I start a new thread about a discussion from yesterday (or for some of us this morning). It was a not so nice discussion about dynamically removing controls from a panel or what ever. It...
7
by: Mike Bulava | last post by:
I have created a base form that I plan to use throughout my application let call the form form1. I have Built the project then add another form that inherits from form1, I add a few panel controls...
15
by: Arpan | last post by:
Consider the following code which retrieves data from a SQL Server 2005 DB table & displays it in a DataGrid: <script runat="server"> Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs)...
8
by: Ryan | last post by:
Ok.. I have a form with lots of stuff on it; a tool strip panel, menu strip, data binding elements (dataset, binding source, table adapter), tab control with 7 tab pages, each page contains a...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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.