I want to receive value from parent's control to popup win开发者_如何学Cdow's code behind.
for example
<asp:RadioButton ID="rdoRate" GroupName="CouponType" value="0" runat="server" checked/>Rate
<asp:RadioButton ID="rdoAmount" GroupName="CouponType" value="1" runat="server"/>dollar
and recive selected radiobutton's value from popup window's code behind.
My Solution is make querystring and pass the value.
for example >
window.open(url + ?selectedRadioVal=" + $("#~~checkedradiovalue~~) .. blah balh)
and receive the value by Reqeust.Querystring.Get()
.
But I can't send very long string. (maybe the url length is limited, right?)
Is there any good way to solve ?
I think there are two ways you can handle this:
- Hidden input control
- Session
If you going to use this values in only one page then add that info to hidden control of the parent (using Javascript)
But it is easier to include this information in session and remove it when it is not required anymore.
HTH
精彩评论