Stop formatting portion of the code in Source Editor in Visual studio
In visual Studio aspx editor, i want to stop portion of the code to be formatted on format using 开发者_如何学编程ctrl - K ctrl - D .
Problem faced. I am using two validator with text '*', both should be in same place i adjusted using css. But when format the code , this formatting introduce extra space.
If anybody knows the solution for this, please answer for it.
Expectation:
I am expecting a marker tag, to stop alignment.
For example,
<DontChange><asp:....>......</asp:....> </DontChange>
When i give like this content between DontChange tag should not be aligned in Editor on every align.
This is an excellent question. Does highlighting the code block and selecting Edit->Advanced->Format Selection (or press Ctrl+K, Ctrl+F) work?
I don't think it's possible. Somehow VS would have to remove the extra tags when you build/deploy. I belive a simple <%-- --%> comment somehow should disable the formatting, but I haven't found anything yet :(
Perhaps an extension/plugin could do the trick?
精彩评论