[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

java file

Posted on 2011-10-13
2
Medium Priority
?
195 Views
Last Modified: 2012-05-12
Hey guys how to i get the inner text of a asp label for a javascript file?

i tried this in my java file:


var list = document.getElementById('<%= lblList.ClientID %>');

but not working?
0
Comment
Question by:JCWEBHOST
2 Comments
 
LVL 5

Accepted Solution

by:
eridanix earned 1000 total points
ID: 36961765
var list = document.getElementById('someLabelId').innerText;

someLabelId is name of your ClientId in source code.
0
 
LVL 83

Assisted Solution

by:leakim971
leakim971 earned 1000 total points
ID: 36965925
var list = document.getElementById("<%= lblList.ClientID %>").innerHTML;
alert( list );
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month17 days, 20 hours left to enroll

831 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