Paste Special Gone from Visual Studio 2012 - asp.net

This is really weird. I have an ASP project. I wanted to copy text from an email into the ASPX page (designer view). So, I opened the email, copied the text (CTRL-C) and pasted it into the page. It looked nice, but looking at the source I saw that it flooded the page with MS Word style CSS. So, I undid it. I right-clicked the page, tried Paste, and got the same result (expected). Undid, then tried "Paste Special". I was pleasantly surprised when I saw several choices, including something like, Paste as plain text, but keep line feeds. I used that and it worked perfectly. I was happy!
I get another email and go to do the same thing. I open the email, select the text, Copy (CTRL-C) and go to Visual Studio to paste. Only now, Paste Special is gone! I have Paste, which throws in all of the MS Word CSS again and "Paste Alternate" which rips out all of the line feeds and formatting. There is no more Paste Special!
What the heck happened in the hour between the two emails to make Visual Studio change it's context menu and replace "Paste Special" with the useless "Paste Alternate"? How do I get Paste Special back??

Related

VS 2010 not opening css files in css editor

I have no idea how to fix this.
VS keeps opening css file in some text editing mode, see the picture below.
I have already tried to set it manually to open using css editor, right-click on css file and select "Open with..."
When I click OK here, it opens my css file in CSS source editor fine,
but every next time it opens again in that text mode, like it completely ignores that it has to open it using css editor :(
Of course I installed and reinstalled Web Standards Update a thousand times.
Nothing helps.
The damn thing keeps opening them in that ugly text mode :(
Hmmm. Have you tried looking under the view menu? It's been a while since I've used it, but I remember different views being under the view menu bar.
If that doesn't work then I'd always try creating a new .css file and copy and pasting all the information; after you copy and paste, overwrite the pre-existing corrupt file.

Aptana 3 for populating a blank file with HTML using HTML:5 command

I am semi new to Aptana Studio 3. I have been using it for a couple months now, and I just saw a video tutorial where a guy typed in html:5 in a blank file, and it populated it with the HTML doc tag, header info, etc..
Is this a plug-in for aptana? or does it come with it out of the box... I tried typing it in a blank file, but nothing happened.
Seems pretty neat and fast!
Perhaps you are referring to zen-coding at:
http://code.google.com/p/zen-coding/
There is a plugin for Eclipse/Aptana.
HTH
-Rob B.

Display Word Document inside ASP.Net page

I want to display a word Document, which is sitting on my IIS. I want to display the whole document as is, inside a iFrame on my aspx page.
I know I can use MS Word Libs, but I cannot install Word on Server where application will be hosted, (Correct me if I am wrong: I cannot use just dlls without installing MS Word on Server).
How can I display the word document in my iFrame?
Probably the easiest way would be to include the Google Docs Viewer.
Other ways could be to use Aspose.Words (commercial) to convert Word to PDF and then use Aspose.Pdf.Kit to convert PDF to images and then display the images online.
PowerTools for Open XML contains an open source, free implementation of a conversion from DOCX to HTML formatted with CSS. The module HtmlConverter.cs supports all paragraph, character, and table styles, fonts and text formatting, numbered and bulleted lists, images, and more. See http://bit.ly/1bclyg9

Visual Studio inserting indents as spaces to html output

I am using Visual Studio 2010 for an MVC website project. I have an big problem and dont know hot to solve it. When i am looking to the output of html in firebug indents in my aspx and ascx files are outputed as space in same places. I think its about line ending of files but i am not sure how to fix them. I am adding some pictures about problem.
When i am adding a breakpoint it also add red background to spaces (this is problem) I try to delete spaces after hit ctrl+k d same problem happen.
If i delete all indents make page 1 line without spaces output is fine but it not a solution.
ASPX/ASCX engine emits literal content within markup as is i.e if your file has spaces or tabs for indentation then they will be output as is. You can use Tools->Options for keeping tabs (instead of space) for indents - you can change for all languages or say only for HTML. VS 2010 has a great extension Productivity Power Tools that will (apart from other things) warn you if your file has tabs & space mix and allows you to choose either tabs or spaces.
Now as a better solution, you can use HttpModule to remove whitespace from your response - see http://madskristensen.net/post/A-whitespace-removal-HTTP-module-for-ASPNET-20.aspx

Visual Studio 2008 formats asp tags to lowercase

Recently, my Visual Studio 2008(with Resharper 4.5) has started to reformat asp tags into lowercase.
Example:
<asp:Repeater runat="server" id="rp">
becomes
<asp:repeater runat="server" id="rp">
and I can't find a way to make it not do this. I use Ctrl-k Ctrl-d to reformat.
I've tried resetting the Visual Studio settings, turning off Resharper. Nothing seems to bite.
I did delete a huge Reflected something folder in my Documents and Settings folder last week, could this be the reason?
Go to Tools | Options...
Expand: Text Editor - HTML
Select the "Format" node, and see what settings you have for "Capitalization" of "Server tag" and "Server attributes - I think the default is now "Lowercase" - try setting that to "Assmebly definition" instead.
More information on these options can be found here:
Format, HTML, Text Editor, Options Dialog Box
I had the same (or very similar) issue.
I also deleted some (but not all) files in the folder
C:\Documents and Settings[username]\Application Data\Microsoft\VisualStudio\9.0\ReflectedSchemas
The reason I did this is because I'm subject to a frankly daft limit on the size of my (Windows XP) roaming profile :-(
After I did this VS intellisense and document auto-formatting started behaving as if it didn't know what the <asp: tags were and treated all the html as plain html (formatted tag names and attributes in lowercase).
I found this blog post by Tim Vasil which pointed me to the solution.
Here's what I did to fix this:
Deleted all files in C:\Documents
and Settings[username]\Application
Data\Microsoft\VisualStudio\9.0\ReflectedSchemas
Deleted all files in
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary
ASP.NET Files
Deleted the .suo User Option file (the file has the same name as the solution file with .suo in place of .sln)
(Note: VS eventually regenerates the various files in it's own time...)
I found the cause. I put back that 650MB big folder in C:\Documents and Settings\My User Id\Application Data\Microsoft\VisualStudio\9.0 and everything seems to be back to normal.
Thanks for trying to help me!
I'm not sure about a permanent fix, but what you can do is select the troublesome coding then hit CTRL+K followed by CTRL+F, so in order..
CTRL + K, F
This will auto format the coding (and make it the proper case).
If this doesn't work then it might be an auto-format issue/setting

Resources