nedash says:
<
asp:Label
ID
=
"Lbldate"
runat
=
"server"
Text='<%#toPersianNumber(miladitoshamsi(Eval("Date_confirm").ToString()))%>' CssClass="datereq3"></
asp:Label
>
Remove ToString() from the Eval and pass only object.
Then in code behind check the object parameter is null or not and return value as per your need using the IsDBNull method of Convert class.
HTML
<div id="divmo1" runat="server" visible='<%#Eval("Date_confirm").ToString() == "" ?false : true %>'>
<asp:Label ID="Lbldate" runat="server" Text='<%#toPersianNumber(miladitoshamsi(Eval("Date_confirm")))%>' CssClass="datereq3"></asp:Label>
</div>
Code
public string miladitoshamsi(object miladi1)
{
if (!Convert.IsDBNull(miladi1))
{
DateTime miladi = Convert.ToDateTime(miladi1);
System.Globalization.PersianCalendar shamsi = new System.Globalization.PersianCalendar();
return string.Format("{0}/{1}/{2}", shamsi.GetYear(miladi), shamsi.GetMonth(miladi), shamsi.GetDayOfMonth(miladi));
}
else
{
return string.Empty;
}
}