I need to pass a client value to a server control. I use the code below:
------------- code start ----------------
1.
.
.
.
10. <input id="txtFileName" type="hidden" runat="server" />
------------- code end ----------------
When I run the code above, the alert on line 4 displays correct value, the alert on line 7 displays 'nothing'. I expect the filename.value in line 6 to have the same value as the elem.value. Does any one know what is wrong with this code and how can I pass this client value to the server?
Loading
Baruch BarnessPosted Sep 15, 2010, 9:01 AM
very short code, reply with full codes [this is basically all the code except the CodeBehind call: 'fuClinician.Attributes.Add("onchange", "return StoreFileName(this);")]. i think you are using recursive function [I did not think I did - can you point out how you've reached this conclusion?] and one more thing hidden field has no any relation with function you discussed [Line 10 of my code declares the field <input id="txtFileName" type="hidden" runat="server" /> and line 5 uses it var [filename='<%=txtFileName.ClientID %>']
. Can you be more specific as of why do you think they are not related?]
Abhimanyu K VatsaPosted Sep 11, 2010, 5:55 AM
very short code, reply with full codes. i think you are using recursive function and one more thing hidden field has no any relation with function you discussed.
thanks