In .ascx file(UserControl1)
<script type="text/javascript">
$(function () {
$('.address-radio').change(
function () {
$('#<%=AddressHidden.ClientID %>').val($(this).val())
}
)
})
</script>
<asp:HiddenField ID="AddressHidden" runat="server" />
In aspx page
HiddenField hidden = (HiddenField)UserControl1.FindControl("HiddenField1");
if (hidden != null)
{
string value = hidden.Value.ToString();
}
No comments:
Post a Comment