SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created Custom User control which i am using in my application Page(which is deployed at _layouts folder).

Here is my scenario.

I have a save button in my custom user control, when i click on that control i would like to execute a method in .aspx(which is layout page). How can i acheive this ? Any ideas ?

Thanks in advance.

share|improve this question
I am having the same problem. This works perfiectly in But when i use the same thing in sharepoint, whenever i try to access public properties of user controls in sharepoint , it does not give me intellisense and then gives me build error if i just type the property.. any body help pls. – user9190 Jun 29 '12 at 7:43

This is really not a SharePoint question but here you can find an answer:

Calling a method in parent page from user control

I never actually done this but by looking at code there is nothing special and it should work on SharePoint. Of course instead of System.Web.UI.Page you are using Microsoft.SharePoint.WebControls.LayoutsPageBase

share|improve this answer
Yes you are right, this is not a sharepoint question, but i am facing this issue in sharepoint. Well, i have used this in .net website, it was working. I declared event, delegate in user control, and registered the usercontrol in application page, but i am not able to get the event in application page codebehind (for ex: usercontrol.event). I am not able to see any property in application page code behind. I dont know whats wrong . – Share Sep 29 '11 at 3:13
only difference is you might have to manually register the delegate method to the click method of the button, in OnLoad. EDIT: Just noticed that the link there includes that. – James Love Oct 28 '11 at 22:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.