[thelist] ASP.NET 2.0 QueryStringParameter DefaultValue

Rob Smith rob.smith at lexjet.com
Tue Dec 20 13:22:51 CST 2005



For the life of me I cannot get the answer to do a wildcard in ASP.NET




<asp:HyperLinkField DataTextField="Customer"
DataNavigateUrlFields="Customer" NavigateUrl="Default.aspx"
HeaderText="Customer" SortExpression="Customer" />



        <asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:CommerceSQLConnectionString3 %>"

            SelectCommand="SELECT ... Company like '@Customer' ">


              <asp:QueryStringParameter DefaultValue="%"
ConvertEmptyStringToNull="true" Name="Customer"
QueryStringField="Customer" Type="object" />




This doesn't return anything when it should. Basically, I want the
entire recordset to show up initially, but someone clicks the link in
the GridView, the query is supposed to fine tune the results to that
specific Customer.


Thanks for anyhelp,

Rob Smith
rob.smith at lexjet.com
(941)330-1210 Int'l
(941)330-1220 Fax
1680 Fruitville Road, 3rd Floor
Sarasota, FL 34236

Proud Sponsors of the Professional Digital Imaging Association (www.pdia.org)

More information about the thelist mailing list