David,
To answer your questions:
1) runat=server is only needed if you want to access a web control in the
code behind page. Since the hidden inputs are accessible via the Request
object there is no need for the overhead. Especially since you aren't really
using the inputs as dynamic controls.
2) It would work, if you run the javascript every time the page loads. Note
that I've placed the script inside of a If Not IsPostBack so the values for
the inputs are only being set the first time. The javascript setting them is
non-existent after the first page load. There is no need to keep running the
script because, as you've discovered on your own, it's more efficient to
just store the values in a session variable or viewstate since they won't
change.
3) Well, I can't be absolutely certain why your source block wasn't working.
It could be where you were inserting it on the page. It could be that it
didn't have the .value appended (but I assume you changed that based on
earlier posts). Or it could be that the way you were placing it on the page
it just wasn't getting fired. It's very difficult to say without seeing the
code for the entire page...
I hope these answers help. If you need any further clarification let me
know.
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche