Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Problem formatting db output

Posted on 2006-05-25
Medium Priority
Last Modified: 2012-05-05
I'm generating a datagrid where one column represents a percentage...I need to add the percent sign in the grid following the integer. Visual Studio insists on breaking the line within the HTML code that defines the grid:

<%# DataBinder.Eval(Container, "DataItem.Score") %> -- break here

meaning there's a space following the integer. (this is the place where i insert a standard rant against the VS community at large - you are a disgrace to user communities everywhere in that you've allowed MS to publish such a brain dead editor for so long).

So how do I work around this idiot editor's idiocy?
Question by:juststeve
  • 3
  • 2
LVL 44

Accepted Solution

Arthur_Wood earned 1000 total points
ID: 16760077
<%# DataBinder.Eval(Container, "DataItem.Score") & "%">

you need to APPEND (that is what the & operator does - it appends two strings together, to create a single result string)  the string produced by the function DataBinder.Eval(Container, "DataItem.Score")  with the STRING "%"

before ranting about Microsoft, you might try to learn a little bit about how the language is supposed to be used.


Author Comment

ID: 16760097
thxk...originally tried appending with a + which of course errors. Are you sure you want to defend VS? It's nothing to do with the language...the editor is a sham...see Dreamweaver for a how to.
LVL 44

Expert Comment

ID: 16760339
I have been using VS for almost 10 years, through several interations, and I feel very comfortable with it.  I have never used DreamWaever, and don't plan to.

I do mostly Windows Desktop app development (and occasional WEB app developement), and the ability to create both the User interface, as well as the back-end Business and Data Tier components in the same IDE is a great advantage.  I do more that simply build the User interface, which is my understanding of the main function of DreamWeaver.


Author Comment

ID: 16760483
I don't doubt our different viewpoints stem from a) your history with the product; b) Win development vs. HTML coding. And I'm not trying to convince you of anything beyond...as an HTML editor VS is worse than worthless. It has many of the same 'traits' that Frontpage had that opened the door for Dreamweaver 8-10 years ago.

It's astounding that a product that is so freaking good with Intellesense code handling is so freaking primitive when it comes to handling HTML. The knock on the user community is mainly tongue in cheek...the complaints have been expressed to MS since FrontPage and they've chosen to let this aspect of the product wither.

It's fair to relegate DW to 'Front-end' but it's so much better than VS as that aspect that it's worth the price just for those functions...but VS's insistence on reformatting HTML code is simply inexcusable.
LVL 44

Expert Comment

ID: 16763441
the reformatting issue has been resolved in VS 2005.  Just so you are aware the MS does pay attention to the developer community.


Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month13 days, 15 hours left to enroll

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question