
我有了这个模式,现在我想
在“创建艺术家”的“保存”按钮上,应该同时执行三个操作,
- Insert Picture record in database.
- Save picture's physical file on server.
- Save Artist record in database with newly created pictureID.
发布于 2011-07-09 09:04:30
我有一个开源项目,我完成了大部分您想要做的事情。我把它放在谷歌代码上。
在这里,用户选择一张图片并单击“保存”。你可以很容易地把它变成部分视图。请参阅“自定义配置文件图片”区域http://code.google.com/p/better-task-list-1-1-progress/source/browse/trunk/Views/Account/MyAccount.cshtml
查看ChangePicture() ActionResult http://code.google.com/p/better-task-list-1-1-progress/source/browse/trunk/Controllers/AccountController.cs
上保存图片的物理文件
查看ChangePicture() ActionResult http://code.google.com/p/better-task-list-1-1-progress/source/browse/trunk/Views/Account/MyAccount.cshtml中的代码
数据库中保存艺术家记录
查看ChangePicture() ActionResult http://code.google.com/p/better-task-list-1-1-progress/source/browse/trunk/Views/Account/MyAccount.cshtml中的代码
希望上面的信息能帮到你。保重。
https://stackoverflow.com/questions/6632328
复制相似问题