Visual Studio 2012 SP3 changing link href when using ASP.NET in design view

前端 未结 2 1396
南旧
南旧 2021-02-07 19:13

I\'m using VS 2012 SP3 in which i have an ASP.NET web site. In my \"Default.aspx\" i have the following link



        
2条回答
  •  你的背包
    2021-02-07 20:16

    The VS designer is picky about URI formats in a link tag, and it will "fix" any href that it does not approve of. The result is not always helpful.

    In your case, the issue is that your href is missing a scheme name. VS should stop rewriting your href if you change your link tag like this:

    
    

    Side Note: After you fix the href, the designer may complain that it can't edit the style sheet. I don't know why it does that with this particular file, and I have not seen it do this with other CSS. Just ignore the warning, and the style sheet should be applied correctly.

提交回复
热议问题