Solved

How to get my name of component static

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

803 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