Chevy Mark Sunderland

Chevy Mark Sunderland

  • NA
  • 188
  • 166.6k

Show `HyperLink`

Apr 10 2012 5:53 AM
Hi there, I hope your appreciated help.

First of all I must say that I am a newbie when it comes to net language.

This is my problem.

I want to show `HyperLink3` enabled when the Bind("myState") is equal to `validate` and show `HyperLink3` desabled when the Bind("myState") is equal to `not validate`.

If you have link for similar task, please give it me.

Can you help me? thank you in advance.
Your help would be very appreciated

Thanks for your time and hints

<asp:TemplateField HeaderText="myState" SortExpression="myState">
<ItemTemplate>
<asp:Label ID="Label1" Text='<%# Eval("myState") %>' Runat="Server"/>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList id="myState" Runat="Server"
DataSourceID="SqlDataSource2"
DataTextField="myState"
DataValueField="myState"
SelectedValue='<%# Bind("myState") %>'
Font-Size="8pt"/>
</EditItemTemplate>
</asp:TemplateField>


<asp:TemplateField HeaderText="Link" SortExpression="Link">
<ItemTemplate>
<asp:Panel ID="Panel3" Runat="Server">
<asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl='<%# Eval("Link") %>' Text='<%# Eval("Link") %>' />
</asp:Panel>
</ItemTemplate>
</asp:TemplateField>

Answers (4)