Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to get my name of component static

Posted on 2011-09-30
2
Medium Priority
?
185 Views
Last Modified: 2012-06-27
Hello Guys,

Does any one could help me with my asp.net.

I have a page using master page. Inside of my page a have some textbox. The problem is when i run my project and try to see the view source i got this result.

<input name="ctl00$MainContent$WebUserControl11$TextBox1" type="text" id="TextBox1" />

My name of my component has been changed and now I'm not able to use my javacript code .

I just would like to find my component using the normal name ( TextBox1).

Tks guys

0
Comment
Question by:Mortarello
2 Comments
 
LVL 19

Accepted Solution

by:
Manoj Patil earned 2000 total points
ID: 36895735
Hi,

If you want to use TextBox1 value in javascript, then you can use it by following way.

var getValue= document.getElementById( '<%= TextBox1.ClientID %>' );

Open in new window


For more details go through following link

http://www.dotnetfunda.com/articles/article72.aspx
0
 

Author Comment

by:Mortarello
ID: 36898621
Tks man..
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question