Solved

How to get my name of component static

Posted on 2011-09-30
2
176 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 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

AJAX ModalPopupExtender has a required property "TargetControlID" which may seem to be very confusing to new users. It means the server control that will be extended by the ModalPopup, for instance, if when you click a button, a ModalPopup displays,…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

911 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now