|
-
Jul 17th, 2010, 05:24 AM
#1
Thread Starter
Lively Member
[RESOLVED] Image Control in ASP.net
Hi all,
I want to know, how insert image in image congrol. In image URL,
i cant place pathname of local drive, where my image is located. How to pick
from image?
-
Jul 17th, 2010, 03:32 PM
#2
Re: Image Control in ASP.net
Hey,
Are you talking about an image that you want the user to upload from their machine onto the server, or are you talking about an image on the hard drive of the web server.
You will have to move the image into a folder under the main root of your web site, that way you can provide a navigatable url to the image, which you can reference from the client.
Gary
-
Jul 17th, 2010, 04:04 PM
#3
Frenzied Member
Re: Image Control in ASP.net
hay,
i think you should provide more information
You Don't Have to Rate Me.
I'm Not a Civilized Man I'm the Civilization it self
White or Black, Living or Dieing and 0 or 1 that's MY life
iam an Object in Object Oriented Life
my blog : http://refateid.blogspot.com/
twitter : @avrail
010011000111010101110110001000000100110101111001001000000101000001100011 
-
Jul 18th, 2010, 11:17 PM
#4
Thread Starter
Lively Member
Re: Image Control in ASP.net
Hey gep!!
you are correct but i should know, how to find the main root folder and place my image. I had tried that, but i cant pick that image from root folder in imageurl.
-
Jul 19th, 2010, 01:21 AM
#5
Re: Image Control in ASP.net
Hello rnjnagu,
Are you hosting the site under IIS, or are you debugging it straight out of Visual Studio?
The term root folder, normally refers to where the virtual directory in IIS points to. For ASP.Net Applications, this is typically the folder that contains the site's web.config file.
Are you trying to provide a mechanism for users to upload images onto your site, or are you just trying to add images to your site through Visual Studio?
Can you also elaborate on what you mean by:
I had tried that, but i cant pick that image from root folder in imageurl.
Because I am not sure that I follow.
Gary
-
Jul 19th, 2010, 01:26 AM
#6
Thread Starter
Lively Member
Re: Image Control in ASP.net
Hi gary,
I am just trying to place image in visual studio. I am new to ASP.net. I am beginner
For ex,
I want to place my logo in webpage, how i should do that.
-
Jul 19th, 2010, 01:52 AM
#7
Re: Image Control in ASP.net
Use the following steps:
1) Open Solution Explorer
2) Right click on your project and select Add | New Folder
3) Give it a name (typically something like img, or images
4) Right click on your new folder, and select Add | Existing Item...
5) Browse to the file that you want to add, and click Add
6) Select that image in solution explorer, open the Properties window for it, and make sure you set the "Copy to Output Directory" property to "Copy Always"
From there, you should be able to navigate to the image when you set the ImageUrl property of you image control.
Hope that helps!
Gary
-
Jul 19th, 2010, 02:33 AM
#8
Thread Starter
Lively Member
Re: Image Control in ASP.net
Hi Gary!!!
Great!!! your instant helped works well to me...
If any doubt i post my queries in this same forum..
if you can, mention me asp.net beginners website.
-
Jul 19th, 2010, 02:40 AM
#9
Re: Image Control in ASP.net
Hey,
Glad to hear you got it working!!
Can you remember to mark your thread as resolved?
Personally, I learn a lot by watching videos, this is a great resource:
http://www.asp.net/get-started
You might also want to take a look at this post:
http://www.vbforums.com/showthread.php?t=521851
Gary
-
Jul 19th, 2010, 02:43 AM
#10
Thread Starter
Lively Member
Re: Image Control in ASP.net
Ya.. i know how to change as resolved.. thanks.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|