TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Baruch Barness
NA
3
2.4k
Passing Client value to server
Sep 3 2010 1:53 PM
I need to pass a client value to a server control. I use the code below:
------------- code start ----------------
1. <script language="JavaScript" type="text/javascript">
2. function StoreFileName(elem)
3. {
4. alert(elem.value);
5. var filename='<%=txtFileName.ClientID %>'
6. filename.value=elem.value;
7. alert(filename.value);
8. }
9. </script>
.
.
.
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?
Reply
Answers (
2
)
How to relate the printDocument to the information we want to print
How to add search option in GriView control in ASP.NET