473,327 Members | 2,007 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,327 software developers and data experts.

Why did the name of a control changed?

Hi,

I work with MasterPages in ASP.NET 2.0.
In codebehind I create a dynamic control and with name "CatId". But after
the creation the name is changed to "ctl00$Main$CatId".
Therefore I canīt serach by the name of the control, but I need this.
What I must do, that this not take place?

Fabian
Nov 18 '05 #1
2 1254
This is no different than in ASP.Net 1.0, the UniqueId or ClientId of a
control is based on the hierarchy the control is placed in.

Your control, CatId is added to a contentplaceholder which is part of a
master page.

Your masterpage is ctl00
your contentplaceholder is Main
and your control is CatId

However, I agree with you that CatId should be accessible from the Page as
simply "CatId" which it doesn't appear to be.
Have you looked through the feedback site for any similiar reports?

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"Fabian" <fm@n-o-s-p-a-m.itacs.de> wrote in message
news:u8**************@TK2MSFTNGP12.phx.gbl...
Hi,

I work with MasterPages in ASP.NET 2.0.
In codebehind I create a dynamic control and with name "CatId". But after
the creation the name is changed to "ctl00$Main$CatId".
Therefore I canīt serach by the name of the control, but I need this.
What I must do, that this not take place?

Fabian

Nov 18 '05 #2
Thanks for Answer,

in the same page I can access the control. But I want to access the value in
the next page with this method: PreviousPage.FindControl ("CatId")

What can I do?
Or is there an other way to transfer the object?
"Karl" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net> schrieb im
Newsbeitrag news:e3**************@TK2MSFTNGP09.phx.gbl...
This is no different than in ASP.Net 1.0, the UniqueId or ClientId of a
control is based on the hierarchy the control is placed in.

Your control, CatId is added to a contentplaceholder which is part of a
master page.

Your masterpage is ctl00
your contentplaceholder is Main
and your control is CatId

However, I agree with you that CatId should be accessible from the Page as
simply "CatId" which it doesn't appear to be.
Have you looked through the feedback site for any similiar reports?

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"Fabian" <fm@n-o-s-p-a-m.itacs.de> wrote in message
news:u8**************@TK2MSFTNGP12.phx.gbl...
Hi,

I work with MasterPages in ASP.NET 2.0.
In codebehind I create a dynamic control and with name "CatId". But after the creation the name is changed to "ctl00$Main$CatId".
Therefore I canīt serach by the name of the control, but I need this.
What I must do, that this not take place?

Fabian


Nov 18 '05 #3

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

Similar topics

3
by: Kent Eilers | last post by:
I want to follow naming conventions for my controls - i usually prefix combo boxes with "cbo". When a form is in datasheet view however i do not want the user to see the 'cbo' prefix in front of...
4
by: Weinand Daniel | last post by:
i'd like to monitor changes of the "Control.Name" porperty during designtime. if the user changes the name in designer my event musst fire. i have created a own button control. with an event...
1
by: juracan | last post by:
I created a user control with a couple of radio buttons on it. When the user clicks on one of the radio buttons an event gets passed up along with the value of the radio button clicked. I then...
14
by: Altman | last post by:
Ok I have a control that is inherited from another class. In the child I put msgbox(me.name) in the load event. What always pops up is the name of the parent class and not the name of the...
1
by: tony | last post by:
Hello! I just want to find out how the system find the name to set on a assembly User control dll. I have done this. 1. Create a user control - Here the namespace was set by the system to...
11
by: John J. Hughes II | last post by:
I have a DataGridView displaying data from a DataSet. To the right of that I have a custom user control which displays one of the data set fields. The custom user control is bound to the data set...
3
by: dcassar | last post by:
I am working on a complex server control that dynamically creates an HtmlInputHidden control that stores its value. As far as the postback process is concerned, this hidden input acts as the...
10
by: Rob | last post by:
I am reading a book that says that the "name" property can be altered only at design time and cannot be modified at runtime. Please explain this given the code below... If you click Button3......
4
by: Walton | last post by:
checkout: (3rd paragraph under 'Remarks' section) http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/properties/name_2.asp from the page: "The NAME attribute...
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...
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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
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
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...

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.