473,325 Members | 2,308 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

ASP.NET page_load event

I wanna run code in 2nd page load . How can I do so?
Oct 20 '08 #1
8 1242
iam_clint
1,208 Expert 1GB
Can you give a little more detail on what you are trying to accomplish?
Oct 20 '08 #2
Can you give a little more detail on what you are trying to accomplish?
Peace upon u
I put login at master page, I wanna user when login , his data will retrieved from db according to his user name at my form.
at 1st time of loading page the session["id"] returned null and that is normal.
I traced the code and note that after 2nd page load I can put my code.
I tried to make counter to count times of loading but at every time of load the counter is reset to its initial value.
Thanks for ur caring.
Rasha
Oct 21 '08 #3
DrBunchman
979 Expert 512MB
Hi Rasha,

It sounds like you are using ASP.NET - can you confirm whether this is true?

If so then you can test whether the page load is a post back when you set your counter variable. In VB it would be something like:

Expand|Select|Wrap|Line Numbers
  1. If Not Page.IsPostBack Then iCounter = 0
Does this help?

Dr B
Oct 21 '08 #4
Hi Rasha,

It sounds like you are using ASP.NET - can you confirm whether this is true?

If so then you can test whether the page load is a post back when you set your counter variable. In VB it would be something like:

Expand|Select|Wrap|Line Numbers
  1. If Not Page.IsPostBack Then iCounter = 0
Does this help?

Dr B
Peace upon u
Yes I use asp.net.
I tried what u told me but still the same problem happen.
Thanks
Oct 21 '08 #5
DrBunchman
979 Expert 512MB
I've moved this post for you to the .NET Forum where it belongs - please post all future ASP.NET questions in here.

Can you print the code please of what you are trying to do?

Thanks,

Dr B
Oct 21 '08 #6
I've moved this post for you to the .NET Forum where it belongs - please post all future ASP.NET questions in here.

Can you print the code please of what you are trying to do?

Thanks,

Dr B
Thanks sir 4 reply and inshallah I will do so
Oct 22 '08 #7
Frinavale
9,735 Expert Mod 8TB
Hey!

Please take a look at your other thread. I gave a whole bunch of links pointing you in the right direction there and was waiting for you to tell me more about what you've tried and what problems you're facing.

Please do Not double post your questions in the future.
Oct 22 '08 #8
ulai
15
I'm a newbie in asp.net. i don't know but maybe this can help, pliz try it :

the main code : application.item("name")=value


dim a as string
a=application.item("name")

Is it can help?
Oct 23 '08 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: z. f. | last post by:
Hi, i have a class that is derived from System.Web.UI.Page, and this is the class i use in my application as PageBase. all other page classes are deriverd from my PageBase instead of the...
3
by: Studio P.M. | last post by:
Dear colleagues, I kindly ask the C# developers community to help me to REALLY understand the Page_Load event, so to REALLY have it under control. Reason for this question is that I cannot...
0
by: Dailan | last post by:
Hi, I create a tree view. Each node has link button associate with it, which includes add, edit, delete buttons. The way I did is for users who have very low capablity of using computer. Now I...
7
by: Jibey | last post by:
Hello: I'm facing a very strange problem. When I run my Web application in Visual Studio.NET the Page_Load event is not executing. Other events like a Button_Click are executing. It doesn't...
14
by: V. Jenks | last post by:
I'm a little rusty having not touched .NET for 6 months and I can't remember why Page_Load is happening twice in this code: private void Page_Load(object sender, System.EventArgs e) {...
2
by: Dave | last post by:
Hi, this is a follow-up to an earlier question but I really haven't found a definitive answer in my search If I have a Base and Derived webform, I've found that the dervived Page_Load event...
4
by: Seraph | last post by:
Again, I'm rather new here, so if I fail to follow any etiquette, please forgive me and let me know what I've done wrong, but I think this might interest quite a few people. One of my colleaques...
5
by: Andy | last post by:
Hi all, I have a site with the following architecture: Common.Web.dll - Contains a CommonPageBase class which inherits System.Web.UI.Page myadd.dll - Contains PageBase which inherits...
1
by: puja | last post by:
hi all, I have this .aspx page for which the Page_load event occurs twice. I found out while debugging. After searching google, I tried checking with Page.Ispostback method and also had...
1
by: rockdale | last post by:
Hi, I have a masterpage and on the page_load event I Populate my mainmenu from database. I the page_load event of my content, I am trying to programmly select the menuitem that represent...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.