如何以编程方式设置和显示网站页面中的图像 [英] How to programatically set and display an image in a website page

查看:57
本文介绍了如何以编程方式设置和显示网站页面中的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个网站,评估对职业发展不同领域的兴趣。我有一个屏幕,其中显示了2张活动图片以及简要描​​述每项活动的文字。在页面上,出于开发目的,我为6个兴趣类别中的每一个显示得分
。我正在累积六种不同的饼干。我还有一个帧号的cookie,因为帧号用在'if then else'逻辑中以累积分数。我从来没有能够显示
图像。描述 活动的文字显示得很好。得分积累确实有效,但现在变得不稳定了。当我使用VS 2010时,我已经努力积累分数。我已经在Azure上发布了该网站,它在那里做了
相同的事情。图像在"〜\ App_Data \Pic \ 1L.jpg"中。这是第一帧的图像,左图像按钮。我已经检查了Azure,图片都在正确的位置。我不是程序员,我可以肯定使用一些
的帮助。非常感谢你。以下是该计划的开始:

I am developing a website that will assess interest in different areas of career development. I have a screen with 2 pictures of activities displayed along with text briefly describing each activity. On the page, for development purposes, I display the score for each of the 6 interest categories. I am accumulating the scores in six different cookies. I also have a cookie for the frame number because the frame number is used in the 'if then else' logic to accumulate the scores. I have never been able to get the images to display. The text describing the  activities displays just fine. The score accumulation did work but now has become erratic. I had it working to accumulate the scores when I was using VS 2010. I have published the site on Azure and it does the same thing there. The images are in "~\App_Data\Pic\1L.jpg". This is the image for the first frame, left imagebutton. I have checked on Azure and the pictures are all there in the proper location. I am not a programmer, and I could sure use some help. Thank you very much. Here is the beginning of the program:

Stephen R. Richards

Stephen R. Richards

推荐答案

在网页上显示图像并不像在WPF或Windows窗体中那样容易。

Showing images on a webpage is not as easy as in WPF or Windows Forms.

我们在我们的网站上有这个样本(还有更多)

We have this sample on our website (there is even more)

http://www.vb-tips.com/SlideShowExtender.aspx

但是,我认为最好访问Microsoft ASP.Net论坛,因为这实际上是完全呈现。

However, I think it is better to visit the Microsoft ASP.Net forums because this is in fact completely presentation.

http://forums.asp.net


这篇关于如何以编程方式设置和显示网站页面中的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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