需要专家反对.. [英] Need an Expert Oppinion..

查看:67
本文介绍了需要专家反对..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到过一种技术问题,我曾经从特定文件夹中取出我的图像,通过使用ImageButton webcontrol来显示它们

它仍然可以脱机工作,但是当我上传我的网站时,它没有'工作,一切顺利,没有错误,它正在为ImageButtons加载名称,但它不会显示图像本身,可能是什么......


如果您需要,我会发给您代码,但是我需要及时回复,这是紧急的

I have troubles with a technique I used to take my images from specific folder to show them by using ImageButton webcontrol
It is still working properly offline, but when I uploaded my website, it didn''t work, everything is going well and there is no errors, it''s loading the ImageButtons with names but it doesn''t show the image itself, what could be the possibilities..

If you require, I would send you the code, but please I need a prompt reply, it''s urgent

推荐答案


我使用一种技术遇到麻烦我曾经从特定文件夹中取出我的图像,通过使用ImageButton webcontrol来显示它们

它仍然可以脱机工作,但是当我上传我的网站时,它没有工作,一切进展顺利且没有错误,它正在为ImageButtons加载名称,但它没有显示图像本身,可能是什么可能性es ..


如果您需要,我会发给您代码,但是我需要及时回复,这是紧急的
I have troubles with a technique I used to take my images from specific folder to show them by using ImageButton webcontrol
It is still working properly offline, but when I uploaded my website, it didn''t work, everything is going well and there is no errors, it''s loading the ImageButtons with names but it doesn''t show the image itself, what could be the possibilities..

If you require, I would send you the code, but please I need a prompt reply, it''s urgent



图像位置是否正确?查看生成的HTML并查看它是否指向正确的位置。然后检查以确保图像在那里。

Is the image location correct? Take a look at the generated HTML and see if it points to the correct location. Then check to make sure the image is there.



我用我从特定文件夹中取出图像的技术出现问题他们通过使用ImageButton webcontrol

它仍然可以正常离线工作,但是当我上传我的网站时,它没有工作,一切顺利且没有错误,它正在加载ImageButtons的名称,但它没有显示图像本身,可能是什么可能..


如果您需要,我会发给您代码,但请我提示回复,这是紧急的
I have troubles with a technique I used to take my images from specific folder to show them by using ImageButton webcontrol
It is still working properly offline, but when I uploaded my website, it didn''t work, everything is going well and there is no errors, it''s loading the ImageButtons with names but it doesn''t show the image itself, what could be the possibilities..

If you require, I would send you the code, but please I need a prompt reply, it''s urgent



发布你的代码将有助于确定错误。

posting your code will be helpful in determining the error.



发布您的代码将有助于确定错误。
posting your code will be helpful in determining the error.



你可以确保图像的位置是正确的,因为当你翻过图像的按钮时,它会给你一个图像的名称。 代码生成图像本身


这里是代码:


public void Page_Load(object sender,EventArgs e)

{$ / $

int i = 0;


//获取目录的地址,然后在
string add = Server.MapPath(" pics \\ gallery. \\\");

string [] images = Directory.GetFiles(add," * .jpg");


//创建ImageButton数组,并用它来存储&确定规格中的结果图像

ImageButton [] imageBtt = new ImageButton [images.Length];

foreach(图像中的字符串图像)

{

//在地址中添加特殊字符\\以将其添加到.ImageURL - 例如\"添加


imageBtt [i] = new ImageButton();

imageBtt [i] .Width = 70;

imageBtt [i] .Height = 47;

imageBtt [i] .ID = Path.GetFileNameWithoutExtension(image);

imageBtt [i] .Visible = true;

imageBtt [i] .ToolTip = Path.GetFileNameWithoutExtension(image);

imageBtt [i] .ImageUrl =" \\\\ + image;

imageBtt [i] .Click + = new System.Web.UI.ImageClickEventHandler(ImageButton_C lick);


ContentPlaceHolder3.Controls.Add( imageBtt [i]);

i ++;

}


您可以浏览网站进行测试结果:

http://www.qebab.com/Galleries.aspx

You could make sure that the location of the images is correct because when you hoover over the images'' button it gives you the name of the image which is taken by "code genereation of" the image itself

here is the code:

public void Page_Load(object sender, EventArgs e)
{

int i = 0;

// get the address of the directory, then seach for files with .JPG extension inside
string add = Server.MapPath("pics\\gallery\\");
string[] images = Directory.GetFiles(add , "*.jpg");

// Create ImageButton Array, and use it to store & present result images in determine specifications
ImageButton[] imageBtt = new ImageButton[images.Length];
foreach (string image in images)
{
// Add special character \\ to the address to add it to .ImageURL - e.g. \" adds "

imageBtt[i] = new ImageButton();
imageBtt[i].Width = 70;
imageBtt[i].Height = 47;
imageBtt[i].ID = Path.GetFileNameWithoutExtension(image);
imageBtt[i].Visible = true;
imageBtt[i].ToolTip = Path.GetFileNameWithoutExtension(image);
imageBtt[i].ImageUrl = "\\\\" + image;
imageBtt[i].Click += new System.Web.UI.ImageClickEventHandler(ImageButton_C lick);

ContentPlaceHolder3.Controls.Add(imageBtt[i]);
i++;
}


and you could browse through the website to test the results:
http://www.qebab.com/Galleries.aspx


这篇关于需要专家反对..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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