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

Webcontrol containing other controls issue (please, IMPORTANT!)

Hi!

I posted question while ago with no reply..

Here is wat I do:

I have website with 1 page (pgracing.com)
Each block/module is a control - .ascx.

In one of them I dynamically create comboboxes, textboxes, etc. Then I add
submit button and hook it up to event handler.

When button pressed I need to read values from this dynamically added
controls.

Page.Find control does not work because ID is not ID I assigned. It gets
prepended with somethig like "Ctl0_"

I understand that ASP.NET does this so I can distinguish between
usercontrols on a page, however it doesn't help me.

I can probably loop thru all controls and compare ID endings, but this
doesn't look correct to me.

How would I get a value? Please ask any questions if I'm not clear.
Thanks!


Nov 17 '05 #1
1 1491
SOLVED

Since I had code in ASCX ID was prepended with additional ID for ASCX
itself.

Changing Page.FindControl to this.FindControl cured problem.
"Ivan Demkovitch" <i@a.b> wrote in message
news:ex**************@tk2msftngp13.phx.gbl...
Hi!

I posted question while ago with no reply..

Here is wat I do:

I have website with 1 page (pgracing.com)
Each block/module is a control - .ascx.

In one of them I dynamically create comboboxes, textboxes, etc. Then I add
submit button and hook it up to event handler.

When button pressed I need to read values from this dynamically added
controls.

Page.Find control does not work because ID is not ID I assigned. It gets
prepended with somethig like "Ctl0_"

I understand that ASP.NET does this so I can distinguish between
usercontrols on a page, however it doesn't help me.

I can probably loop thru all controls and compare ID endings, but this
doesn't look correct to me.

How would I get a value? Please ask any questions if I'm not clear.
Thanks!

Nov 17 '05 #2

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

Similar topics

2
by: F. GEIGER | last post by:
I often use Notebook to structure my GUIs. Sometimes I have to provide a Settings page. Doing changes in this page influences other pages in such a way, that some controls have to change add or...
0
by: Uma Abhyankar | last post by:
Hello, I had a program in .NET Beta1, where in I was programmatically traversing the Xml Schema using the given code snippet. However today with migration to Beta2, I am facing a compilation...
1
by: PCC | last post by:
Hi, I am using the Infragistics controls on a new web site. I have set up a main page with three IFrames, one for the main navigator (on the left), one for the toolbars (on the top) and one...
1
by: Ivan Demkovitch | last post by:
Hi! I posted question while ago with no reply.. Here is wat I do: I have website with 1 page (pgracing.com) Each block/module is a control - .ascx. In one of them I dynamically create...
0
by: Richard Wilson | last post by:
Hi I'm trying to add a row containing 9 columns to an existing Table on a web page. Each new column contains a Text Box Control. This I've placed in a Button Click Event When I run the page....
4
by: Annie | last post by:
hello guys, I am getting the following error: Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. What i am trying to do is to loop through...
1
by: some good man | last post by:
Hi How do i print the a form with its controls? I know how to print, but when i want to paint the form onto the printerdocument control, i have to paint from an image, but the form doesnt even...
7
by: Alon | last post by:
Hi, I'm making my own control which holds some buttons ant textboxes and also has a panel control. in design time i want to drop another controls into the panel that is in my usercontrol. the...
8
by: Dip | last post by:
Hello Experts, Here is the code to flatten a PC hierarchy into a level based table. It works fine. SELECT t1.TASK_ID AS TASK_LV1, t2.TASK_ID AS TASK_LV2, t3.TASK_ID AS TASK_LV3, t4.TASK_ID AS...
9
by: desertsolider | last post by:
Is there any code to print all the records in table from visual basic and with out using any wizards please its very important for my project thanks
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.