Please help my code not work
gridview row is empty
some row Eval("Titel_English") data null
protected void postrecent_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (!string.IsNullOrEmpty(e.Row.Cells[3].Text))
{
HyperLink urllink = (HyperLink)postrecent.FindControl("sesfs") as HyperLink;
urllink.Visible = false;
}
}
}
<asp:GridView ID="GridView1" runat="server" AllowPaging="True"
AutoGenerateColumns="False" DataSourceID="SqlDataSource1">
<Columns>
<asp:TemplateField HeaderText="Titel" SortExpression="Titel">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("Titel") %>'></asp:Label>
<br />
<asp:HyperLink ID="HyperLink1" runat="server"
NavigateUrl='<%# "mysite.com/"+Eval("Titel_English") %>' Text='<%# ">" %>'></asp:HyperLink>
<br />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<br />
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:Helpline %>"
ProviderName="<%$ ConnectionStrings:Helpline.ProviderName %>"
SelectCommand="SELECT [Titel], [Titel_English] FROM [Help]">
</asp:SqlDataSource>