Hi,
i have a module that uses a gridview to show some data. when a row is selected a detailsView is bound which shows more details for the selected grid row.
I also have a insert button that sort of works like a feedback form, when someone clicks the insert button i want the first textbox to display the text of the selected row.
For example:
when some selects a row in the datagrid the formview will display that datagrids subject, senderName, and SenderEmail in the detailsView. When someone clicks the insert button (or reply button in this case). It changes the DefaultMode of the details view to insert. I then want to have the subject column / textbox to display the subject text.
I cant seem to be able to find the txtSubject Textbox in the InsertItem Template. The code i have so far is.
Label lblSubject= (Label)detSelectMessage.FindControl("lblSubject");
Control ctlSubject = Globals.FindControlRecursiveDown(this.detSelectMessage, "txtSubject");
if (ctlSubject != null)
{
((TextBox)ctlSubject).Text = "Re: " + lblSubject.Text
}
Now if i place this code in the DataBound Event Handler, without the lblsubject portion it works. but once i put the lbl subject part into it itstops working. What am i doing wrong?