How to get Multiple Inputs - yii

I was thinking of implementing picture uploading to my web application.
Now there are few Uncertainties.It would be great if some one makes them clear.
How do you allow user to upload multiple data for
Example. I have a model for car and I want user to add as many pictures with comments. Usually on websites there is button that says "Add another picture". If user clicks that button or link a text field and a Browse button appears and user can add as many pictures as he wants.

You need to go through this wiki -
http://www.yiiframework.com/wiki/176/uploading-multiple-images-with-cmultifileupload/

Related

Should I upload selected files before the user submit the form?

I'm sorry for my english.
I have a question, I have a form that contain a file input and other text inputs, when the user selected an image and filled other inputs in the form , should I upload the file to the server before user actually hit the submit button, or when he hits the button. If I should upload the file before then how I gonna clean up the unnecessary files if the user doesn't complete the form and didn't hit the submit button or he close the browser before submitting the form .
Sorry again for my english
Both are OK, depends on the business logic.
For better UX, upload it before feels much faster, but in the other hand, much more complex to develop. On the backend side, for example, you might have a cron job to delete all images that was upload and not used(eg: user left the site). Also in some case you need to create the form first to get it's ID.
By uploading when the user click the submit button, is much easier to develop.
If you are new, i'd recommend to upload only when the user click on the submit button.

Disable user from saving .aspx content from browser by using "saving as" option

I have a .net website.
I need to disable the save as option from browser so that the user cant save some of the website pages in order to protect their content.I did disable right click.But user can select save as from browser's menu.
Is it possible to do that?
It is difficult to lock down a website by disabling the save button. What is to stop a user just copying the text and pasting to another document. Right clicking an image and saving. Then there are differences between browsers etc. If you need to protect you information you may need to look at creating and displaying PDFs but this is also not an easy thing especially if the site is dynamic.
What you want is impossible. If the user is able to read the information on his/her screen, there is always an option to copy the content.
How would you stop the user from taking a picture from his/her screen with a digital camera for example?

How do I implement this type of dynamic UI in a Razor view?

I will start by saying that I am an absolute newbie to web development and to MVC as well.
I want to implement a view for a Subscriber page (part of an MVC4 application dealing with Email marketing). What I want to implement is:
1) When the user clicks the "+ Add a List" button, a new Category should appear on the left and the cursor should blink, meaning it should be ready to receive the name for the category from the user. I also want that whenever the user hovers over any category name on the left, a small bar containing two buttons (edit and delete) should appear which should let the user edit the category name or delete that category. The thing I want is that all of these must happen without reloading the page.
2) When the user clicks the "+ Add Contact" button, a pop up dialog box containing two tabs should appear which lets the user either manually enter the details or upload a CSV to capture the details. Whenever the user clicks the "Add Contact" button or "Upload and Add Contacts" in the pop up dialog box, I want the new contacts to display in the contact list region shown in the picture (once again, without reloading the page). I also want the same hover bar for the contacts too (same as categories).
I am confused as to how to implement this in a Razor view? What do I use - JavaScript/jQuery/AJAX?
I am pretty much lost. Can someone please guide me a little bit so that I can continue and finish my first MVC4 project?
You need some javascript libraries like jQuery UI or maybe Kendo UI, I'd recommend to use jQuery UI at this time. they have many widgets but look at these. and keep in mind that a cshtml view can be look upon like a html page, you can have all tags, css and javascript you want there:
http://jqueryui.com/dialog/
http://jqueryui.com/tabs/
http://jqueryui.com/

What is an alternative to nesting remote forms in rails?

I have a User that can have multiple images. I would like to allow the user to add images while updating their user page and have those images dynamically updated so that they can see the images on their profile as they edit it. I currently have the images set as sortable using jQuery-ui. I would like the user to be able to add images, sort them, and edit their profile info and only need to click the submit button once.
I know that it is not possible to nest remote=>true forms and do not believe it's possible to submit files via ajax. Is there some other way this can upload the files and then use jquery to append them back to my div?
Unfortunately, from a user experience standpoint, the image section makes the most since being pretty much in the middle of the form. Moving it to the top or below the original form is less than ideal. I might be able to use CSS to make the remote form appear as if it is middle of the parent form, but this seems like a pretty bad solution.

how can i do this in wp7?

Any ideas on how i can create this app?
1) i have a page which contains 3 tasks and thus has a textbox, a label to contain an image name and another label which is to display my current location..the first is to enter some text into a textbox, the second is to take a picture and come back to this page and display the picture url and the 3rd is to determine and display my location.
2) i need to gather each of these 3 bits of information and upload it to a remote database via WCF or Odata.
3) I know that for example, to either take a picture with my camera or browse to a pix in the pictures hub will take me away from my task page.
how can i take the picture and carry the information back to my task page without losing state?
To get a picture from the camera you need to use a CameraCaptureTask.
To choose an existing picture from the phone you shoudl use a PhotoChooserTask.
To get the devices currentl location use the GeoCoordinateWatcher.
There should be no issues with loosing state while you capture this information but isf there is you can just store it in the Page State object.
Note. All links are "How To" articles.
When you take a picture, your application will be tombstoned. See the following article for details of how this process works and what you need to do:
http://windowsteamblog.com/windows_phone/b/wpdev/archive/2010/07/20/understanding-the-windows-phone-application-execution-model-tombstoning-launcher-and-more-part-3.aspx