G
Guest
I am somewhat new to vb.net and asp.net (am a former VB6 turning .net
programmer)...
I have a textbox, which I would like to populate with criteria to show in
the datagrid. This works fine, however, when no text is found in the
textbox, there are no results to display. I would like to if the textbox is
blank, display all records and use the textbox as a filter...
Does anyone have any advice for me on this?
The offending code is below...
SelectCommand="SELECT [fldComputerName], [fldSystemModel], [fldAssetTag],
[fldServiceTag], [fldSupportExpiration], [fldServerApplication] FROM
[tblComputers]
WHERE ([fldComputerName] LIKE '%' + @fldComputerName + '%')">
<SelectParameters>
<asp:ControlParameter ControlID="txtServerName" Name="fldComputerName"
PropertyName="Text" Type="String" />
</SelectParameters>
programmer)...
I have a textbox, which I would like to populate with criteria to show in
the datagrid. This works fine, however, when no text is found in the
textbox, there are no results to display. I would like to if the textbox is
blank, display all records and use the textbox as a filter...
Does anyone have any advice for me on this?
The offending code is below...
SelectCommand="SELECT [fldComputerName], [fldSystemModel], [fldAssetTag],
[fldServiceTag], [fldSupportExpiration], [fldServerApplication] FROM
[tblComputers]
WHERE ([fldComputerName] LIKE '%' + @fldComputerName + '%')">
<SelectParameters>
<asp:ControlParameter ControlID="txtServerName" Name="fldComputerName"
PropertyName="Text" Type="String" />
</SelectParameters>