Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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 asp.net. 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
add comment

1 Answer 1

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
1  
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
add comment

Your Answer

 
discard

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.