welcome folks
FAQ in android,FAQ in dotnet,DotNet, C#,DOT NET CODE, ASP.NET, VB.NET, TRICKS,Dotnetcode,Android and Latest Technology Articles in VB,Android and ASP.NET

Friday, August 31, 2012

what is the uses of getElementById and ClientId In Asp.net

if (document.getElementById('<%=txtUserId.ClientId %>').value == "") { 
alert('Username is Mandtory'); 
return false; 


from your question 

<%=txtUserId.ClientId %> this statement is used to access server control ID in asp.net from javascript code & plz use this 
<%=txtUserId.ClientID %> 
in place of this <%=txtUserId.ClientId %> check difference

No comments:

Post a Comment