if you are using dreamweaver mx to code asp.net applications you will probably be using a lot of mm:dataset tags. if you ever need to edit the commandtext attribute of the mm:dataset tag, you may well see the charming error message “The server tag is not well formed”.
one possible reason for this error is the presence of single quotes in your query. for example, the following code will not work:
CommandText='<%# “SELECT substring(description, 0, CHARINDEX(‘ ‘, description, 200)) as intro FROM products” %>’
luckily there is an easy way to get rid of this error. simply remove the outer single quotes surrounding the attribute:
CommandText=<%# “SELECT substring(description, 0, CHARINDEX(‘ ‘, description, 200)) as intro FROM products” %>
Wow! This tip is amazing. I was almost ready to abandon using the MM:DataSet altogether (and hand coding it). Whew! It was so hard to find info or documentation on how to alter their tags!
(I guess Dreamweaver does this so that it will be harder for hackers to enter single quotes into querries because of injection attacks? Who knows…)
BTW, while posting here I got this error 🙂
Use of uninitialized value in substitution (s///) at plugins/Blacklist/lib/Blacklist/App.pm line 44.
hi mornington,
thanks for letting me know about this. your comment got through ok but was not instantly approved due to how old this post was. my anti-spam plugin clearly needs some tweaking to stop the pesky error messages though!
The post might be old, but who would have thought that almost a year later this tip would still be helping total strangers! Cool! 😉
ah, it’s not that deep an insight or anything but thanks for saying thanks 🙂 it’s nice that almost a year later someone left a comment to say i helped a little 🙂
The solution helped me too – VisualStudio 2005 – Jan2006. Thanks
you just made me a VERY happy man. HOURS and HOURS of frustration due to stupid little single quotes… who’da thunk? 😀
I like it thanks
Awesome…sorted me out a treat!
This same error will happen if you have runat=”server” inside a comment.
Thanks a lot JM……. Ur tip saved my soul…
This helped me as well .. VS 2008 – July 08!!
😀
Thanks a lot, this was driving me crazy (I actually had the problem in an image control setting the AlternateText property)
I can’t believe this was the problem
Worked for two hours on this issue until I found this page – wow, can’t believe it – thank you!
Mega Thumbs up for this tip… I’ve been working in .NET for 10 years and this issue just comes up again and again…. Thanks!
Thanks JM – you saved me,too re runat