Quotes, tags, and "greater than" signs

D

danthman

I'm trying to write a complex multi-line SQL select command on an
ASP.NET 2.0 page, but I'm not sure how to get the "greater than" sign
(>) into the quotes without it thinking it's a tag. Can this be done?

Here's my code (notice where it says SelectCommand= [multi-line
quote]):

-------------------------
<asp:SqlDataSource
ID="EntryDataSource"
ConnectionString="<%$ ConnectionStrings:JIGSAWExp2 %>"
SelectCommand=
"Select Name, Address, Date
WHERE Name=@CustomerName
AND Date >= @MinimumDate"
runat="server">
<SelectParameters>
<asp:SessionParameter
Name="CustomerName"
SessionField="CustomerName"
Type="String" />
<asp:SessionParameter
Name="MinimumDate"
SessionField="MinimumDate"
Type="DateTime" />
</SelectParameters>
</asp:SqlDataSource>
-------------------------

I've tried a few things, like putting the whole quote inside <% %>,
putting each line of the quote inside <% %>, and just ">=" inside <%
%>, but none of that worked.

Should I just give up and set the command in the code-behind or is
there some easy way to do this I'm just missing?

Thanks in advance,

-Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top