在加载page_load之前先加载一个用户控件 [英] Load a usercontrol first before loading page_load

查看:74
本文介绍了在加载page_load之前先加载一个用户控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在付款页面上有一个登录控件,如果用户登录,我想向他们显示付款选项,即通过现有卡付款,但是如果没有,则他们将输入所有卡详细信息.

问题:当用户单击登录按钮时,在该刷新中,我想显示使用现有卡付款"选项,但不会发生.

与登录相关的详细信息在一个会话中,并且我正在(!Ispostback)上检查会话变量.

首次加载页面时,会话变量为空,因此该部分被跳过.当用户登录时,页面加载将被跳过(!Ispostback)部分,并执行登录控件的加载,为登录会话变量赋值.在这一点上,首先,即使刷新页面,也不会进入(!ispostback)部分,其次,我真的需要在用户点击登录并返回页面后立即在现有卡上显示付款...

Hi All,

I have a login control on payment page, if user logs in, i want to show them the payment options i.e. payment by existing card, but if they are not, they would enter all the card details.

Problem: when user hits login button, in that refresh, i want to show the payment on existing card option, but it doesn''t happen.

Login related details are in a session, and i am checking session variables on (!Ispostback).

For the first time, when page loads, session variables are empty so that section is skipped. When user logs in, page loads, (!Ispostback) section is skipped, and login control''s load executes giving values to login session variables. At this point, first even if i refresh the page, i wont get into the (!Ispostback) section, second i really need to show payment on existing card as soon as user hits login and page comes back...

Any ideas on how to do it?

推荐答案

您可以使用Page_Init()


这篇关于在加载page_load之前先加载一个用户控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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