Click here to Skip to main content
14,774,898 members
Home » Discussions » ASP.NET
   

ASP.NET

 
GeneralRe: VS2012 cannot open MVC4 application - the system cannot find the file specified (exception from HRESULT 0x80070002) Pin
Usman ali24-Aug-16 23:27
MemberUsman ali24-Aug-16 23:27 
QuestionAsp.net C# Export to excel stop working Pin
BigLitz15-Aug-16 7:57
MemberBigLitz15-Aug-16 7:57 
AnswerRe: Asp.net C# Export to excel stop working Pin
Richard Deeming15-Aug-16 8:41
mveRichard Deeming15-Aug-16 8:41 
GeneralRe: Asp.net C# Export to excel stop working Pin
BigLitz15-Aug-16 14:14
MemberBigLitz15-Aug-16 14:14 
Questionhow to make delete row from table using linq Pin
ahmed_sa14-Aug-16 8:20
Memberahmed_sa14-Aug-16 8:20 
AnswerRe: how to make delete row from table using linq Pin
John C Rayan16-Aug-16 2:30
professionalJohn C Rayan16-Aug-16 2:30 
QuestionTrying to EDIT 2 separate, one-to-one database tables with ONE form/ViewModel Pin
TheOnlyRealTodd11-Aug-16 21:32
professionalTheOnlyRealTodd11-Aug-16 21:32 
AnswerRe: Trying to EDIT 2 separate, one-to-one database tables with ONE form/ViewModel Pin
F-ES Sitecore12-Aug-16 1:34
mveF-ES Sitecore12-Aug-16 1:34 
If the hidden addressed field is empty it will be because there is no addressed in the model. That is probably down to how you are mapping them, maybe the mapping isn't putting the id from the address object into the addressid in the view model as the two differ. You could try copying this value yourself rather than getting the mapper to do it, or use whatever feature the mapper has for custom mapping.

Before you do that, one thing that may well simplify your code is to do your view model like this

public class BarFormViewModel
{
    public Address Address {get; set;}
    public Bar Bar {get; set;}
}


That way you don't need to "flatten" two objects into one, and you remove a lot of field duplication also. So when creating your viewmodel you just do

model.Address = addressFromDb;
model.Bar = barFromDb;


You'll need to amend your view as required also, but that is the better way to handle your problem.
QuestionPrintPageEventHandler not working when I upload my site to IIS Pin
awinash kr6-Aug-16 20:21
Memberawinash kr6-Aug-16 20:21 
QuestionRe: PrintPageEventHandler not working when I upload my site to IIS Pin
Richard MacCutchan6-Aug-16 21:24
mveRichard MacCutchan6-Aug-16 21:24 
AnswerRe: PrintPageEventHandler not working when I upload my site to IIS Pin
awinash kr6-Aug-16 21:28
Memberawinash kr6-Aug-16 21:28 
SuggestionRe: PrintPageEventHandler not working when I upload my site to IIS Pin
Kornfeld Eliyahu Peter6-Aug-16 23:35
professionalKornfeld Eliyahu Peter6-Aug-16 23:35 
GeneralRe: PrintPageEventHandler not working when I upload my site to IIS Pin
awinash kr6-Aug-16 23:47
Memberawinash kr6-Aug-16 23:47 
AnswerRe: PrintPageEventHandler not working when I upload my site to IIS Pin
Richard Deeming8-Aug-16 2:35
mveRichard Deeming8-Aug-16 2:35 
Questionwebform Pin
Member 126713194-Aug-16 22:46
MemberMember 126713194-Aug-16 22:46 
AnswerRe: webform Pin
Richard MacCutchan4-Aug-16 23:09
mveRichard MacCutchan4-Aug-16 23:09 
Questioninstallation of asp.net Pin
AMIT SINGH 20164-Aug-16 9:27
MemberAMIT SINGH 20164-Aug-16 9:27 
QuestionCould not find a part of the path "\ASP.Net Practical\Website\Site1\UploadedImgs \".. Pin
Otekpo Emmanuel2-Aug-16 7:33
MemberOtekpo Emmanuel2-Aug-16 7:33 
AnswerRe: Could not find a part of the path "\ASP.Net Practical\Website\Site1\UploadedImgs \".. Pin
jkirkerx2-Aug-16 10:19
professionaljkirkerx2-Aug-16 10:19 
GeneralRe: Could not find a part of the path "\ASP.Net Practical\Website\Site1\UploadedImgs \".. Pin
Otekpo Emmanuel3-Aug-16 8:16
MemberOtekpo Emmanuel3-Aug-16 8:16 
GeneralRe: Could not find a part of the path "\ASP.Net Practical\Website\Site1\UploadedImgs \".. Pin
jkirkerx3-Aug-16 8:40
professionaljkirkerx3-Aug-16 8:40 
QuestionRegarding DataTable width Pin
harikreddy31-Jul-16 22:48
Memberharikreddy31-Jul-16 22:48 
QuestionRe: Regarding DataTable width Pin
Richard MacCutchan31-Jul-16 23:24
mveRichard MacCutchan31-Jul-16 23:24 
AnswerRe: Regarding DataTable width Pin
ZurdoDev1-Aug-16 9:11
professionalZurdoDev1-Aug-16 9:11 
QuestionAngularjs is not refreshing data on the CSHTML page Pin
indian14330-Jul-16 15:28
Memberindian14330-Jul-16 15:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.