Hi,
I want to add a control to a datagrid depending upon the value returned by a Stored Procedure.
But i am not able to do so. Pls help me out.
The code which i had written...
In aspx.vb
Public Function IsXMLNull(ByVal objXMLReport As Object, ByVal objScheduledDate As Object, ByRef blnLabel As Boolean) As Boolean
Try
If objXMLReport Is DBNull.Value Then
blnLabel = True
Else
blnLabel = False
End If
Catch
Response.Write(Err.Description)
End Try
End Function
in aspx
<%#IsXMLNull(Container.DataItem("ReportXML"),Container.DataItem("ScheduledDate"), blnLabel) %>
<%
If blnLabel = True Then
%>
<asp:Label id="lblDate" runat="server" Text='<%# Container.DataItem("ScheduledDate")%>'></asp:Label>
<%
Else
%>
<asp:LinkButton id="Date" runat="server" OnCommand="UserCommand" CommandArgument= '<%# Container.DataItem("ScheduledDate")%>' Text='<%# Container.DataItem("ScheduledDate")%>' >
</asp:LinkButton>
<%
End If
%>
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).