Where does inline datasource (sqlcommand + connectionstring + parameters) compile to in ASP .net (its not in the ViewState)?
So it’s not in the HTML when I view the source of a page, and it is not the ViewState if I decompile it. So does it compile to the same location as the aspx.vb/ aspx.cs file?
Is there thus no differenct wrt security of using an inline piece of code in the aspx file,
than using the same query in the aspx.vb/cs file?
ASP.NET inline code get compiled into dll to the
Temporary ASP.NET FilesFolder, see ASP.net compiled dllsAlthough I would strongly recommend to not leave any inline code that has no formatting purpose, especially data access layers.
As for your concern about security, you inline-coded connection string is visible to anyone that have read access to the Web site folder, and to anyone that have read access to the
Temporary ASP.NET FilesFolder on the server, but, using IIS, it won’t be accessible to anyone browsing your web site through http(s) protocol.