Click here to Skip to main content
16,019,018 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Is it possible to drag a label or text box into a image and save the image at run time in Asp.net....

Any Idea .....

Iam doing a project based on ID card..


We giving a photo card design as input in that file the name ,roll no fields are there .. the value for fields are stored in database

in another form it has labe1(rollno get from sql),label
(name get from sql)... in the form i inserting the previous form photo card design on that design i should drag and drop labels


at Run time the label should be changed according to data in sql if u not understand my concept u may contact me at senthil123123@gmail.com..

Please Provide a possible solution or ideas for my project
Posted
Updated 5-Jan-10 20:02pm
v2

I updated your question. Why is it that people keep posting fake 'answers' instead of updating their question ?

OK, so the idea is that people can print this ID card at home ? Why would you drag and drop labels to random positions on that ? Why do you have this project ? Is someone paying for it ? Did you agree to a design when you had no idea if it was physically possible to do what the client wants ?

No way can you drag and drop elements between forms in a web app.
 
Share this answer
 
You can use JavaScript to perform the drag/drop operation. As far as rendering, there is no easy way I know of, but it can be done. Depends on what you want to do with the image. If you just want to store a byte representation of the image, you could use the positions of the controls and mock up an image (i.e., by drawing it yourself). So, for a label, you'd get the left/top/width/height/text/font and draw one yourself using a custom algorithm. There are various libraries for displaying images that are generated in this fasion. Some of them use DIV's to fake an image. Some use SVG. Some use the CANVAS element. Some of those options are slow and some don't work on all browsers, so you could use a combination to make it fast and cross-browser. There are some libraries out there that work with these various types of client side browser drawing. For example, Google Maps uses different types of drawing depending on the browser you are using. Keep in mind, though, that this would be a time consuming and technically challenging task.
 
Share this answer
 
Where would you drag them from ? I know there's webparts in ASP.NET which can be dragged around, and you could do someting similar with javascript, but it would be a lot of work, and I suspect out of your league, based on the other questions you've been asking. I'd search for some sort of ready made library that offers what you want.

Wait - you want to drag a control into an image, and save the image, how ? I doubt that's possible, you may be able to set up some sort of dragging of controls, but you won't be able to create a screenshot on the client end of it. Perhaps you need to edit your post to explain more.
 
Share this answer
 
v2
Iam doing a project based on ID card..


We giving a photo card design as input in that file the name ,roll no fields are there .. the value for fields are stored in database

in another form it has labe1(rollno get from sql),label
(name get from sql)... in the form i inserting the previous form photo card design on that design i should drag and drop labels


at Run time the label should be changed according to data in sql if u not understand my concept u may contact me at senthil123123@gmail.com..

Please Provide a possible solution or ideas for my project
 
Share this answer
 
this id they doing design in Photoshop..

To minimize and do fast they asking for a project .. I explained my point that it time consuming but my boss insisting me to finish soon...
 
Share this answer
 
"this id they doing design in Photoshop..

To minimize and do fast they asking for a project .. I explained my point that it time consuming but my boss insisting me to finish soon..."

Well, I have several points based on this.

1 - someone inventing a mock up in Photoshop does NOT mean it can be created in code

2 - I pity anyone stuck with working with a company that agrees to a design it has no idea how to impliment

3 - your boss is a moron

4 - that you're being paid to do all these things that you have NO idea how to do, is an utter disgrace. It's because of companies like yours that I expect a huge backlash against Indian outsourcing in the not too distant future.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900