4ncid
asked on
Need syntax help building hyperlink
I am having problems with syntax in this function. It checks the value of every data item in the ItemTemplate of an ASP Repeater. If “_” is found it sets the whole line as a hyperlink, otherwise just displays the line. It is finding the “_” , displaying the text, but the hyperlink is not active.
<ItemTemplate>
<tr>
<td class="style14"> <%# CheckValue(DataBinder.Eval (Container .DataItem, "recaPrintScreen").ToStrin g())%> </td>
</tr>
</ItemTemplate>
[aspx.vb page]
Public Function CheckValue(v As [String]) As [String]
If (Left(v, 3)).Contains("_") Then
Return "<asp:HyperLink " + "ID=HyperLinkCheckValue " + "target=_blank " + "runat=server " +
" NavigateUrl=./foo.aspx?Sea rchNumber= " + strSearchNum + "&src=IOD" + "&cty=" + currentCounty + "&plead=" +
_strPleadingType + "&type=" + strPleadingTypeDetail + "'>" + v + "</asp:HyperLink>"
Else
Return v
End If
End Function
<ItemTemplate>
<tr>
<td class="style14"> <%# CheckValue(DataBinder.Eval
</tr>
</ItemTemplate>
[aspx.vb page]
Public Function CheckValue(v As [String]) As [String]
If (Left(v, 3)).Contains("_") Then
Return "<asp:HyperLink " + "ID=HyperLinkCheckValue " + "target=_blank " + "runat=server " +
" NavigateUrl=./foo.aspx?Sea
_strPleadingType + "&type=" + strPleadingTypeDetail + "'>" + v + "</asp:HyperLink>"
Else
Return v
End If
End Function
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER