如何在Modalpopup中使用Request.QueryString [英] How To Use Request.QueryString In Modalpopup

查看:82
本文介绍了如何在Modalpopup中使用Request.QueryString的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将数据从父页面中的链接传递到弹出窗口,我尝试使用request.querystring,但是弹出窗口自身关闭.我不知道该怎么办.
我正在使用asp.net和C#
请帮助我

I want to pass data from link in parent page to popup window i tried to use request.querystring but popup window closed itself. i don''t know how can i do with it.
I am using asp.net and c#
plz help me

推荐答案

在页面加载时,将您的Querystring值存储到HiddenFieldValue中,并使用该值继续进行操作.

一些代码将有助于理解您的关注.
On page load store your Querystring value into an HiddenFieldValue and use this value to proceed further.

Some code would be beneficial to understand ur concern.


有关我的问题的一些代码:
我在表格中创建了一个链接以打开弹出窗口:AddCell(A href = javascript:ShowModalDialog(),reservationDetailsId = + reserDetail.ReservationDetailsId + Visitor</A,tr);
在旁边的链接中,在ReservationDetailId参数中传递数据,并在弹出窗口中加载它
尝试过此方法但不起作用:
if(Request.QueryString [& quot; reservationDetailsId& quot;]!= null)
{
Label7.Text = Request.QueryString [& quot; reservationDetailsId& quot;].ToString();
}
无法将qwerystring值存储到HiddenFieldvalue中,因为加载弹出窗口不适用于Request.QweryString.
some code about my question:
I make a link in table for open my popup: AddCell(A href=javascript:ShowModalDialog(),reservationDetailsId= + reserDetail.ReservationDetailsId + Visitor&lt;/A, tr);
in side a link a pass data in reservationDetailId parameter and get it in popup load
tried this but doesn''t work:
if (Request.QueryString[&quot;reservationDetailsId&quot;] != null)
{
Label7.Text = Request.QueryString[&quot;reservationDetailsId&quot;].ToString();
}
to store a qwerystring value into HiddenFieldvalue is not possible because is load popup which is not work with Request.QweryString.


这篇关于如何在Modalpopup中使用Request.QueryString的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆