CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2010
    Posts
    1

    Pull Single Eval from Multiple Eval TemplateField

    Hello, I'm a junior developer, and I have a question.

    Code:
    <ItemTemplate>
         <span style="font-weight: bold;">Q: </span><&#37;# Eval("FAQTitle") %><br /><br />
         <span style="font-weight: bold;">A: </span><%# Eval("FAQText") %><br /><br />
    </ItemTemplate>
    Above is what is contained in my templatefield. In my code behind I am trying to pull just the FAQTitle content onselectedindexchanged in my gridview, as such:

    Code:
    int faqID = 0;
         var faq = from x in db.FAQs
                        where x.FAQTitle == [this is where I'm having trouble]
                        select new
                             {
                                  x.ID
                             };
    Some feedback would be much appreciated.
    Last edited by HanneSThEGreaT; August 6th, 2010 at 02:52 AM. Reason: Added Code tags

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,284

    Re: Pull Single Eval from Multiple Eval TemplateField

    Please use &#091;CODE] tags when posting code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured