473,379 Members | 1,201 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,379 software developers and data experts.

Dynamic Controls in Panel - How to access them!

My code does the following...

It references a stored procedure and builds a PlaceHolder containing
certain controls, based on the parameters from the stored proc. This is
implemented in it's own class.

On the form, the user can select from a drop down box of many stored
procs. From that, parameter fields are created which the user can
change, in the PlaceHolder, and then added to the Panel on the form.

My problem is, when the user clicks "run" to run the proc, i cannot get
to the parameter fields.

I have read about how asp works, and that dynamic controls are not
'saved'. But i'm not sure what to do to recreate the controls.
Especially as the architecture is as so:

A panel on the form.
A class which extends a PlaceHolder, adds certain controls to it
determined by the stored procedure's parameter types. This placeholder
is added to the panel when the user clicks a new stored proc.
From this i simply want access to the controls to extract the data!


Can anyone help?

Dec 15 '05 #1
4 1996
I advertize this product like I make money off every download (don't worry,
it's free), but it does sound like it might help you out, check out:
http://www.denisbauer.com/ASPNETCont...aceholder.aspx

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!

<ar*********@gmail.com> wrote in message
news:11*********************@g47g2000cwa.googlegro ups.com...
My code does the following...

It references a stored procedure and builds a PlaceHolder containing
certain controls, based on the parameters from the stored proc. This is
implemented in it's own class.

On the form, the user can select from a drop down box of many stored
procs. From that, parameter fields are created which the user can
change, in the PlaceHolder, and then added to the Panel on the form.

My problem is, when the user clicks "run" to run the proc, i cannot get
to the parameter fields.

I have read about how asp works, and that dynamic controls are not
'saved'. But i'm not sure what to do to recreate the controls.
Especially as the architecture is as so:

A panel on the form.
A class which extends a PlaceHolder, adds certain controls to it
determined by the stored procedure's parameter types. This placeholder
is added to the panel when the user clicks a new stored proc.
From this i simply want access to the controls to extract the data!


Can anyone help?

Dec 15 '05 #2
Not sure if that can help me.

The difference with my problem is that there are a variable amount of
controls, and those controls are not the same.

Dec 15 '05 #3
Have you tried it?

It basically sounds like your problem is that controls are dynamically
added, but on postback they are lost and you cannot get their values.

The control I sent you is a placeholder which automatically reloads dynamic
controls during postback.

As I understand it, you only have 2 choices. Figure out which controls were
dynamically add them and re-add them yourself during INIT, or use a control
like this one that does it for you.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
<ar*********@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Not sure if that can help me.

The difference with my problem is that there are a variable amount of
controls, and those controls are not the same.

Dec 15 '05 #4
Hi,

Yeh i've added some code to add the controls again.
It works, except i have a little problem now where a variable sometimes
gets changed, and sometimes doesnt - depending on the asp sequence.

Need to figure that out.

Thanks

Dec 15 '05 #5

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)...
1
by: Will | last post by:
Hi all. I'm learning VB.Net and am developing a WinForms app. I'm trying to make an app that I will use to scan in one or more than on image. I want to use a tabbed interface to hold each image....
2
by: theComputer7 | last post by:
I cut down the code to make this half way understandable... I have read Data Grid girls caution about over use of dynamic controls. I truly believe what I am doing requires dynamically inserted...
1
by: sleigh | last post by:
Hello, I'm building a web application that will build a dynamic form based upon questions in a database. This form will have several different sections that consist of a panel containing one to...
2
by: Michael | last post by:
Need some help trying to read values from web controls - specifically *finding* the controls (like a drop down list) - that are added dynamically added within an asp:panel control. The page...
3
by: Leo J. Hart IV | last post by:
OK, here's another question for the experts: I am building a multi-step (3 steps actually) form using a panel for each step and hiding/displaying the appropriate panel/panels depending on which...
6
by: dhnriverside | last post by:
Hi peeps, I'm trying to create some controls textboxes at runtime, based on the number of items in a IETreeView that are checked. That I can do, I've got a place holder and I can create the...
4
Frinavale
by: Frinavale | last post by:
Introduction Sometimes, when developing web applications, we need to be able to dynamically load controls based on user selections. The following article describes a simple scenario where TextBox...
4
by: =?Utf-8?B?RHlsYW5TbWl0aA==?= | last post by:
I have a WebForm where I'm dynamically creating some controls and I'm having difficulty understanding how the state is being persisted and how to work with it. I've created a simplified example...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.