Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I am working on an asp.net project that has a usercontrol that is being used for the page heading. There are three buttons for navigation.

 

There are four aspx pages that use the usercontrol.

 

On one of the pages, I need to check to see if changes have been made when any of the buttons are clicked and ask the user if they want to save changes.

- I got this to work by adding an eventhandler to the page and doing a raiseevent when a button is clicked.

 

 

The other pages do not need to check for changes when the buttons are clicked.

- I have tried adding an eventhandler and doing a raiseevent when a button is clicked, but it doesn't do anything.

 

How would you recommend solving this problem? Even if I can get the eventhandler to work on the other tpages, I don't like having to duplicate routines in each of the pages.

 

I could also move the buttons out of the usercontrol and have them on each page, but this also creates duplicate code.

 

Recommendations?

 

Thanks!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...