471,310 Members | 1,382 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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


Hi everyone,

I'm neck deep in ASP.NET and sinking fast ;) Any help much

I have two user controls on a page that I want to communicate with each
other. One control is called RoleList and allows the user to select
the type of view they wish to see on the page. The other control(s) -
sometimes there may be several - then change the stored proc, query etc
they use to extract info from sql.

Therefore, I have set up the RoleList to generate an event and coded
the other control(s) to listen and recieve it.

The problem is timing. I've done some tracing to see what happens and

1 aspx.page Begin Init
2 aspx.page End Init
3 aspx.page Begin LoadViewState
4 aspx.page End LoadViewState
5 aspx.page Begin ProcessPostData
6 aspx.page End ProcessPostData
7 Control ID: RoleList - role was previously set in the viewstate:
8 Control ID: StudentList - role was previously set in the viewstate:
9 aspx.page Begin ProcessPostData Second Try
10 aspx.page End ProcessPostData Second Try
11 aspx.page Begin Raise ChangedEvents
12 aspx.page End Raise ChangedEvents
13 aspx.page Begin Raise PostBackEvent
14 Changing role to: Secretary
15 Control ID: RoleList - changed role to: Secretary
16 Control ID: StudentList - changed role to: Secretary
17 aspx.page End Raise PostBackEvent
18 aspx.page Begin PreRender
19 aspx.page End PreRender
20 aspx.page Begin SaveViewState
21 aspx.page End SaveViewState
22 aspx.page Begin Render
23 aspx.page End Render
Line 7 and 8 came from the page_load event in each control.

Line 14 came from the event being fired and the next two is where the
event is caught.

But the Load event (which contains the data binding for the list /
grids etc) for the response has already happened! Therefore the user
must click the role they want to see TWICE!!!

I could probably make some public properties in the base page and
read/write info from them to get around this. But this will mess up my
otherwise quite low coupling and I don't want to.

Thanks in adv.


Jul 21 '05 #1
0 927

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by jj | last post: by
7 posts views Thread by jamie | last post: by
9 posts views Thread by Amir Ghezelbash | last post: by
3 posts views Thread by gregory_may | last post: by
2 posts views Thread by Steven D'Aprano | last post: by
2 posts views Thread by julie.siebel | last post: by
3 posts views Thread by CSharpner | last post: by
reply views Thread by Daniel Fetchinson | last post: by

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.