Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I add Task List items to csHTML in Visual Studio 2010?

Background:

I am fairly new to Visual Studio 2010 (worked on Lua, LIMSBasic (Labware) and a few others that didn't use decent IDEs and love the idea of task lists being pulled out of the comments I write right in the code.

I have worked out how to use comments to generate all manner of "// TODO:" and other task list and found some good lists on stackoverflow for what type I can do but I can't establish (no mater how hard I abuse google) even if it's possible to add them to csHTML files nevermind how!

I have tried using all of the following:

<!--// TODO: Work out how to add todo stuff to the tasklist!--> // TODO: Work out how to add todo stuff to the tasklist! <!--TODO: Work out how to add todo stuff to the tasklist!--> <!-- TODO: Work out how to add todo stuff to the tasklist!--> @// TODO: Work out how to add todo stuff to the tasklist! 

...but nothing was added to the Task List.

Question:

So my question(s) is/are: Is it possible to add "TODO:" and other task list item to csHTML (MVC 3 using razor) and if so HOW?

like image 260
GazB Avatar asked May 28 '11 07:05

GazB


People also ask

How do I find the todo list in Visual Studio?

From within Visual Studio Go to View -> Task List. This will display the Task List window and show you any area of your open Solution that has existing comments that start with // TODO . You can filter down to your Current Project, Current Document, or Open Documents.

How do you call a page with a controller?

Controllers are just classes you can call action like methods from another controller. The razor page you want to return must be from some controller action . Call that action using new Controller. Action(params) return result as result is IActionResult for mvc.


1 Answers

The following should work.

@{     //TODO: do stuff here  } 

or

@{/* TODO: do stuff here */} 

As it first has to go into "code" mode, and then you can use a task comment.

But apparently the following does not work (in my visual studio):

@*TODO: do stuff here *@ 
like image 72
Yet Another Geek Avatar answered Sep 21 '22 10:09

Yet Another Geek