Hi Kmandapalli,
Have you checked this? It will throw an error.
It will give syntax error.
The right syntax is:-
document.getElementById("<%=txt.ClientID%>").value = "tgfdt";
you have to append %> after ClientID.Then it will work.Please check at your end.