在线等。关于隐藏
我现在在做一个。net项目,利用<asp:Repeater>显示数据库的数据。发现<asp:SqlDataSource>直接在UI,我运行后查看源文件,发现找不到<asp:SqlDataSource>可能进行加密了,虽然看不见但仍感觉不可靠。是不是有办法吧<asp:SqlDataSource>放到别的文件进行调用。
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
<ItemTemplate>
<br /><li><%# FetchCp(Eval("bt").ToString(), 20)%></li>
</ItemTemplate>
</asp:Repeater>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:mynewConnectionString %>"
SelectCommand='SELECT top 7 * FROM [gn] ORDER BY [id] DESC'></asp:SqlDataSource>