.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

how to bind image url when image is out of application

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :ASP.Net

I've  to bind a image to image1 control and the image is out of the application area

if I ser Image1.ImageUrl="D://2.jpg"; It is working fine on server machine.

But when I run it on another machine

using IP address of server image not displayed


Please Help if any thank u...

View Complete Post

More Related Resource Links

How to upload image in Mobile Application?


I have requirement to upload the image in mobile Web application using asp.net. For this I have add mobile templates but regarding to image there is no any file upload control. Then I see one article and use the below code:

<mobile:DeviceSpecific ID="DeviceSpecific1" Runat="server">
                <input style="width: 389px; height: 22px" type="file" size="45" runat="server" id="FileUpload1">

image and TextBlock docking WPF application

Hello, I'm new with WPF and I'm struggling here with docking a TextBlock and Image. I've an image that i want to use as a background to my window, the image contains picture and text, and i want to add a TextBlock above the image text, i've no problem doing it, but when i change my window size (press the maximize button) the space between the image and the textblock is not saved, what should i do in order to save my look&fell when the window resizes? i tried using DockPanel, and any other panel, but i guess i'm doing something wrong, so i will really appreciate an example.   Thanks a lot for helping, Gidi.

Binding byte[] to image control in navigation application leaks

Hi there, I have a (minimal) navigation application with two pages. Page1 contains an image. Switching between pages is done via a buttonhandler in code behind, for instance, (this.NavigationService.Navigate(new Page2())) The image is loaded in code behind via: private void LoadImage() { string fileName = "./images/image.bmp"; if (!new FileInfo(fileName).Exists) throw new Exception("File name doesn't exist"); using (FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read)) { this.ImageData2 = new byte[fs.Length]; fs.Read(this.ImageData2, 0, System.Convert.ToInt32(fs.Length)); fs.Close(); } } ImageData2 is a byte[] property that sends a propertychange event on changing. ImageData2 is bound to an image in xaml: <Image Grid.Row="1" Source="{Binding Path=ImageData2, Mode=OneTime}"/> When we unload Page1 the following clean up code is executed private void Page_Unloaded(object sender, RoutedEventArgs e) { this.ImageData2 = null; GC.Collect(); GC.WaitForPendingFinalizers(); GC.Collect(); } Now, when I start changing pages, I expect the Page we leave to unload, so the GC removes the byte array. However, it doesn't. Am I missing something? Binding the image to a BitmapImage (ImageData1, as you might have guessed:-) ) doesn't leak.

Image Uploading Error in Hosted Application at WebServer


Hi All……!

I am Working on Web Application in my Application there is one Folder Named “RestaurantImages”

My Web Application is Hosted on My Local Server and also on WebServer.

When I Upload Images, It stored in “RestaurantImages” Folder.

When I Upload Images on Local Server Hosted Application Its Working Good, but

I have a Problem When I Upload Image in my Hosted Application on WebServer its not working and

Gives an Error Like Following………

Please Help me……………!

Thanks in Advanced……..!

bind image with byte



i save picture as image in sql database for user profile

now i have a page that sow user profile information an im this page i have a image control to show user avatar with.

in code behind with Userprofile.Avatar code i got the image as byte

can you please tel me how can i  bind the image with this code?


how to create an image from webservice on desktop application


Hello Partners,

On desktop application I am uploading photos and storing physically on the webserver with the help of webservice and in DB I am storing physical path of that photo.

On the other hand, I want to download the images for later use at that time I am creating bytestream from the physical path and storing it in the dataset column whose datatype is VARBINARY(MAX)

I can return byte array which creates the images on the client side very easily.

The main problem I am facing here is, I am not able to convert the byte array into dataset's VARBINARY format.

I really will be thankful for ur help...

How to drag and drop image file in C# WPF application


Hi I'm a beginner in WPF C# and i developed a simple C# WPF application which is a simple window containing an image control and i want to drag any image file from my computer and drop it on the image control for displaying it.And i wrote the code below for dong this

in the XML File

<Image Height="150" Name="image1" Stretch="Fill" Width="200" AllowDrop="True" Drop="image1_Drop" DragEnter="image1_DragEnter"/> 

and inside the code file (*.cs)

private void image1_DragEnter(object sender, DragEventArgs e)
  private void image1_Drop(object sender, DragEventArgs e)

    image1.Source = (BitmapImage)e.Data.GetData(DataFormats.Bitmap);
but it doesn't work (when dragging over the image control the cursor become a circle containing back slash) and i don't why could any one hlp thanks in advance

Is it possible to bind a xaml control's image source directly from the resource file ?


Hi all


Is it possible to bind a xaml control's image source directly from the resource file ?




Image with data source bind won't update on WPF Window


This is the WPF Window Class:

  public partial class MainWindow : Window
    public Bitmap image;
    public CaptureModel cm = CaptureModel.Instance;
    public MainWindow()
      image = cm.Image;
      DataContext = this.image;
      CaptureModel.Instance.PropertyChanged += new PropertyChangedEventHandler(Instance_PropertyChanged);


    void Instance_PropertyChanged(object sender, PropertyChangedEventArgs e)

      if (e.PropertyName == "ImageChanged")
        this.image = cm.Image;


And this is the .xaml for it:

<Window x:Class="TestApplication.MainWindow"

Myprofile image is not displayed in sharepoint application 2007



  I have uploaded my picture in myprofile site. I am not able to see my picture anywhere in the application aganist my name. (Groups, List, Discussion Forum) except in myprofile. The default image is being shown everywhere. I want this to replicate on other users also. Please help me how to proceed on this.Thanks for your time.



Built-in Functions - Text and Image Functions in SQL Server

Text and image functions operate on TEXT, NTEXT and IMAGE data types. These data types are deprecated with SQL Server 2005 and should be replaced by VARCHAR(MAX), NVARCHAR(MAX) and VARBINARY(MAX) when possible. Alternatively you can also consider storing large string values using XML data type. Text and image functions are nondeterministic.

Future versions of SQL Server will not support TEXT, NTEXT and IMAGE data types. Columns with TEXT / NTEXT data type do not support commonly used string functions such as LEN, LEFT, RIGHT, etc. Furthermore, due to the large size of TEXT data you''re likely to see performance issues if you store such data in the database. However, at times you can''t help but use the TEXT / NTEXT / IMAGE data types (for example when supporting 3rd party databases when you cannot change the schema) - this is when text and image functions come in handy.

Program for Format Conversion of An Image

.NET provides extensive support for image conversion. Any image can be processed from one format to another. Most common formats to which .NET have support for are .BMP, .EMF, .GIF, .ICO, .JPG, .PNG, .TIF and .WMF.

Configuring Profile Image Export in SharePoint 2010

It's no secret that I am thrilled with the new social features of SharePoint 2010. I am most excited about the new Profile Picture handling. I strongly believe that the more we can show the faces of our colleagues to one another the more connected we will feel. Clearly Microsoft feels that way as witnessed by the many features that make use of the Profile Image like the Activity Feed and Colleagues list

Built-in Functions - Text and Image Functions

Text and image functions operate on TEXT, NTEXT and IMAGE data types. These data types are deprecated with SQL Server 2005 and should be replaced by VARCHAR(MAX), NVARCHAR(MAX) and VARBINARY(MAX) when possible. Alternatively you can also consider storing large string values using XML data type. Text and image functions are nondeterministic.

ASP.Net Upload Image to MS Access Database

As you learnt from the previous articles to upload image to the SQL Database in ASP.Net 2.0 and stream that image into the memory to retrieve it from the database and display it on the web page. In this article you will learn how to upload images to the MS Access database in ASP.Net 2.0

First of all create an Access Database and place it in the App_Data folder of ASP.Net web site project. Then create a table "tblImg" with the following fields:

Get pixel format, raw format, property id list and property items image in VB.net - C#.net.

n this simple article you will learn that how we can get pixel format, raw format, property id list and property items image in VB and C#.net.

Get Pixel Format:

Image consists of pixels to get the format of the pixel we have a property named pixel format. This property returns an enumeration of pixel format. This enumeration tells the pixel format.

To demonstrate make a window application. Drag one button and a picture box on form.

Now write the following code on Button click event:

slideshow image gallary using jQuery



i need a gallary like following link.


actually,i bound multiple image in a gridview using handler(.ashx).

for example,in one dep_id(1),there are 6 image and i need to slideing one by one.

could some one help me,how i can do like this?

i think is it easy in jquery.

please someone help me.

Thanking you.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend