Microsoft Developer Network > Forums Home > Using Forums Forums > Off-Topic Posts (Do Not Post Here) > Set Text Boxes in a Details View Equal To a different Text Box on the page
Ask a questionAsk a question
 

QuestionSet Text Boxes in a Details View Equal To a different Text Box on the page

  • Friday, November 06, 2009 11:21 PMmary1544581 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I have an aspx page with a c# code behind that I have created in Visual Web Developer Express Edition.  On that page, I have a Form View that is set to the "Insert" mode, because I want to use it to save to the database.  What I am trying to do is that I want all of the text box fields in that Form View to be set to values that I have saved in the session.  Here is what I have done, but I know it's wrong because it is underlined in red.

    FormView1.FindControl("to_emailTextBox").Text = Session["SessionToAddress"].ToString();

    Does anyone know what I am doing wrong?
    • Moved byHarry ZhuMSFTFriday, November 13, 2009 2:06 AM (From:Visual C# Express Edition)
    •  

All Replies