[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework

nettiers and gridview

Gabriel Pineda

4/8/2008 3:45:00 AM

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!


2 Answers

SoftLion

4/8/2008 10:09:00 AM

0

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

"Gabriel Pineda" <gabrielpineda2001@hotmail.com> a écrit dans le message de
news: ejG5%23rSmIHA.1208@TK2MSFTNGP03.phx.gbl...
> 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!
>
>


Gabriel Pineda

4/8/2008 12:36:00 PM

0

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

"SoftLion" <nospam@replyToGroup.com> escribió en el mensaje
news:%23BVOhCWmIHA.5956@TK2MSFTNGP03.phx.gbl...
> <asp:HyperLink visible='<%# txtField.Text.Lenght>0 ? true : false %>'>
>
> "Gabriel Pineda" <gabrielpineda2001@hotmail.com> a écrit dans le message
> de news: ejG5%23rSmIHA.1208@TK2MSFTNGP03.phx.gbl...
>> 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!
>>
>>
>
>