如何根据上一页值选择显示面板 [英] How to show the panel based on the previous page value selection

查看:59
本文介绍了如何根据上一页值选择显示面板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在付款页面上,我要求用户选择用户付款方式,并从用户那里输入多个付款方式"字段.然后我转到itemcart页面,用户在其中选择项目,然后转到结帐页面.我希望在该结帐页面上,用户选择的付款方式.例如,借方,贷方值将显示给用户.但是,如果用户选择付款页面上的贷方,然后结帐时,贷方详细信息或面板将显示出来.因此,我该怎么做

On paymentpage i ask user to select the user payment method and takes entry from the user of that paymeny methods fields . And then i went to itemcart page where the user selects the item and then it went to checkout page . I want that on that checkout page the payment method which user selects For example debit , credit values will be shown to user . But how i want if user selects the credit on payment page then on checkout the credit details or the panel will be shown . So how i do it

推荐答案

当它从一页重定向到另一页时,您将必须保留付款方式"详细信息.

看看下面的链接以了解" Asp.Net状态管理".
http://msdn.microsoft.com/en-us/library/75x4ha6s.aspx

http://msdn.microsoft.com/en-us/library/z1hkazw7.aspx

http://wiki.asp.net/page.aspx/30/state-management/
You will have to persist your "Payment Method" details when it''s redirecting from one page to other.

Have a look at below links to understand "Asp.Net State Management".
http://msdn.microsoft.com/en-us/library/75x4ha6s.aspx

http://msdn.microsoft.com/en-us/library/z1hkazw7.aspx

http://wiki.asp.net/page.aspx/30/state-management/


使用QueryString方法从一页转移到另一页

例如

if(chkDebit.checked == True)
{
Response.Redirect("Payments.aspx?Type = Debit")
}
否则if(chkCredit.checked == True)
{
Response.Redirect("Payments.aspx?Type = Credit")
}

然后在第二页中使用QueryString逻辑(根据付款面板的类型可见)

例如

字符串strType = Request.QueryString("Type");
if(strType ==信用")
{
pnlCredit.visible = true;
}
elseif(strType ==借记")
{
pnlDebit.visible = true;
}
use QueryString method to transfer from one page to another

for example

if(chkDebit.checked==True)
{
Response.Redirect("Payments.aspx?Type=Debit")
}
else if(chkCredit.checked==True)
{
Response.Redirect("Payments.aspx?Type=Credit")
}

and in second page use the QueryString logic as per that visible the panel of payments Type

for example

String strType=Request.QueryString("Type");
if(strType=="Credit")
{
pnlCredit.visible=true;
}
elseif(strType=="Debit")
{
pnlDebit.visible=true;
}


这篇关于如何根据上一页值选择显示面板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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