meetpd
asked on
Passing value from Javascript function to CS file
Hi,
I am setting a value of a radio button in a javascript function.
Now, to save this value of radio button in database, I have code which is in the aspx.cs file.
How do I pass this value of radio button to aspx.cs file?
Thanks!
I am setting a value of a radio button in a javascript function.
Now, to save this value of radio button in database, I have code which is in the aspx.cs file.
How do I pass this value of radio button to aspx.cs file?
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
use hidden controls.
If it is codebehind, then you can directly access from id, in case of HTML control:
(1) Edit the HTML code to include the attribute runat="server" in the
opening tag of the HTML control. For example for a table it might be:
<TABLE id="Table1" ...(other attributes) ... runat="server">
(2) Then you need to include the namespace "System.Web.UI.HtmlControl
in the code behind (e.g. in VB the directive Imports
System.Web.UI.HtmlControls