Updating component attributes

A

Andrew Chalk

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.
 
S

Steven Nagy

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.
 
N

Nicholas Paldino [.NET/C# MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top