Select the search type
  • Site
  • Web
Search
You are here:  Support/Forums
Support

Bring2mind Forums

Adding a control to Details.ascx
Last Post 03/04/2009 10:44 PM by Peter Donker. 4 Replies.
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
GA
New Member
New Member
Posts:40


--
03/03/2009 10:22 PM

Hi,

I was trying to accept some sort of user input by modifying the details pane. I added a textbox and a button to details.ascx but the server side events are not triggered for the button. When I debug, the onclick event for the button is never executed. Can you help me. Is it not possible to use web controls or user controls that require server side event handling in the details.ascx. What I want basically is for the user viewing the document to be able to enter some input ( say a comment) about the document that is selected, and when the button is clicked, save this data somewhere.

 

Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
03/04/2009 4:30 PM
Hi,

You need to either have the partial source or to completely override the control. The ascx already has it's codebehind which it inherits. Your added controls do not appear there.

To completely override the control check out DMX_Extensions for the DetailsPage.Details record. You'll see it points to the defautl.ascx control. You can point it to another control. Just make sure it inherits DMX.Framework.DetailsBase. This will give you access to the entry as well.

Peter
GA
New Member
New Member
Posts:40


--
03/04/2009 5:43 PM
I have the partial source and what I had done was create a new control More_Details which inherits from DetailsBase class. I added that to the DMX_Extensions table (ControltoLoad points to More_Details.ascx) and it appears as a new tab.

I can add static text or access Entry info in the code and display that etc . The issue begins when I add a web control like Everything displays fine, but the code for server side events is never called. eg Button onclicks are never executed etc.. When I debug, the only method that is hit is the page_load.

GA
New Member
New Member
Posts:40


--
03/04/2009 6:01 PM
I also tried adding a button to the Details.ascx control, added code for its click event in the Details.vb code, compiled and used the new DMX dll. But here also the onclick event is never executed.
Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
03/04/2009 10:44 PM
OK, you're in uncharted territory here. I can't give you an example of how this should be done. Maybe you need to fidget around and create your own form handling if ASP.NET doesn't want to pick it up. If there's a form and it has an action, then something is getting a hit on the server. Track down where that is and if it can be caught. If not, you might have to try and do stuff in plain HTML calling your code on the server.

My 2cts,

Peter
You are not authorized to post a reply.