473,466 Members | 1,447 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

remove automatic idprefex

I'm creating controls in runtime but the clientID always add "_ctl0" to my
ID name.
Is possible to remove this?

thanks,
Goncalo Boleo
Nov 19 '05 #1
4 909
Hi Goncalo,

You could just use the attributes collection of the control to change
whatever you want.

For example:

Dim x As New Button
x.Attributes("clientId") = "NOTctl0"
Me.FindControl("Form1").Controls.Add(x)

That will do it!

Good Luck!

James Steele
Senior .NET Consultant
as***********@gmail.com
http://weblogs.asp.net/jamessteele

Nov 19 '05 #2
You can set the ID explicitly. But it's important for ASP.NET to assign an
ID (and thus name) to all the controls so that when doing postbacks it can
keep track of them in order to maintain their state.

-Brock
DevelopMentor
http://staff.develop.com/ballen
I'm creating controls in runtime but the clientID always add "_ctl0"
to my
ID name.
Is possible to remove this?
thanks,
Goncalo Boleo


Nov 19 '05 #3
thanks. It work!

<as***********@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hi Goncalo,

You could just use the attributes collection of the control to change
whatever you want.

For example:

Dim x As New Button
x.Attributes("clientId") = "NOTctl0"
Me.FindControl("Form1").Controls.Add(x)

That will do it!

Good Luck!

James Steele
Senior .NET Consultant
as***********@gmail.com
http://weblogs.asp.net/jamessteele

Nov 19 '05 #4
Yes good point Brock. I should have mentioned that as well.

Nov 19 '05 #5

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

Similar topics

0
by: Bilal | last post by:
Hi, I'm a complete beginner in Javascript and php ... so forgive me for asking an easy/simple solution to the following problem: I'm developing an application that involves multi-screen in...
1
by: Matt Rapoport | last post by:
I'd like to programmatically remove a service or change its startup type to disabled. I know how to remove it from the command line but is there another way using the win32 extensions? I've...
5
by: Wladimir Borsov | last post by:
Occasionally I want to save web pages (with the IE) without the surrounding frills and banners. For that I click on the link "print" and a printer friendly version web page is prepared and popped...
6
by: Gert van der Kooij | last post by:
Hi, It's no problem to define the automatic maintenance using the wizard but I want to use commands to automate automation. I captured the SQL statements when activating the maintenance but that...
1
by: Sam | last post by:
Hi all Is it possible to remove/disable automatic new row insertion feature in datagrid control(last row with * on the left)? I'm implementing a datagrid table which consists of 4 columns and...
1
by: Michel Esber | last post by:
Hello, Linux RedHat AS4 running DB2 V8 FP11. I have followed the docs at http://tinyurl.com/qckrn and enabled automatic statistics collection. It has been 2 days since I updated my DB cfg and...
58
by: Jorge Peixoto de Morais Neto | last post by:
I was reading the code of FFmpeg and it seems that they use malloc just too much. The problems and dangers of malloc are widely known. Malloc also has some overhead (although I don't know what is...
3
by: Mark Poppers | last post by:
Assume the following sequence of user actions starting with a Form and an e.g. StatusStrip: 1.) User doubleclicks on the StatusStrip 2.) VisualStudio jumps to the new generated source code ...
3
by: myjish18 | last post by:
Hello, We have a DB2 UDB database v8.2.7 (db2 v8.2 fixpak 14) on AIX 5.3 which has Automatic Storage (AS) enabled. We want to disable automatic storage on entire database and/or disable...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
1
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.