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

Id in asp controls not unique

Hello.
Sorry for my english.
I've a little/big problem.
I've a image asp control (with Id="Foto") in a master page. When I run it
the source code of web page (from browser!!) have a different Id from "Foto"
and it is "ctl00_ContentPlaceHolder1_Foto".
Please help me!!
How could I to hold my Id "Foto".

Bye
Cris
Mar 15 '06 #1
1 1046
ASP.NET automatically renames the controls to avoid naming collisions.
Instead of trying to override this useful functionality I suggest you try to
work with it.
You can get the client side ID that ASP.NET is using for the control with
this syntax:
MyControl.ClientID

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Cristian" <Cr******@discussions.microsoft.com> wrote in message
news:9B**********************************@microsof t.com...
Hello.
Sorry for my english.
I've a little/big problem.
I've a image asp control (with Id="Foto") in a master page. When I run it
the source code of web page (from browser!!) have a different Id from
"Foto"
and it is "ctl00_ContentPlaceHolder1_Foto".
Please help me!!
How could I to hold my Id "Foto".

Bye
Cris

Mar 15 '06 #2

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

Similar topics

3
by: Varad | last post by:
Hi all Pls give me some insight as to what I should be doing. I have a form where I have 20 text boxes and when an user submits the form I save it to a database. When they want to retrieve it, I...
1
by: Markus Wildgruber | last post by:
Hi! Is there a way to determine the (tab-)order of controls at runtime? My goal is to get a unique number for each control on a form that could deal as a priority value for that control. The...
8
by: | last post by:
I have a Custom WebControl which adds several children at OnInit. In OnInit I set the ChildControl to ParentID + "_" + Control's ID so it would be something like MyContainer_VendorID Now the...
3
by: Nathan Sokalski | last post by:
When I view any page in my application a second time, I recieve the following error: System.Web.TraceContext.AddNewControl(String id, String parentId, String type, Int32 viewStateSize) +313...
5
by: Dennis Fazekas | last post by:
Greetings, I am creating a web form which will all the user to add an unlimited number of email addresses. Basically I have 3 buttons, "Add Another Email", "-" to remove, and a "Save" button....
6
by: Joseph Geretz | last post by:
Writing an Outlook AddIn with C#. For the user interface within Outlook I'm adding matching pairs of Toolbar buttons and Menu items. All of the buttons and menu items are wired up to send events to...
0
by: David Rees | last post by:
Before I was using LoadControl and a slew of User Controls to achive the same effect, but I realised a custom TemplatedControl was the better way of doing it. Anyway, this is the templated...
8
by: mark.norgate | last post by:
I've asked this question before, but still haven't solved it, so am asking again. I am programmatically adding a user control to the page in response to a button click. The user control consists...
9
by: jax1148 | last post by:
In vb6 a group of controls ie command buttons could be refered to by an index number ie cmdWord(4). This was accomplished by using the index property of the control. Vb.net does not seem to have...
4
by: Mark Olbert | last post by:
I'm running into a well-described issue in the ASPNET model that I haven't found a good work around for. I have a GridView to which I dynamically add data-bound TemplateFields at run-time. The...
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?
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:
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...
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...
0
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...
0
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...
0
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,...

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.