Click here to Skip to main content
16,016,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have an hidden field like
ASP.NET
<input type="hidden" id="HdnTbl" value="tblHead"  runat="server" />
in XSL.
How hidden field value can be accessed in .aspx page?
Posted
Comments
ZurdoDev 9-Feb-12 8:10am    
How are you trying to access the hidden field? In C# or in JavaScript?
Career Web Helper 9-Feb-12 8:21am    
In Javascript..

An XSL is a stylesheet. As such, it's not part of your aspx, and I don't see how you can 'access' it when it's not being run inside your page. If it was in your aspx, then you could access it by name, given that you have runat="server".
 
Share this answer
 
If you need it in JavaScript do
JavaScript
document.getElementById('HdnTbl')
or if you are using jQuery you can do
JavaScript
$("#HdnTbl")
 
Share this answer
 
Comments
Career Web Helper 9-Feb-12 8:29am    
Thanks bt document.getElementById('HdnTbl') does not work .
ZurdoDev 9-Feb-12 9:15am    
Then we need a lot more code. If this is in a user control or on a master page the actual id will be different. Just open source view in IE and find the actual ID then.
Career Web Helper 10-Feb-12 0:14am    
no its not user control it is HTML control,I have given src as xml to iframe and transforming it by using xsl
ZurdoDev 10-Feb-12 8:01am    
Then use "View Source" in IE to find the actual id.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900