updated questions in .Net topic

Check if my model is valid from inside the razor view?

Gets the model state dictionary object that contains the state of the model and of model-binding validation.

if (ModelState.IsValid){}

—write validation in view

<div>

@using (Html.BeginForm(“Create”, “Client”, FormMethod.Post, new { @class = “form-horizontal”, role = “form” }))

{

<div>

<div>@Html.LabelFor(m => m.Name)

<span>@Html.ValidationMessageFor(model => model.Name)</span></div>

<div>@Html.TextBoxFor(m => m.Name, new { maxlength = 15 })</div>

</div>

}

}

ValidationMessageFor –Returns the HTML markup for a validation-error message for each data field that is represented by the specified expression. The message to display if the specified field contains an error.

 

–Attribute

Difference between attribute and properties

http://www.tutorialspoint.com/jquery/jquery-attributes.htm

–areas define in mvc

–how to service implement if server change or server dependancy(what service used if server communication each other and expose service in application in .net)

http://msdn.microsoft.com/en-us/library/ee658109.aspx

http://msdn.microsoft.com/en-us/library/ee958158.aspx

–web api use and purpose of application need

–where is repository defined

 

 

Leave a Reply