Grazie Marco per l'aiuto..
Questa è la pagina che in questione
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" CellPadding="4" DataKeyNames="id_clinical_profile"
DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None">
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<Columns>
<asp:BoundField DataField="study_code" HeaderText="Study code" SortExpression="study_code" />
<asp:BoundField DataField="therapeutic_area" HeaderText="Therapeutic area" SortExpression="therapeutic_area" />
<asp:BoundField DataField="condition" HeaderText="Condition" SortExpression="condition" />
<asp:BoundField DataField="generic_name" HeaderText="Generic name" SortExpression="generic_name" />
<asp:BoundField DataField="commercial_name" HeaderText="Commercial name" SortExpression="commercial_name" />
<asp:ImageField HeaderText="Approved" SortExpression="id_status" DataImageUrlFormatString="images/ok.gif"></asp:ImageField>
<asp:TemplateField>
<ItemTemplate>
<asp:Image ID="image1" runat="server" ImageUrl='images/ok.gif'/>
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField DataNavigateUrlFields="id_clinical_profile" DataNavigateUrlFormatString="profile.aspx?id={0}"
Text="Modifica" />
<asp:HyperLinkField DataNavigateUrlFields="id_clinical_profile" DataNavigateUrlFormatString="index.aspx?id={0}"
Text="Elimina" />
</Columns>
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<EditRowStyle BackColor="#999999" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT clinical_profiles.id_clinical_profile, clinical_profiles.study_code, therapeutic_area.therapeutic_area, clinical_profiles.condition, clinical_profiles.generic_name, clinical_profiles.commercial_name, lang.img, status.status FROM clinical_profiles INNER JOIN therapeutic_area ON clinical_profiles.id_therapeutic_area = therapeutic_area.id_therapeutic_area INNER JOIN lang ON clinical_profiles.id_lang = lang.id_lang INNER JOIN status ON clinical_profiles.id_status = status.id_status">
</asp:SqlDataSource>
mentre nella classe
public partial class index : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
public string GetValue(string field)
{
if ((int)Eval(field) > 1)
{
return "ok.gif";
}
return "ko.gif";
}
}
Questa cosa mi sta facendo dannare.. questa è la mia prima cosetta in asp.net dopo anni di php!