CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

MS SQL 2008 on ASP.NET Hosting



Zone: > NEWSGROUP > Asp.Net Forum > visual_studio.vs_2005_web_application_projects Tags:
Item Type: NewsGroup Date Entered: 7/20/2007 2:02:39 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 7 Views: 37 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
8 Items, 1 Pages 1 |< << Go >> >|
whamy04
Asp.Net User
Load a image from file to webform?7/20/2007 2:02:39 PM

0/0

i want to load a image file to webform.There is my code, no error message but image do not appear.Why? ( I created a image object named Image1 in my webform, code below in event Click button)

try
{
Image1.Width = 640;
Image1.Height = 480;
Image1.ImageUrl = @"D:\Anh chup\M\02022007319.jpg";
}
catch (Exception E)
{ Response.Write(E.Message); }

}

 

augustwind
Asp.Net User
Re: Load a image from file to webform?7/20/2007 2:04:34 PM

0/0

Is the image in the website, or one of its directories?

If not, why not?


David Wier
MVP/MCP/ASPInsider
ASPNet101.com - where to look first!
iWrite Pro - doc/rtft to HTML/One Click PDF & much more
whamy04
Asp.Net User
Re: Load a image from file to webform?7/20/2007 2:20:42 PM

0/0

 Image file is in my directory (D:\).I run this webform form localhost.

augustwind
Asp.Net User
Re: Load a image from file to webform?7/20/2007 2:29:35 PM

0/0

Why can't you just copy the file to your website (ie an image directory), and use it from there?


David Wier
MVP/MCP/ASPInsider
ASPNet101.com - where to look first!
iWrite Pro - doc/rtft to HTML/One Click PDF & much more
whamy04
Asp.Net User
Re: Load a image from file to webform?7/21/2007 1:11:30 AM

0/0

 I have already copied this image file to my Web Apllication folder but it doesnot work.No error and image no appear.Please give code example to display a image file to webform using image control?

augustwind
Asp.Net User
Re: Load a image from file to webform?7/21/2007 1:57:42 AM

0/0

First, even though it's there, you have to add it as a resource - right click on the project, and choose add/existing item - locate it and choose it.

If you add it to the root (where your page is), then:
Image1.ImageUrl = "02022007319.jpg";

Though, I would suggest, especially if you are going to be adding more images, to create an image folder, for all the images - then, it would be:
Image1.ImageUrl = "~/Images/02022007319.jpg";


David Wier
MVP/MCP/ASPInsider
ASPNet101.com - where to look first!
iWrite Pro - doc/rtft to HTML/One Click PDF & much more
kanakaiah.etipa
Asp.Net User
Re: Load a image from file to webform?7/21/2007 2:07:18 AM

0/0

hi

the image will be loaded to your image control if and only if it exits in the current application directory or in the local host.

try to locate your image either in application directory or in local host.

 

 

Thanks 

chhaysambo
Asp.Net User
Re: Load a image from file to webform?7/25/2007 6:48:52 AM

0/0

 Hi,

 Can you try to copy your image to the same folder as your project file (*.csproj) and access your image by the code below

 Image1.ImageUrl = "~/02022007319.jpg";
 


Usoft Technology Co., Ltd.

#47B St. 199,
Sangkat Tumnuptek, Khann Chamkarmon,
Phnom Penh, Kingdom of Cambodia

Tel +855 (0)23 210 106
Mobile +855 (0)92 953 375
www.usofttechnology.com.kh
8 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
MCAD/MCSD.NET: Developing and Implementing Web Applications with Visual Basic.NET and Visual Studio.NET Authors: Mike Gunderloy, Pages: 1104, Published: 2003
Essential ASP. NET with Examples in C# Authors: Fritz Onion, Pages: 432, Published: 2003
MCAD Developing and Implementing Web Applications with Microsoft Visual C#(TM) . NET and Microsoft Visual Studio(R) . NET Exam Cram 2 (Exam Cram 70-315): Exam Cram 2, McAd Exam 70-315 Authors: Kirk Hausman, Amit Kalani, Priti Kalani, Ed Tittel, Pages: 555, Published: 2003
ASP. Net Development with Dreamweaver Mx: Ryan Parnell, Joel Martinez Authors: Ryan Parnell, Joel Martinez, Pages: 310, Published: 2002
Foundation ASP.NET for Flash Authors: Ryan Moore, Pages: 404, Published: 2005
The Ultimate VB.NET and ASP.NET Code Book Authors: Karl Moore, Pages: 380, Published: 2003
ASP.NET 3.5 For Dummies Authors: Ken Cox, Pages: 404, Published: 2008
Component-Oriented Programming Authors: Andy Ju An Wang, Kai Qian, Pages: 325, Published: 2005
Visual C# 2005: How to Program Authors: Harvey M. Deitel, Paul J. Deitel, Pages: 1591, Published: 2006

Web:
Load a image from file to webform? - ASP
The file failed to load in the Web Form designer ... Unable to ... The file failed to load in the Web Form designer ... Unable to cast object of type ... How to dynamically load new image to cast member from file. ...
Problem displaying a database image on a web form Talk about Problem displaying a database image on a web form. ... Now, this works fine if at the main form I load the image from a file ...
**BUG** Loading Images from Stream into aspx-Webform - bytes Nov 18, 2005 ... Whereas loading tiffs and pngs from file into an Image WebControl work, the images aren't shown when loaded from streams: In a WebForm, ...
Image Processing / ASP.NET WebForm Featured Image Processing ASP.NET WebForm Components. ... load and save image files in a variety of formats; apply image filters and transformations to your ...
File Uploading to Access Database using ASP.NET Visual Studio web form designer cannot load files .... Error with non-image files ( 2 Replies ) This thread contains 1 reply by the Author ...
Bind BLOB to Image control on web form (NOT ImageBox) - MSDN Forums Apr 27, 2007 ... Your only real option is to save the image file to disk and reference it in ... Why does the image.load event happen twice on a web form, ...
Embedded Web Form Error when loading into an iFrame Container ... I have two web forms (done with Coffee Cup Web Form Builder). The forms are embedded in the html files. When opening the html file on their ...
midrange.com -- WEB400 -- Re: CAPTCHA image validation in web form Sep 1, 2008 ... create a "load" event listener, but that can be done in the page ... the character representation with the image file name, the ...
ImageKit.NET. Best selling .NET imaging component. Retrieve images ... Use the ImageKit7 to load and save image files. Create, modify, convert, and print ... Displaying images in the WebForm ImageKit and Pan Window Controls ...




Search This Site:










re-use code help

page losing textbox value on postback

connect datagrid to database

close a page with a hyper link

extracting and displaying string

accessing a property of a user control

read value from txt-file

convert .vb to .dll?

insert javascript values into database

mydatareader.getint32(0)

databinder.eval: 'system.data.common.dbdatarecord' does not contain a property with the name

rollover image for web control in repeater

error on registering

asp.net calculator

i finding a create web control

file uploading in asp.net

asp.net and sql

rowfilter a dataview

asp .net database query

local printing from web with webcontrol or activex?

foreach item in struct?

opening an aspx form from class module

try to add a cookie value containing an '&'

problem with running asp.net pages....please help!

how to publish and upload the site on local server

sql enterprise ? where can i find sp2 for it ?

ivr development using dialogic boards

how to fill a cssstylecollection using a css class-name?

the controls collection cannot be modified because the control contains code blocks

program

  Privacy | Contact Us
All Times Are GMT