losing mvc intellisense - asp.net-mvc

My intellisense doesn't work in aspx or ascx pages running mvc 1.0
When I save or build it does not show the intellisense, but if I do a clean then it works
it this a bug or am I missing something ?
thanks

Mayby you already try it, but have you tried to click ctrl + space when writing code, that make apear intellisence when you coding.
I need to use it sometime.

Doing a reset of settings worked for me.
Still no Intellisence inside of href-target-strings though, but I guess that's not suppose to work in current version.

Related

I can't find a layout file in settings page of Umbraco version8 but it can normal display in website

I have trouble when I deal with a case that made by former colleague.
He made a home.cshtml and layout just only write one line:
#{ Layout = "master.cshtml"; }
I click any tree list in settings page but still can't find any file named master.cshtml!
But header is normal display of the webpage.
I really really so confused...
I check the file in visual code, I really sure the master.cshtml is header of home.cshtml, but in the Umbraco online,I just can't find the Mysterious File!
Where is it going!?
I need find the file to change text...
I try to search keyword like :Umbraco layout but can't find right answer for me... if you know what happen and what is the answer, please tell me, I can't thank you enough!
Every project is individual. But commonly developers store layout pages in the "Partial" folder.
The Layout/Master.cshtml file might not be created through Umbraco, but might be created through e.g. Visual Studio or Visual Studio Code, meaning Umbraco isn't aware that it exists.
To edit it, you would then have to edit the file directly through FTP, using an editor such as Visual Studio Code or similar.

MVC/Razor - Intellisense Pop-Up Closes When there is a Following Parenthesis

When writing code in Razor, the intellisense drop down box does not work right. It will open up and then close itself less than a second later.
This does not happen to me when I am writing a class or something to that effect, it is only present when I am working on a view.
To explain what happens as I type
#Html.
The Intellisense box opens and stays open.
#Html.DisplayFor(p => M) //The closing parenthesis is automatically written by VS
The box opens at shows possible inputs that begin with M, but immediately closes.
#Html.DisplayFor(p => Model.)
The box opens and shows the properties associated with the model, but then immediately closes.
If however, I add a space:
#Html.DisplayFor(p => M )
The box stays open.
#Html.DisplayFor(p => Model. )
The box stays open.
Is there a setting or something that is doing this to me?
This problem persists through closing and reopening VS, as well as rebuilding the project.
Using Visual Studio 2015 Professional 2015 Update 2
Working with Razor while doing MVC.
I also have Web Essentials installed, if there is a setting in that that might be causing this.
In my specific case, i was able to solve the problem by installing the latest version Microsoft ASP.NET and Web Tools.
https://marketplace.visualstudio.com/items?itemName=JacquesEloff.MicrosoftASPNETandWebTools-9689
Once I installed it, the problem was gone. It is likely that this update fixed something that could be fixed with an older version, but either way I'm happy.
(I found this in Visual Studio under Tools->Extensions and Updates...->Updates->Visual Studio Gallery)
I have very same annoying problem sometimes (VS2015), I don't know rhyme or reason but one example: At top of cshtml file I had...
#{
Style.
}
When I pressed the "." after Style, the intellisense showed for a split second, then goes away.
I know this is stupid but when I added a return key to add line space - then I get intellisense working proper again.?
#{
Style.
}
I know it's not a fix but this work around quickly gets me going again.
Deleting all spaces after Style. up to } so it looks like Style.} also worked for me so there may be some special character causing issues.

ASP.NET MVC with Bootstrap 3 Not Rendering correctly

I'm using Visual Studio 2013 RC to create a new ASP.NET MVC project. Running the sample generated by the template works as expected. When I update bootsrap to the latest version (3) and rerun the application, my navigation bar is not rendering correctly. It's basically collapsed with just the "Application Name" link and icon in the upper left corner. If I click on it, then the menu appears, but only vertically. Something clearly wrong. Anyone else seeing this behavior?
The structure of many items - including the navbar - has changed from Bootstrap 2 to 3. If you just start applying the v3 CSS to the v2 code, things are bound to go heywire.
I would start with checking out the Bootstrap 3 docs for the navbar (http://getbootstrap.com/components/#navbar) and update your HTML accordingly. Then see if you are still having an issue.
Thanks everyone for the feedback/discussion. This was indeed helpful. For the benefit of the discussion, I found this post to be spot on in getting my MVC project updated to Bootstrap 3. This is only temporary though. Once VS RTM's, this shouldn't be an issue.

jQuery UI dropdown select

I wanna have a dropdown menu like this link: http://datatables.net/release-datatables/examples/basic_init/table_sorting.html
(The one that are right below "Live example" line);
I haven't got many experience of working with jQuery UI, and I guess that result is produced by using it. Could you suggest me a way to create that dropdown.
Thank you.
P/S: that may be ok if it is not using jQuery UI (it's just my guess)
That solution doesn't appear too complex - they've got all the data already, and they're just hiding rows depending on what's selected.
On the other hand, as that's an open source project, you could just download it or use the hosted versions and integrate it on your site, which is probably easier than rolling your own solution.
Ok, got it. This is just default style in Firefox (There's no style applying for it yet). I got this misunderstand due to changing browser.

Cannot put breakpoint in an ASP.NET MVC view when running in IIS7

I'm forced to use IIS7 because Casini is only x86 and we are running with x64 ELMAH.
Something I've noticed since I've switched is that I cannot set breakpoints in ASP.NET MVC views anymore. I'm not totally sure it's because of IIS7, is it? Does it happen to you as well?
The Visual Studio (2008) project is configured to use the local IIS7. I normally run the project by pressing F5, which actually doesn't run anything. It compiles the code and attaches itself to the corresponding IIS7 process.
The limitation of breakpoints is very hard into my environment now. If I right click a piece of code in a view there's a "Breakpoint" sub-menu, like before, with the Insert Breakpoint. But when I try to insert a breakpoint I get a blue message at the bottom of Visual Studio saying:
This is not a valid location for a breakpoint.
and no breakpoint is set. Setting breakpoints in the compiled code, like the controller presents no problem.
Is there any way to solve put a breakpoint in the view?
You need to make sure you are breaking on something that is actually server side!
You obviously won't be able to break on:
<h2>Title<h2>
And perhaps surprisingly, you can't break on:
#SomeCode here
But you can break on:
#{
SomeCodeHere
}
You can try attaching the process (Ctrl+Alt+P) to w3wp.exe and running it from there. If there are more than one w3wp.exe process running, consider using the tips from InfoPath MSDN blog.
That said, being "forced to use IIS7" over Cassini is like being forced to choose ice cream over raw sewage.
Try running VS as the administrator, I ran into this problem trying to attach to the IIS7 w3wp.exe. I started mine as admin and has worked just fine.
I had the same issue then I installed ASP.NET 5 RC1 Update 1, things got worst.
I solved the problem deleting the ComponentModelCache folder out of the %appdatalocal%/Microsoft/VisualStudio/14.0 folder.
Can you set break points anywhere else in your code?
I've never personally set a break point in one of my views, have you tried setting the break point in the controller on the line which returns the view and then tried stepping into the view from there?
What are your trying to debug in your view? It should be kept clean and simple with no logic. That is why I've never needed to debug one.
Enable line numbers for HTML here
Tool -> Options -> Text Editor -> HTML -> General

Resources