将图像用于asp.net中的asp:image控件 [英] wher to place image to be used in asp.net for asp:image control

查看:66
本文介绍了将图像用于asp.net中的asp:image控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

帮助我知道在图像控件的项目中将图像放在哪里用作url;



我的代码在这里...



 <   td     colspan   =  1 >  
< asp:图像 ID = imgCalender runat = server CssClass = bt n AlternateText = 点击打开日历 / < span class =code-keyword>>
< asp:CalendarExtender ID = CalendarExtender2 runat = server TargetControlID = txtDateTo < span class =code-attribute> PopupButtonID = imgCalender > < ; / asp:CalendarExtender > < ; / td >

解决方案

你的问题不清楚,但正如我在两个方面所理解的那样,我正在尝试为这两个方案提供解决方案......



如果您知道asp:image控件属性,您可以在其中定义控件的图像,



您可以使用

 ImageUrl =〜/ Images / abc.gif





那里...





如果你想知道你想要为你的项目保留图像的地方/文件夹,那么你可以创建一个ASP.NET文件夹主题,然后创建一个名为的文件夹您的应用程序中的图像或您可以创建你的应用程序中的文件夹,并保留图像,但最后一个选项将不适合优秀的程序员。





希望这个会有所帮助...... :)



:



这里有一个例子..

< asp:图片ID =img1runat =serverImageUrl =将图片的网址放在这里/> 


help me to know where to place image that is to be used in project for a image control as url;

my code is here...

<td colspan="1">
<asp:Image ID="imgCalender" runat="server" CssClass="btn" AlternateText="Click to Open Calender" />
<asp:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtDateTo" PopupButtonID="imgCalender">    </asp:CalendarExtender></td>

解决方案

Your question is not clear,, but as i understood in two directs,, I am trying here to put solution for both...

If you wana know the asp:image control property where you can define image for control,,,

You can use

ImageUrl="~/Images/abc.gif"



there...


and if you want to know about the place/folder where you want to keep images for your project so for that you can create an ASP.NET folder Themes and than create a folder named Images in your application or you can create a folder whereever in your application and keep the images there but this last option will be not suitable for a Good Programmer.


Hope this will help... :)

EDIT::

Here I have an example..

<asp:Image ID="img1" runat="server" ImageUrl="Place ur image's URL here" />


这篇关于将图像用于asp.net中的asp:image控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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