c# - Add images dynamicaly asp net mvc 4 -
i building simple image gallery using asp.net mvc 4. best way in create method images users pc? mean there way open file explorer in browser , copy selected file /content/images folder?
what best way in create method images users pc?
using file input control , having action take file:
@using (html.beginform("youraction", "controller", formmethod.post, new { enctype = "multipart/form-data" })) { <input type="file" name="image" /> <input type="submit" value="upload" /> }
then post action be:
public actionresult youraction(httppostedfilebase image) { //do whatever image }
i mean there way open file explorer in browser , copy selected file /content/images folder?
no, not content/images folder. should consider hosting solution/database store these images.
Comments
Post a Comment