David Smith

David Smith

  • NA
  • 2k
  • 0

Silverlight 4

Sep 29 2011 3:58 AM
Within A usercontrol, is there a way to reload a usercontrol if you are already on the usercontrol or page.

Basically I have a hiddens windows service running in the background. I am allowing two users to subscribe to the service.

The first user to subcribe to the service has Editing priviledges basically.

The second user to subscribe has viewer access only.
 I send send the viewer to readonly page that has a usercontrol at a readonly state or all the controls on the usercontrol are disabled. He can just view the data that Editor is editing. He have have no authority what so ever, But he can see what the Editor is doing, as the Editor is hitting the service.

When the Editor unsubscribe from the service, the Viewer automatically become the Editor now, Basically the first user pass the viewer the Editor position, And the first user is now the viewer if subscribe back to the service.

The issue I am having when the Viewer is already on the readonly page with the disabled usercontrol and he becomes the Editor, But the usercontrol should not be readonly no more the, The usercontrol should be enabled because the viewer is now the editor. I am basically make everything enabled or disabled in UserControl_loaded event.

The UserControl_Loaded Event is not being fire again, unless the userloaded is loaded again. So if the Viewer is already on the Readonly page and he now becomes the Editor, How to reload the Usercontrol or make the UserControl_Loaded Event fire. That way it will make the Readonly page Enabled.

At the moment I have navigate from the the readonly page and then navigate back to the readonly page for everything to become enabled or make the UserControl Loaded event fire

Answers (1)