Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Page_load happening two times

Author  Topic 

reflex2dotnet
Yak Posting Veteran

99 Posts

Posted - 2007-03-16 : 10:29:33
Hi friends

I am facing a very strange problem in my application.
On clicking a hyperink which redirects to another page, i am seeing that, the target page is loading two times, and so, i am loosing the values in the variables, and hence, not getting the desired ouptut

The interesting this is that, on second time when the page loads, it is still A NOT POSTBACK

Has anyone faced this problem?
Please help me, if anyone knows how to taken care of this

Thanks in advance

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2007-03-16 : 10:41:44
I do not see any way we can help you without specifics. You are going to need to explain to us the relevant aspects of your link and the pages involved, otherwise, we're only guessing.

Would you be able to help me out with my report I am working on if I only told you that when I run it, it returns the wrong data, and gave no other details?

- Jeff
http://weblogs.sqlteam.com/JeffS
Go to Top of Page

reflex2dotnet
Yak Posting Veteran

99 Posts

Posted - 2007-03-16 : 10:49:07
Yes, you are absolutely right.
I was trying to simplify my issue, so that you all can save your time. But i was not able to convey my issue. Thanks for pointing out.
I will be more specific now onwards
This is the code sequence i am having

-- here is the problem, when i debug,, from the webform2.aspx

-- loadss webform2.aspx

- hit the linkbutton, it loads webform2.aspx, then it loads webform3.aspx

- when i click the hyperlink inside datagrid(in webform3.aspx)

- loads webform4.aspx, goes through not postback section, all the values got in variables, and it goes to bindgrid, bindmap, finising that, it agian loads webform4, and now what ia see is, all the variables are set to nothing, and ITS STILL NOT POSTBACK.

finally, i am getting the grids displayed, but not the map!!!!

Wy is this happening? Am i confusingg?

Any ideas????
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2007-03-16 : 11:06:30
Please try to give us some formatting and indenting -- it is very hard to make any sense of your code.

From what I can see, in your webform4 page, you are calling BindAccounts() before you are setting any of your data. For example, you are setting Me.WebDateChooser1.Value AFTER you call BindAccounts(), but within the BindAccounts() method you are referencing the value of Me.WebDateChooser1.Value, which has not been set yet.

You just need set breakpoints at the various events and step through you code and follow which events are called, and what the values are at that time.

That's all I can tell for now .. it is impossible to follow the code as presented and I don't have time to cut and paste and clean it up myself so that I can parse it... you'll get much more help from me and others if you make it easier to follow.

- Jeff
http://weblogs.sqlteam.com/JeffS
Go to Top of Page

reflex2dotnet
Yak Posting Veteran

99 Posts

Posted - 2007-03-16 : 11:20:48
Sorry for the inconvinice
Thanks for your time
Thanks
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2007-03-16 : 11:25:36
No inconvenience at all, it is just very difficult to help you if you don't help us out by presenting things clearly for us. We don't get paid to help, you know, and it doesn't cost you anything ... the only catch for this free help is this: you've got the put the best effort you can in to help us help you. That's it, the only catch. Not too much to ask, if you ask me.

I'd love to help you out but when I look at your code it is very hard to follow without any formatting or indenting whatsoever.

- Jeff
http://weblogs.sqlteam.com/JeffS
Go to Top of Page

reflex2dotnet
Yak Posting Veteran

99 Posts

Posted - 2007-03-16 : 11:33:48
Yes, absolutely correct.
Better I will go through my problem once more, and try to present in a more understandbale way.
So that i can seek your valuable advices

Thanks to all SQLTEAM members!!!
Go to Top of Page
   

- Advertisement -