问题描述
listpage:
<%#string.Format(/ Views / Detail.aspx?id = {0}& cars_brand = {1}& cars_type = {2},
HttpUtility.UrlEncode(Eval(id)。ToString()),HttpUtility.UrlEncode(Eval(cars_brand)。ToString()),HttpUtility.UrlEncode(Eval(cars_type)) .ToString())
,HttpUtility.UrlEncode(Eval(cars_img1)。ToString()))
%>' >
DetailPage:
lblid.Text = HttpUtility.UrlDecode(Request.QueryString [ id]);
cars_brand.Text = HttpUtility.UrlDecode(Request.QueryString [ cars_brand]);
cars_type.Text = HttpUtility.UrlDecode(Request.QueryString [ cars_type]);
this .img.ImageUrl = 〜 / Content / Img / cars / + Request.QueryString [ cars_img1];
我的尝试:
如何使用查询字符串C#asp.net?
listpage:
<%# string.Format("/Views/Detail.aspx?id={0}&cars_brand={1}&cars_type={2}",
HttpUtility.UrlEncode(Eval("id").ToString()), HttpUtility.UrlEncode(Eval("cars_brand").ToString()), HttpUtility.UrlEncode(Eval("cars_type").ToString())
, HttpUtility.UrlEncode(Eval("cars_img1").ToString()) )
%>'>
DetailPage:
lblid.Text = HttpUtility.UrlDecode(Request.QueryString["id"]); cars_brand.Text = HttpUtility.UrlDecode(Request.QueryString["cars_brand"]); cars_type.Text = HttpUtility.UrlDecode(Request.QueryString["cars_type"]); this.img.ImageUrl = "~/Content/Img/cars/" + Request.QueryString["cars_img1"];
What I have tried:
how pass url images to other pages with Query String C# asp.net?
这篇关于如何使用查询字符串C#ASP.NET将url图像传递给其他页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!