如何在一页加载事件中执行2-3处理? [英] how to do 2-3 process in one page load event?

查看:89
本文介绍了如何在一页加载事件中执行2-3处理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的pageload事件中有3或4个活动.但有时我只想要一项活动该怎么办?

请帮助我
预先thanx

there are three or four activity on my pageload event. but at time i want only one activity how can i do?

plz help me
thanx in advance

推荐答案

您只需要进行一些过滤,无论是什么,基于会话,查询字符串,路由,用户事件,...
您必须说出您想限制进程的原因和参数!

您可以使用if/else if语句或类似foreach的循环,然后在其中使用if子句,
一切都取决于您的应用程序逻辑.
you only need some filtering, what ever , base on session, querystring, route, user events , ...
you Have To Say why and with which parameter do you want to limit the process!

you can use if/else if statement or a loop like foreach, then use if clause in there,
its all base on your application logic.




如果您对每个事件都有特定的条件,则可以将所有这些活动放在有条件的情况下.

就像,
if(conditon1)
第一次活动
否则if(conditon2)
第二次活动
....


高兴的编码:)
Hi,

If you are having specific conditions for each of these events, then you can put all these activities in side there own if conditions.

Like,
if(conditon1)
1st activity
else if(conditon2)
2nd activity
....


Happy Coding :)


Nice CodeProject文章可从具有C#的多进程体系结构 [ ^ ]用于同时执行多个.NET进程.您可以使用Page_Load()方法来执行此方法.
Nice CodeProject article is available at Multi Process Architecture with C#[^] for multiple .NET process execution at the same time. You can execute this methodlolgy withing Page_Load() method.


这篇关于如何在一页加载事件中执行2-3处理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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