简体   繁体   English

作为服务器控件而不是asp.net Image运行的简单html img标签与安全性之间的区别?

[英]Difference between simple html img tag running as a server control as opposed to an asp.net Image and security?

If all I want to do is just change an image dynamically, then is an img html tag with the runat="server" attribute sufficient over the asp.net Image control? 如果我要做的只是动态地更改图像,那么带有runat =“ server”属性的img html标签是否比asp.net Image控件足够了? My main concern is security. 我主要关心的是安全性。 For example, I am also curious if using html anchor tags with the runat="server" as opposed to the asp.net HyperLink control raises security issues. 例如,我也很好奇,如果与runat =“ server”一起使用html锚标记而不是asp.net HyperLink控件会引起安全问题。

Raises what sort of security issues? 提出什么样的安全问题? If all you want to do is change an image at runtime, an img control running at the server is all you need. 如果您要做的只是在运行时更改映像,则只需要在服务器上运行img控件即可。 It is simple and does what you need it to do. 它很简单,可以完成您需要做的事情。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM