Click here to Skip to main content
15,886,795 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionhow to select first several datarow from a dataset, and how to create a dataset from datarow? Pin
Seraph_summer5-Sep-09 9:35
Seraph_summer5-Sep-09 9:35 
AnswerRe: how to select first several datarow from a dataset, and how to create a dataset from datarow? Pin
Abhishek Sur5-Sep-09 10:16
professionalAbhishek Sur5-Sep-09 10:16 
GeneralRe: how to select first several datarow from a dataset, and how to create a dataset from datarow? Pin
Seraph_summer5-Sep-09 11:16
Seraph_summer5-Sep-09 11:16 
GeneralRe: how to select first several datarow from a dataset, and how to create a dataset from datarow? Pin
Abhishek Sur5-Sep-09 12:07
professionalAbhishek Sur5-Sep-09 12:07 
Questiondownloadable files Pin
hasani20075-Sep-09 7:35
hasani20075-Sep-09 7:35 
AnswerRe: downloadable files Pin
Manas Bhardwaj5-Sep-09 7:40
professionalManas Bhardwaj5-Sep-09 7:40 
AnswerRe: downloadable files Pin
Abhishek Sur5-Sep-09 7:54
professionalAbhishek Sur5-Sep-09 7:54 
QuestionUser control with ListView and event wiring. Pin
CodeProjectNeil5-Sep-09 5:51
CodeProjectNeil5-Sep-09 5:51 
I have an .ascx which contains a listview. Let's call it the parent.
Within its ItemTemplate I reference a second .ascx which is basically another listview, let's call it the child. On the parent, the child control is wrapped in a placeholder tag. I use this place holder tag to show and hide the child.

Psuedo code:

<asp:Placeholder id="plhChild" runat="server" visible="false" >
<uc0:childList id="childListCtl" runat="server" />
</asp:Placeholder>

The child listview has a 'close' button in its Layout Template. Let's call it "btnClose" with an onClick event of "btnClose_Click". I want to use this button to set the visibility of the containing placeholder.

I'm trying to avoid doing something like using
PlaceHolder plhChild = (PlaceHolder)childListCtl.NamingContainer since I can't guarantee every instance of the child .ascx will be contained within a placeholder.

I tried creating an event in the child that could be subscribed to.

Psuedo code:

public delegate CloseButtonHandler();
public event CloseButtonHandler CloseButtonEvent;

And in the actual btnClose_Click(Object sender, EventArgs e) event I have:

if (CloseButtonEvent != null) CloseButtonEvent();

My problem is that the delegate CloseButtonEvent is always null.

I've tried assigning the delegate in the listview's OnDatabound event of the parent and on the click event that set's the plhChild.visible = true, and I've stepped through the code and know the delegate instantiation works in both place, but again, when it gets to the btnClose_Click event on the child, the delegate is null.

Any help would be appreciated.

Neil
AnswerRe: User control with ListView and event wiring. Pin
Abhishek Sur5-Sep-09 10:30
professionalAbhishek Sur5-Sep-09 10:30 
QuestionTreeView - Load/Save XMLDataSource Pin
krishy195-Sep-09 4:59
krishy195-Sep-09 4:59 
AnswerRe: TreeView - Load/Save XMLDataSource Pin
Arindam Sinha5-Sep-09 5:44
Arindam Sinha5-Sep-09 5:44 
QuestionHave the HTML output Pin
behnam-s5-Sep-09 4:12
behnam-s5-Sep-09 4:12 
AnswerRe: Have the HTML output Pin
Manas Bhardwaj5-Sep-09 6:36
professionalManas Bhardwaj5-Sep-09 6:36 
AnswerRe: Have the HTML output Pin
Abhishek Sur5-Sep-09 8:19
professionalAbhishek Sur5-Sep-09 8:19 
GeneralRe: Have the HTML output Pin
behnam-s6-Sep-09 4:38
behnam-s6-Sep-09 4:38 
GeneralRe: Have the HTML output Pin
Abhishek Sur6-Sep-09 22:29
professionalAbhishek Sur6-Sep-09 22:29 
QuestionA Query Pin
mehrdadc485-Sep-09 2:59
mehrdadc485-Sep-09 2:59 
AnswerRe: A Query Pin
Abhijit Jana5-Sep-09 3:01
professionalAbhijit Jana5-Sep-09 3:01 
GeneralRe: A Query Pin
mehrdadc485-Sep-09 3:28
mehrdadc485-Sep-09 3:28 
AnswerRe: A Query Pin
Manas Bhardwaj5-Sep-09 3:04
professionalManas Bhardwaj5-Sep-09 3:04 
GeneralRe: A Query Pin
mehrdadc485-Sep-09 3:08
mehrdadc485-Sep-09 3:08 
GeneralRe: A Query Pin
Manas Bhardwaj5-Sep-09 3:12
professionalManas Bhardwaj5-Sep-09 3:12 
AnswerRe: A Query Pin
Blue_Boy5-Sep-09 5:28
Blue_Boy5-Sep-09 5:28 
Questionbind data from textboxes to griview Pin
Flavia A5-Sep-09 0:31
Flavia A5-Sep-09 0:31 
AnswerRe: bind data from textboxes to griview Pin
Abhijit Jana5-Sep-09 0:34
professionalAbhijit Jana5-Sep-09 0:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.