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

Control name??

In a web user control, control id changes.
For instance, I created a textbox whose id is txtname and if you run it
and view source, you will notice its id has changed to something like
"_c1__c3_txtname".
So when you access the control using javascript, you have to say
document.getelementbyid("_c1__c3_txtname").value

Ok now my problem is sometimes this control's id gets changed somehow
(from "_c1__c3_txtname" to "_c1__c4_txtname") that results in javascript
doesn't work.

Are there any ways of tackling this problems?

Thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
2 1015
i recommend to use scripting dinamyc
with property clientId for the textbox

regards
daniel #
MCP Dev Web App C#

"TaeHo Yoo" <yo******@yahoo.com> wrote in message
news:eO**************@TK2MSFTNGP09.phx.gbl...
In a web user control, control id changes.
For instance, I created a textbox whose id is txtname and if you run it
and view source, you will notice its id has changed to something like
"_c1__c3_txtname".
So when you access the control using javascript, you have to say
document.getelementbyid("_c1__c3_txtname").value

Ok now my problem is sometimes this control's id gets changed somehow
(from "_c1__c3_txtname" to "_c1__c4_txtname") that results in javascript
doesn't work.

Are there any ways of tackling this problems?

Thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #2
Thanks daniel,

But could you explain a bit more?
Say the original property clientId of a textbox is "txtname" but when
you run the program and view source code, it has changed to
"_c2__c3_txtname" so that if you try to access this control via
javascript by saying document.getElementById("txtname").value, it will
cause an error.
Could you tell me how you would get the value of the client control in
client site?

Thanks
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3

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

Similar topics

0
by: Miguel Guerreiro | last post by:
I have an ActiveX Control that I am trying to make work from an ASP page, but so far all I got is great frustation! My Control is well registered (and working fine from a VB stand-alone program I...
8
by: deko | last post by:
I'm hoping someone can sanity check my understanding of the Object Model for Forms/Controls. I'm having trouble drilling down into Control properties. First, I have a record set with the...
2
by: Merlin | last post by:
Hi I have a control that allows embeddable editors, so for example I can set a property of controlsEmbeddableEditor =me.TextBox1 on my form, no problem here - what I want to do is the same thing...
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...
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...
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: 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:
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.