字符串以我的.aspx代码我有以下元件替换的DataBinder.Eval
<asp:Image ID="GalleryImage" runat="server" ImageUrl='<%# Eval("ProductImage") %>' />
该返回的值是从内容传递网络与样品URL一个图像URL等'http://cdn.xyz.com'
我想将网址转换为'https://cdn.xyz.com'
我试图做ImageUrl='<%# Eval("ProductImage").Replace("http","https") %>'
这似乎并不奏效。有任何想法吗?
您的'ProductImage'从哪里来?你不想在那里改变它吗?在'.cs'(代码后面)? –
@teovankot,我没有访问后面的代码。它坐在dll – ScottyDoesKnow
不确定,但你有没有尝试过这样的:'((字符串)评估(“ProductImage”))替换(“http”,“https”)'? –