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

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

Capture posted image from Flash/swf for uploading

Posted By:      Posted Date: September 01, 2010    Points: 0   Category :ASP.Net
This is the first time I've come across this kind of problem before and I'm having trouble approaching it.  I have a swf developed by someone else that posts an image and I have to create a handler of some kind to capture it, name it, then upload it to a directory.  I've tried a couple ways and nothing is working.  this is a quick an dirty approach, just an aspx file<%@ Page Language="C#" %><%@ Import Namespace="Components" %><%@ Import Namespace="System.IO" %><script runat="server">    public partial class upload : System.Web.UI.Page    {        protected void Page_Load(object sender, EventArgs e)        {            string uploadDirectory;            uploadDirectory = Server.MapPath(@"images/");            string imageName = "image.jpg";            string uploadPath = uploadDirectory + imageName;                        //FileUpload imageUpload =

View Complete Post

More Related Resource Links

image capture using webcam in asp.net with C#

hi  friends i need the help to get image using webcam   i m developing an app in which i have need to get image from webcam and store it in to database i m using visual studio 2008 and asp.net with c# any one can help me i m looking for code for this operatio

embedding flash image in SSRS report 2008

HI ALL, I have image "Shockwave Flash Object" and i want to upload it into SSRS report ,but when i select the report into ADD Image it shows it will not support the format,suggest how to upload the same image into the SSRSreport 2008   Regards Amit

trying to show new image in ajax slidehow extender immediately after uploading it

 hi,   On my aspx page I have a slidshow extender.   In the code behind I am filling a data table from the datbase and using GetSlides() Method to show the images in the slideshow. The problem is I have a file upload control on the page as well. When I upload  a new file I am expecting it to show in the slideshow after postback but it does not. Only when I click refresh again or cause another postback the second time does the new image show.   My code behind    private static DataTable tblData = new DataTable(); protected void Page_Load(object sender, EventArgs e)         string strSQL = "(my select query is here";        SqlConnection conn = new SqlConnection("Data Source=(mydatasource here");        conn.Open();            SqlDataAdapter da = new SqlDataAdapter(comm);        tblData = new DataTable();        da.Fill(tblData);         conn.Close();           // set the initial image        if (tblData.Rows.Count > 0)        {    

Uploading an image to a SQL DB via a SQLDataSource parameter


Hi all,

I've got a bit of a problem that I can't figure out.  I've got a SQL data source on a create user page that uploads the user data to a SQL database when the person creating the account clicks the "Next" button.  One of the columns in the DB is an "image" data type and I'm using the FileUpload control to do that.  Here is the ds and its info on the actual page:

<asp:SqlDataSource ID="sqldsAddMember" runat="server" ConnectionString="<%$ ConnectionStrings:myCS %>" InsertCommand="INSERT INTO [Member] ([UserName], [MemberImage]) VALUES (@UName, @Photo)">
        <asp:Parameter Name="UName" ConvertEmptyStringToNull="true" />
        <asp:Parameter Name="Photo" DbType="Binary" ConvertEmptyStringToNull="true" />

In the code-behind I have the following (it's something I found elsewhere on the web):

    Protected Sub CreateUserWizardStep1_Deactivate(ByVal sender As Object, ByVal e As System.EventArgs) Handles CreateUserWizardStep1.Deactivate
        sqldsAddMember.InsertParameters("UName").DefaultValue = Session("UserName&

Bulk Image Uploading


Dear all,

I want to Upload bulk images from client to server using web service...

I already create web service for uploading images but it does not support well.. i have used byte array for that..

If any idea then tell me..



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……..!

deafault iamge dispaly when user not uploading the image


hi this is my code ...iam storing & retrieving image from db using gridview but now i got stuc..how to dispaly default imag ewhen user is not uploading the iamge...

here is my code...plaese help me ...

this is insert image to db......

  Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim arrcontent As Byte()
        Dim LEN As Integer
        Dim FN As String = String.Empty
        Dim EXT As String = String.Empty

        If Fu1.HasFile Then

            FN = Fu1.PostedFile.FileName
            Dim ityp = Fu1.PostedFile.ContentType
            Len = Convert.ToInt32(Fu1.PostedFile.InputStream.Length)
            EXT = FN.Substring(FN.LastIndexOf("."))
            EXT = EXT.ToLower()
            If EXT = ".jpg" Or EXT = ".bmp" Or EXT = ".gif" Or EXT = ".png" Or EXT = ".jpeg" Then
                ReDim arrcontent(Len)
                Fu1.PostedFile.InputStream.Read(arrcontent, 0, Len)
                If INSTAB(TB1.Text.Trim, arrcontent, Len, ityp) = True Then
                    L3.Text = "DATA ADDED SUCCECFULLY"
                    L3.Text = "ERROR IN INSERTING DATA"
                End If
                L1.Text = "Only gif,b

How to capture entire UserControl image to ClipBoard?


I have created a WPF UserControl using C# with .Net3.5 and VS 2008.  The UserControl contains several other elements, like Grids, Panels, Labels, TextBoxes, etc.  I want to provide a public method CopyControlToClipboard() that captures an image of the entire UserControl as a BMP and place it in the Clipboard.  The application that includes the UserControl should simply need to define some action (button click, menu item, etc) that calls this method.

How can I do this?

Thanks, Dave

image extension changed after uploading



        I have a requirement  where image has to be uploaded  to a folder and show it in image control. When uploading the image i have resized the image through code and saved it in a folder. The code is as follow

Stream src = fuUpload.PostedFile.InputStream;
                        string dest = Server.MapPath("~/folder/" + filename);                        
                        System.Drawing.Image img = System.Drawing.Image.FromStream(src);

 Bitmap target = new Bitmap(width, height);
                        Graphics graphics = Graphics.FromImage(target);
                        graphics.SmoothingMode = SmoothingMode.HighQuality;
                        graphics.CompositingQuality = CompositingQuality.HighQuality;
                        graphics.InterpolationMode = InterpolationMode.High;
                        Rectangle rectDestination = new Rectangle(0, 0, width, height);
                        graphics.DrawImage(img, rectDestination, 0, 0, srcWidth, srcHeight, GraphicsUnit.Pixel);

Everything is alright upto here. But when i right click on image control and try to save the pic, the

How to delete an image after uploading


Dear friends

I apply a watermark to an uploaded image.

After that I want to save the changes, but I am not able to delete the original file nor can I rename it because I get the following error.

The process cannot access the file because it is being used by another process.

I have searched for a solution for 3 days but I haven't found any.


I have already disposed all objects related to the "watermarking process".

It seems that the uploaded file is being locked by IIS for a period of time while I need to manipulate & save the file right after uploading.

Could you please help?

uploading Image from client to server without using fileupload control



I have a requirement to read an image from client machine and to save the same in server, the path and filename of the image is fixed, i want to

done this task without using a fileupload control. Is there any way to accomplish this task?

how to play flv file in flash player on click on an image in sharepoint?


Hello all,

i have designed a flash player using content editor webpart and trying to pass parameter from an image to play corresponding video using following code:









but unable to pass paramter. please guide me how to pass parameter to flash player?




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.

Web Service for uploading documents into SharePoint

WS UploadService is a web service written for Microsoft Office SharePoint Server 2007 and Windows SharePoint Services 3.0 and is meant for uploading documents into SharePoint. I have just uploaded the zip file to GotDotNet.com so it will take some time before the zip file appears in the list of downloads. For the time being, you can download the zip file from the following location

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.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