需要有很长的URL ASPX页面来显示图像 [英] Need to display image in ASPX page that has long url

查看:164
本文介绍了需要有很长的URL ASPX页面来显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

场景:在ASP.NET网站,我有一个ASPX页面,OnLoad事件中,我设置了图片网址为图像控件之一。此URL值来自外部源并没有得到显示的图像,我发现这是因为URL太长。

Scenario: Within ASP.NET site, I have an ASPX page where within OnLoad event, I set the imageUrl for one of the image controls. This URL value comes from an external source and the image is not getting displayed and I found out it is because the URL is too long.

如何显示较长的URL的图像?我应该使用POST JavaScript或任何其他选项来实现?在URL中的价值是至关重要的,我不能失去的一些参数。

How to display images of longer URLs? Should I use POST with javascript or any other options to achieve? The values within the URL are crucial and I can't loose some of the parameters.

请建议。

在OnLoad事件code是下面的东西。

Code in OnLoad event is something below.

        Image pImage = new Image();

        pImage.ImageUrl = imageFile; // imageFile is the one having long URL.

更新1:如果我能够达到的OnLoad的POST,那么我认为形象会得到显示。请建议如何的OnLoad acheve这一点。

Update 1: If I am able to achieve the POST in OnLoad, then I think image will get displayed. Please suggest how to acheve this in OnLoad.

更新2:实际网址低于

http://example.com/is/m//company1/Rec-Sc-105-QL2?setAttr.safe={visible=false}&setAttr.insertedTextPlaceholder={visible=false}&setElement.height_weight=%253Ccontent%253E%253Cdiv%2520columnCount%253D%25221%2522%2520columnGap%253D%252218%2522%2520fontFamily%253D%2522Comic%2520Sans%2520MS%2522%2520textAlign%253D%2522left%2522%2520s7%253AcolorName%253D%2522100%2525%2520Black%2522%2520s7%253Acolorspace%253D%2522defined%2522%2520s7%253AcolorValue%253D%2522%2523FF%2522%253E%253Cp%253E%253Cspan%253EHeight%2520%2526amp%253B%2520Weight%253C/span%253E%253C/p%253E%253C/div%253E%253C/content%253E&setAttr.height_weight=%7Bheight=17.825466666666667%2526visible=true%2526rotation=0%7D&setAttr.photo={y=91.5186%26x=210.501%26width=40.883668%26height=61.4792%26visible=false%26rotation=0%26scaleX=1.0%26scaleY=1.0%26source%3D@Embed%28%27is%28company1/19168388%29%27%29}&setAttr.bleed={visible=false}&setAttr.insertedImagesPlaceholder={visible=false}&setElement.name=%253Ccontent%253E%253Cdiv%2520columnCount%253D%25221%2522%2520columnGap%253D%252218%2522%2520fontFamily%253D%2522Comic%2520Sans%2520MS%2522%2520textAlign%253D%2522left%2522%2520s7%253AcolorName%253D%2522100%2525%2520Black%2522%2520s7%253Acolorspace%253D%2522defined%2522%2520s7%253AcolorValue%253D%2522%2523FF%2522%253E%253Cp%253E%253Cspan%253EName%253C/span%253E%253C/p%253E%253C/div%253E%253C/content%253E&setAttr.name=%7Bheight=17.825466666666667%2526visible=true%2526rotation=0%7D&setElement.date=%253Ccontent%253E%253Cdiv%2520columnCount%253D%25221%2522%2520columnGap%253D%252218%2522%2520fontFamily%253D%2522Comic%2520Sans%2520MS%2522%2520textAlign%253D%2522left%2522%2520s7%253AcolorName%253D%2522100%2525%2520Black%2522%2520s7%253Acolorspace%253D%2522defined%2522%2520s7%253AcolorValue%253D%2522%2523FF%2522%253E%253Cp%253E%253Cspan%253EDate%253C/span%253E%253C/p%253E%253C/div%253E%253C/content%253E&setAttr.date=%7Bheight=17.82646666666667%2526visible=true%2526rotation=0%7D&setElement.announcement=%253Ccontent%253E%253Cdiv%2520columnCount%253D%25221%2522%2520

http://example.com/is/m//company1/Rec-Sc-105-QL2?setAttr.safe={visible=false}&setAttr.insertedTextPlaceholder={visible=false}&setElement.height_weight=%253Ccontent%253E%253Cdiv%2520columnCount%253D%25221%2522%2520columnGap%253D%252218%2522%2520fontFamily%253D%2522Comic%2520Sans%2520MS%2522%2520textAlign%253D%2522left%2522%2520s7%253AcolorName%253D%2522100%2525%2520Black%2522%2520s7%253Acolorspace%253D%2522defined%2522%2520s7%253AcolorValue%253D%2522%2523FF%2522%253E%253Cp%253E%253Cspan%253EHeight%2520%2526amp%253B%2520Weight%253C/span%253E%253C/p%253E%253C/div%253E%253C/content%253E&setAttr.height_weight=%7Bheight=17.825466666666667%2526visible=true%2526rotation=0%7D&setAttr.photo={y=91.5186%26x=210.501%26width=40.883668%26height=61.4792%26visible=false%26rotation=0%26scaleX=1.0%26scaleY=1.0%26source%3D@Embed%28%27is%28company1/19168388%29%27%29}&setAttr.bleed={visible=false}&setAttr.insertedImagesPlaceholder={visible=false}&setElement.name=%253Ccontent%253E%253Cdiv%2520columnCount%253D%25221%2522%2520columnGap%253D%252218%2522%2520fontFamily%253D%2522Comic%2520Sans%2520MS%2522%2520textAlign%253D%2522left%2522%2520s7%253AcolorName%253D%2522100%2525%2520Black%2522%2520s7%253Acolorspace%253D%2522defined%2522%2520s7%253AcolorValue%253D%2522%2523FF%2522%253E%253Cp%253E%253Cspan%253EName%253C/span%253E%253C/p%253E%253C/div%253E%253C/content%253E&setAttr.name=%7Bheight=17.825466666666667%2526visible=true%2526rotation=0%7D&setElement.date=%253Ccontent%253E%253Cdiv%2520columnCount%253D%25221%2522%2520columnGap%253D%252218%2522%2520fontFamily%253D%2522Comic%2520Sans%2520MS%2522%2520textAlign%253D%2522left%2522%2520s7%253AcolorName%253D%2522100%2525%2520Black%2522%2520s7%253Acolorspace%253D%2522defined%2522%2520s7%253AcolorValue%253D%2522%2523FF%2522%253E%253Cp%253E%253Cspan%253EDate%253C/span%253E%253C/p%253E%253C/div%253E%253C/content%253E&setAttr.date=%7Bheight=17.82646666666667%2526visible=true%2526rotation=0%7D&setElement.announcement=%253Ccontent%253E%253Cdiv%2520columnCount%253D%25221%2522%2520

更新3:我现在得到HTTP 403错误被禁止,当我尝试浏览网址在单独的窗口。有什么建议?

推荐答案

我们通过使用Web服务,并获取URL细节解决了问题。

We resolved the issue by using webservices and getting the url details.

这篇关于需要有很长的URL ASPX页面来显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆