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

.NET renaming my controls

JP
Is there a way to tell the VS2005 IDE NOT to rename my controls on a build?

if my control name is txtDate, the rendered version of the page has the
control as crtl01_txtDate.

This poses a big problem when you have client Javascript on the page needing
to references the original control Name. I understand MS reasons to fully
qualify Names, but this should be left up to the user.

The person next to me is developing a different project in VS2005, and their
builds do not rename the controls.

Can I turn this off?

--
JP
..NET Software Developer
Oct 17 '06 #1
3 1307
Never heard of this "special feature" excuse the pun but it sounds like a
virus or another programmer playing games. Then again I could very well be
off on my guess here.

"JP" <JP@discussions.microsoft.comwrote in message
news:F7**********************************@microsof t.com...
Is there a way to tell the VS2005 IDE NOT to rename my controls on a
build?

if my control name is txtDate, the rendered version of the page has the
control as crtl01_txtDate.

This poses a big problem when you have client Javascript on the page
needing
to references the original control Name. I understand MS reasons to fully
qualify Names, but this should be left up to the user.

The person next to me is developing a different project in VS2005, and
their
builds do not rename the controls.

Can I turn this off?

--
JP
.NET Software Developer

Oct 17 '06 #2
JP
I have discovered this only occurs when the Web control is part of ASCX user
control. If the control is placed inside the ASPX then it won’t rename it.

try it :o)

Still annoying as heck. Makes it almost impossible to write reliable
javascript. I coded it the way I wanted it. MS need to leave html code/
javascript the heck alone. Front Page does the same thing sort of with other
items.

--
JP
..NET Software Developer
"Kevin S Gallagher" wrote:
Never heard of this "special feature" excuse the pun but it sounds like a
virus or another programmer playing games. Then again I could very well be
off on my guess here.

"JP" <JP@discussions.microsoft.comwrote in message
news:F7**********************************@microsof t.com...
Is there a way to tell the VS2005 IDE NOT to rename my controls on a
build?

if my control name is txtDate, the rendered version of the page has the
control as crtl01_txtDate.

This poses a big problem when you have client Javascript on the page
needing
to references the original control Name. I understand MS reasons to fully
qualify Names, but this should be left up to the user.

The person next to me is developing a different project in VS2005, and
their
builds do not rename the controls.

Can I turn this off?

--
JP
.NET Software Developer


Oct 17 '06 #3
"JP" wrote:
I have discovered this only occurs when the Web control is part of ASCX user
control. If the control is placed inside the ASPX then it won’t rename it.
This is because you could have multiple instances of the control on a page
and so the web control's individual controls are renamed to
ControlInstanceName_ControlName.

If you want to get the client side name use the control's ClientID property,
something like:

<script language="javascript">
alert ("Control value is " + form1.<%=txtControlName.ClientID%>.value);
</script>

HTH
Oct 18 '06 #4

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

Similar topics

0
by: Saradhi | last post by:
Hi All, Here I am facing a performance problem with the TreeView Node renaming. I am displaying a hierarchy Data in a treeview in my Windows C# Application. My tree view represents an...
10
by: C. Levasseur | last post by:
I would like to use client side scripting for enabling/disabling buttons (depending on values in other fields). This worked fine in Asp.Net 1.1 but in Asp.Net 2.0, all the names and the id's of the...
0
by: Zorpiedoman | last post by:
Get your expert hat on.... I've created a UserControl which inherits ContainerControl. When I drop another control onto this control in design time view, I want to rename the new control and...
2
by: Anthony Williams | last post by:
Why does ASP.NET insist on renaming the forms on my page? I have a page with one form on there (the login form) and I need to be able to access it using javascript within the page, however ASP.NET...
4
by: Martin Simard | last post by:
Hi all, Is there a way to rename the App_Code.dll generated from the code that belongs to the App_Code folder? We are developping several web applications that we are merging in a single...
8
by: BillCo | last post by:
I'm updating a legacy app with table naming that makes baby jesus cry. It's a bit of a spider web though... no telling when and where the tables will be called by name. So I wrote this for renaming...
1
by: Marc | last post by:
Hi all, The code below works fine....however i am trying to find a way of renaming the active button control with the text entered in the 'newtxtbox' ,instead of opening a message box! -see...
2
by: Johnny Jörgensen | last post by:
Is there any way of renaming the properties of standard controls. I want to create a TextBox control inherited from a normal textbox control, but I want to use the property for something else....
0
by: =?Utf-8?B?YnJ1Y2UgYmFya2Vy?= | last post by:
asp.net munges the name, because this is what the browser posts. remember forms can not be nested, so the placeholder must be outside the form. you could create you own naming container, that did...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...

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.