471,317 Members | 1,885 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,317 software developers and data experts.

Updating component attributes

If I update the background color of an asp.net control (e.g. a TableCell)
from client-side javascript, how do I read that change from asp.net
server-side code (e.gf. in C#)?

Many thanks.
Jan 19 '06 #1
3 1099
Make javascript also assign the new colour value to a hidden input.
Then, you can get the hidden input's value from Request.Querystring or
Request.Form (whichever you are using).

This is just one way. Might not be so useful if you want to edit many
cells on one screen.

Jan 19 '06 #2
Andrew,

You are going to have to have the javascript set something in a hidden
input field in the form that your ASP.NET page can read on the server side.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Andrew Chalk" <ac****@magnacartasoftware.com> wrote in message
news:ur****************@TK2MSFTNGP11.phx.gbl...
If I update the background color of an asp.net control (e.g. a TableCell)
from client-side javascript, how do I read that change from asp.net
server-side code (e.gf. in C#)?

Many thanks.

Jan 19 '06 #3
Thanks to you and Nicholas. I'll give that a try.

- Andrew

"Steven Nagy" <le*********@hotmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Make javascript also assign the new colour value to a hidden input.
Then, you can get the hidden input's value from Request.Querystring or
Request.Form (whichever you are using).

This is just one way. Might not be so useful if you want to edit many
cells on one screen.

Jan 19 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Edward Diener | last post: by
3 posts views Thread by Grant | last post: by
1 post views Thread by Christian Rühl | last post: by
122 posts views Thread by Edward Diener No Spam | last post: by
reply views Thread by bharathreddy | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.