Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Quotes, tags, and "greater than" signs

Reply
Thread Tools

Quotes, tags, and "greater than" signs

 
 
danthman
Guest
Posts: n/a
 
      12-23-2005
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

 
Reply With Quote
 
 
 
 
Joshua Flanagan
Guest
Posts: n/a
 
      12-23-2005
Try using the HTML escaped version.
> becomes &gt;

< becomes &lt;

so, you would write:
AND DATE &gt;= @MinimumDate


Joshua Flanagan
http://flimflan.com/blog
 
Reply With Quote
 
 
 
 
danthman
Guest
Posts: n/a
 
      12-23-2005
Yes! That was it. Thanks.

-Dan

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
enums and bitfileds and signs Jason Kraftcheck C++ 2 11-16-2007 10:19 AM
looking for a free program that can design allsorts of signs and banners and posters etc. seeyoujimmy Computer Support 7 08-01-2007 05:40 PM
Web deployment projects and British pound signs Mark Rae ASP .Net 0 03-14-2006 08:11 PM
Regexp and percent signs =?Utf-8?B?cGhpbGxpcA==?= ASP .Net 0 09-23-2004 11:59 PM
Bizarre display behavior with "+" and "-" signs in IE 6.0 only Jay HTML 12 01-09-2004 06:23 AM



Advertisments