單項(xiàng)選擇題

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)) %> 

題目列表

你可能感興趣的試題

微信掃碼免費(fèi)搜題