Tuesday, November 3, 2009

Deleting posts/GIVE ME THE CODE

This morning someone asked this:

file uploade component

hi
i have a image component and a file uploade componnet and a command button componen;i want when i select image withe file upload and clic the button the picther load in the image copmponnet.plees help me.
tanks/


So I replied:

You need to do several things.

1 - the user needs to select an image
2 - the user needs to push the button
3 - the page needs to post back
4 - you need to save the image somewhere
5 - you need to send the page back with the source of the image control being set to where-ever you saved the image.

You can save it in the file system, under the application root ( use Server.MapPath to find the file system equivalent ), or to a database, and then you'd need to write a page which returns the bytes of the image and the correct MIME type, taking the id of an image on the URL, and set the control to that.


His answer was:

i need sorce code a sorce code in the visule stadio asp.net c#


While the task seems like something a learner would do to learn, as opposed to unskilled paid work, it appears that it's either paid work or homework, because he doesn't want to know how to do it, or explore my answer, he just wants the code. I answer:

Why do you need it ? What are you trying to do ? Which bit are you stuck on ?


And he responds by deleting all his posts. I guess he'll see if someone on the MSDN forums will just do his work without asking him to show any signs of intelligence or comprehension.

No comments:

Post a Comment