none
HTML formatting RRS feed

  • Question

  • Try as I might, I've been unable to configure VS 2008's html formatting to produce the desired results. What I ideally want is something like:

    <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="MvcApplication1.Views.Home.Index" %> 
    <%@ Import Namespace="MvcApplication1.Controllers" %> 
     
    <asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server"
     
        <h2><%= ViewData["message"] %></h2
             
        <% Html.BeginForm("ShowPostData", "Home"); %> 
         
        <fieldset> 
            <ul> 
                <li> 
                    <span class="label">Title:</span> 
                    <%= Html.TextBox("title", ViewData["title"]) %><br /> 
                </li> 
                <li> 
                    <span class="label">Message:</span> 
                    <%= Html.TextBox("message", ViewData["message"]) %><br /> 
                </li> 
            </ul>     
        </fieldset> 
         
        <br /> 
        <%= Html.SubmitButton("SubmitButton", "Submit") %> 
        <% Html.EndForm(); %> 
         
        <br /> 
        <hr /> 
        <%=Html.ActionLink<HomeController>(c => c.About(5), "About Page") %> 
    </asp:Content> 
     
     

    Instead, if I hit ctrl+k+d I end up with:

    <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="MvcApplication1.Views.Home.Index" %> 
     
    <%@ Import Namespace="MvcApplication1.Controllers" %> 
     
    <asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server"
        <h2> 
            <%= ViewData["message"] %></h2
        <% Html.BeginForm("ShowPostData", "Home"); %> 
     
        <fieldset> 
     
            <ul> 
                <li><span class="label">Title:</span> 
                    <%= Html.TextBox("title", ViewData["title"]) %><br /> 
                </li> 
                <li><span class="label">Message:</span> 
                    <%= Html.TextBox("message", ViewData["message"]) %><br /> 
                </li> 
            </ul> 
     
        </fieldset> 
     
        <br /> 
        <%= Html.SubmitButton("SubmitButton", "Submit") %> 
        <% Html.EndForm(); %> 
        <br /> 
        <hr /> 
        <%=Html.ActionLink<HomeController>(c => c.About(5), "About Page") %> 
    </asp:Content> 
     
     

    Therefore, I'd like to disable the ability to hit ctrl+k+d when in HTML, or at least, disable the function performed by it. I don't want to change the global keyboard mapping, because I use the same feature extensively for CSS and C# stuff.

    Any ideas?
    Sunday, November 23, 2008 5:24 AM

Answers

  • Please use forums.asp.net

    thanks.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. http://forums.msdn.microsoft.com/en-US/vssetup/thread/60424309-bd78-4ca2-b618-03c4a16123b6
    Monday, November 24, 2008 9:26 AM
  • This was asked in the forum where no one responds.

    You can ask this question at the ASP forum like Figo suggests.

    Or I can move it into a specific MSDN forum if you'd like.

    This is regarding your code:

    <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="MvcApplication1.Views.Home.Index" %>  
    <%@ Import Namespace="MvcApplication1.Controllers" %>  
      
    <asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">  
      
        <h2><%= ViewData["message"] %></h2>  
              
        <% Html.BeginForm("ShowPostData", "Home"); %>  
          
        <fieldset>  
            <ul>  
                <li>  
                    <span class="label">Title:</span>  
                    <%= Html.TextBox("title", ViewData["title"]) %><br />  
                </li>  
                <li>  
                    <span class="label">Message:</span>  
                    <%= Html.TextBox("message", ViewData["message"]) %><br />  
                </li>  
            </ul>      
        </fieldset>  
          
        <br />  
        <%= Html.SubmitButton("SubmitButton", "Submit") %>  
        <% Html.EndForm(); %>  
          
        <br />  
        <hr />  
        <%=Html.ActionLink<HomeController>(c => c.About(5), "About Page") %>  
    </asp:Content>  
      
    
    

     

    Thanks!
    Ed Price a.k.a User Ed, Microsoft Experience Program Manager (Blog, Twitter, Wiki)
    Tuesday, December 27, 2011 1:53 AM
    Owner

All replies

  • Please use forums.asp.net

    thanks.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. http://forums.msdn.microsoft.com/en-US/vssetup/thread/60424309-bd78-4ca2-b618-03c4a16123b6
    Monday, November 24, 2008 9:26 AM
  • This was asked in the forum where no one responds.

    You can ask this question at the ASP forum like Figo suggests.

    Or I can move it into a specific MSDN forum if you'd like.

    This is regarding your code:

    <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="MvcApplication1.Views.Home.Index" %>  
    <%@ Import Namespace="MvcApplication1.Controllers" %>  
      
    <asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">  
      
        <h2><%= ViewData["message"] %></h2>  
              
        <% Html.BeginForm("ShowPostData", "Home"); %>  
          
        <fieldset>  
            <ul>  
                <li>  
                    <span class="label">Title:</span>  
                    <%= Html.TextBox("title", ViewData["title"]) %><br />  
                </li>  
                <li>  
                    <span class="label">Message:</span>  
                    <%= Html.TextBox("message", ViewData["message"]) %><br />  
                </li>  
            </ul>      
        </fieldset>  
          
        <br />  
        <%= Html.SubmitButton("SubmitButton", "Submit") %>  
        <% Html.EndForm(); %>  
          
        <br />  
        <hr />  
        <%=Html.ActionLink<HomeController>(c => c.About(5), "About Page") %>  
    </asp:Content>  
      
    
    

     

    Thanks!
    Ed Price a.k.a User Ed, Microsoft Experience Program Manager (Blog, Twitter, Wiki)
    Tuesday, December 27, 2011 1:53 AM
    Owner