how to access hiddenfield in usercontrol which is there in master page.
-
in javascript it is document.getElementById(<%=h1.ClientID%>).value; it is giving me error. Can anyone please let me know how to access this .
-
in javascript it is document.getElementById(<%=h1.ClientID%>).value; it is giving me error. Can anyone please let me know how to access this .
try this http://forums.asp.net/p/1017379/1370211.aspx[^]
Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/
-
in javascript it is document.getElementById(<%=h1.ClientID%>).value; it is giving me error. Can anyone please let me know how to access this .
Dont put the scriplet in document.getElementById.Use global variable to get the clientid of hidden variable as
var hiddenClientID = "<%=h1.ClientID%>";.
Put the above script in masterpage itself. Now access the hidden field using hiddenClientID in usercontrol as
document.getElementById(hiddenClientID).value
Let me know if still face problem
Cheers!! Brij
-
in javascript it is document.getElementById(<%=h1.ClientID%>).value; it is giving me error. Can anyone please let me know how to access this .
try below code document.getElementById(<%=Page.Master.FindControl("h1").ClientID%>).value;
-
try below code document.getElementById(<%=Page.Master.FindControl("h1").ClientID%>).value;
document.getElementById("<%=Page.Master.FindControl("h1").ClientID%>").value="dirty"; not working on usercontrol
-
document.getElementById("<%=Page.Master.FindControl("h1").ClientID%>").value="dirty"; not working on usercontrol