nettiers and gridview

G

Gabriel Pineda

hi, i have already binded a gridview and the data.
in my aspx i have something like that:
<asp:TemplateField><HeaderTemplate>Select</HeaderTemplate>

<ItemTemplate>

<asp:HyperLink id="SelectLink" runat="server" NavigateUrl='<%#
"~/patientBook_step2.aspx?idtreatment=" + Eval("IDTreatment") +
"&idpatient=" + Request.QueryString["id"]%>'><img border='0'
src='App_Themes/AdXToDefault/Images/16x16/flag.png'></asp:HyperLink>

</ItemTemplate>

and now what i want to do is to show or to not show the hyperlink depending
on the value of another field (like 'active' or something like that).

how can i do that?
thank you!
 
G

Gabriel Pineda

but the problem is that i have to evaluate a datafield...
do you know how can i do it?

SoftLion said:
<asp:HyperLink visible='<%# txtField.Text.Lenght>0 ? true : false %>'>

Gabriel Pineda said:
hi, i have already binded a gridview and the data.
in my aspx i have something like that:
<asp:TemplateField><HeaderTemplate>Select</HeaderTemplate>

<ItemTemplate>

<asp:HyperLink id="SelectLink" runat="server" NavigateUrl='<%#
"~/patientBook_step2.aspx?idtreatment=" + Eval("IDTreatment") +
"&idpatient=" + Request.QueryString["id"]%>'><img border='0'
src='App_Themes/AdXToDefault/Images/16x16/flag.png'></asp:HyperLink>

</ItemTemplate>

and now what i want to do is to show or to not show the hyperlink
depending on the value of another field (like 'active' or something like
that).

how can i do that?
thank you!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top