Showing posts with label image. Show all posts
Showing posts with label image. Show all posts

Saturday, March 24, 2012

Upload image in Tab container

Hi,

I have a tab container which has 3 tabs Picture, profile and Description......

On clicking Picture tab i need to upload an image and display.....

But i am not able to do so......

pls help me....

Hi,

Thank you for your post!

Here is a good article aboutuploading-files-without-a-full-postback:http://msmvps.com/blogs/luisabreu/archive/2006/12/14/uploading-files-without-a-full-postback.aspx

Our good old friend the IFrame used to be the preferred option for asynchronous http communications. Because an iframe is in essence it's own browser window, it can be used to fire off asynchronous requests (both POST and GET). However, even more important is an IFrame's ability to be a 'target' of a form POST. By adding an IFrame to the page and setting it as the target of the form post, you can in essence create an asynchronous file transfer.

When you upload your image to the server,display it like this:

<asp:Image ID="Image2" runat="server" Visible="False" />
Image2.ImageUrl = "the path you saved the image to";

Image2.Visible = true;


For more infoemation, see:

AJAX, file downloads, and IFRAMEs

http://blogs.infragistics.com/blogs/tony_lombardo/archive/2007/04/09/file-uploads-where-s-the-ajax.aspx

If you have further questions,let me know.

Best Regards,

Upload Image Without PostBack in Asp.Net 1.1

I want to upload image without PostBack in Asp.Net 1.1 not 2.0. Is it possible to upload image without postback?

Technically, no. You can isolate the postback by using an IFRAME, however. Just build a page that handles the image uplaod bit (and not hing else), then refer to said page as the src of an IFRAME in whatever page youw ant to have host the 'upload control'.


Do you have any example code? I don't have any idea. I want to upload image without Postback and then the image will be appear in the Image web contorl. I'm using asp.net 2.0.

Thanks,