Advertisement

10.08.2007 at 05:24PM PDT, ID: 22880231
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Conditional statement in ASP GRID

Tags: conditional, gridview, statement
What is wrong with the statement to  show a Grid Column.  I am checking the value of ATTACHMENT_FILE column from database, and if this value is NULL then i want the column to display the value in column FILE_NAME_URL from the database.


<%# IIf(Eval("ATTACHMENT_FILE") = "",<%#Eval("FILE_NAME_URL")%>, <img src="Assets/<%#Eval("ATTACHMENT_FILE")%>) %>

   <asp:GridView ID="dgGrid" runat="server"  AutoGenerateColumns="False"  Width=100% CellPadding="4" ForeColor="#333333"   DataKeyNames="ID" PageSize="25" AllowPaging="True" >
                                    <Columns>
                                   
                                        <asp:TemplateField HeaderText=" ">
                                            <ItemTemplate>
                                            <TABLE width="100%">
                                                <TR><TD colspan="2" valign="top"><Strong><%#Eval("DEALS_NAME")%></Strong></TD></TR>
                                                <TR>
                                                <TD width="80%"><p class="InputDisplay"><%#Eval("DEALS_DETAILS")%></p></TD>
                                                <TD width="20%">
<%# IIf(Eval("ATTACHMENT_FILE") = "",<%#Eval("FILE_NAME_URL")%>, <img src="Assets/<%#Eval("ATTACHMENT_FILE")%>) %>
"/></TD>
                                                </TR>                                                <TR><TD width="100%" colspan="2"><TABLE width="100%" class="InputDisplay"><TR><TD  align="left" width="20%">Vendor:&nbsp;<i><%#Eval("VENDOR_NAME")%></i></TD><TD align="left"  width="20%">List Price:&nbsp;<i>US$<%#Eval("LIST_PRICE")%></i></TD><TD  align="left" width="20%">Category:&nbsp;<i><%#Eval("DEAL_CATEGORY")%></i></TD><TD  align="left" width="20%"><a target="_blank" style="TEXT-DECORATION: none" href="NotifyCredits.aspx?ID=<%#Eval("ID")%>">Notify Friends & Earn Credits</a></TD><TD align="left" width="20%"><a target="_blank" style="TEXT-DECORATION: none" href="1-ClickAccess.aspx?id=<%#Eval("ID")%>">1-Click Access</a>&nbsp;&nbsp;&nbsp;<!--<a style="TEXT-DECORATION: none" href="DealsPreview.aspx?ID=<%# Eval("ID") %>&Option=2">more details</a>&nbsp;--></TD></TR></TABLE></TD></TR>
                                               </TABLE>
                                             
                                            </ItemTemplate>
                                           <HeaderStyle CssClass="InputDisplay" HorizontalAlign="Left" VerticalAlign="Top" Width="15%" />
                                        </asp:TemplateField>
                                     
                                       

                                    </Columns>
                                     <RowStyle Font-Names="Arial" Font-Size="Smaller" BackColor="#EFF3FB" />
                                    <AlternatingRowStyle  Font-Names="Arial" Font-Size="Smaller"  BackColor="#F7F7FF" />
                                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                    <EditRowStyle BackColor="#2461BF" />
                                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                    <PagerStyle cssclass="tableLabel" ForeColor="Black" HorizontalAlign="Left" />
                                    <HeaderStyle cssclass="TableMain" Font-Bold="True" height=10px ForeColor="White" />
                             <PagerSettings NextPageText="Next Deals&amp;gt;" PreviousPageText="&amp;lt;Prev Deals" Mode="NextPrevious" />
                                </asp:GridView>
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: TECH_NET
Solution Provided By: TECH_NET
Participating Experts: 1
Solution Grade: A
Views: 4
Translate:
Loading Advertisement...
10.08.2007 at 08:16PM PDT, ID: 20038386

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.31.2008 at 05:46PM PST, ID: 20793423

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29 / EE_QW_2_20070628