• 0

need opinion on form and picture uploading


Question

i am using asp.net and have a form to make a new item in the database

the form allows the user to add pictures, however the pictures are uploaded using ajax before the form is submitted

now since i dont know what the id of the new item is going to be, i can't associate any item id to the uploaded pictures untill the form is submitted

where would be a good place to store the uploaded pictures' id's so that when the form is submitted, i can get the id of the new item and update the uploaded pictures accordingly?

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

You can use the session ID or a cookie with some arbitrary ID as a temporary foreign key for pictures, and then replace it with the actual primary key of the user once an account is created under said session or cookie ID.

On a side note, I have a pet peeve about the term Ajax being thrown around loosely. You cannot upload a picture via Ajax, mate. If you are uploading images without reloading the page then you are doing it via either Flash or an iframe.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.