多做题,通过考试没问题!

微软认证考试

睦霖题库>其他计算机考试>微软认证考试

You are developing an ASP.NET MVC 2 application. A view contains a form that allows users to submit their first name. You need to display the value that is submitted, and you must ensure that your code avoids cross-site scripting. Which code segment should you use?()

  • A、<%: Model.FirstName %>
  • B、<%= Model.FirstName %> 
  • C、<% Response.Write(Model.FirstName) %>  
  • D、<% Response.Write(HttpUtility.HtmlDecode(Model.FirstName)) %> 
正确答案:A
答案解析:
进入题库查看解析

微信扫一扫手机做题