开发者

how can I pass control value from parent window to popup window's code behind

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:

  1. Hidden input control
  2. 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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜