75 lines
No EOL
2.4 KiB
Text
75 lines
No EOL
2.4 KiB
Text
<%= Html.ValidationSummary("Please correct the errors and try again.") %>
|
|
|
|
<% dim myForm
|
|
myForm = Html.BeginForm() %>
|
|
|
|
<fieldset>
|
|
|
|
<div id="dinnerDiv">
|
|
|
|
<p>
|
|
<label for="Title">Dinner Title:</label>
|
|
<%= Html.TextBox("Title", Model.Dinner.Title) %>
|
|
<%= Html.ValidationMessage("Title", "*") %>
|
|
</p>
|
|
<p>
|
|
<label for="EventDate">Event Date:</label>
|
|
<%= Html.TextBox("EventDate", FormatDateTime(Model.Dinner.EventDate, vbGeneralDate)) %>
|
|
<%= Html.ValidationMessage("EventDate", "*") %>
|
|
</p>
|
|
<p>
|
|
<label for="Description">Description:</label>
|
|
<%= Html.TextArea("Description", Model.Dinner.Description) %>
|
|
<%= Html.ValidationMessage("Description", "*")%>
|
|
</p>
|
|
<p>
|
|
<label for="Address">Address:</label>
|
|
<%= Html.TextBox("Address", Model.Dinner.Address) %>
|
|
<%= Html.ValidationMessage("Address", "*") %>
|
|
</p>
|
|
<p>
|
|
<label for="Country">Country:</label>
|
|
<%= Html.DropDownList("Country", Model.Countries) %>
|
|
<%= Html.ValidationMessage("Country", "*") %>
|
|
</p>
|
|
<p>
|
|
<label for="ContactPhone">Contact Phone #:</label>
|
|
<%= Html.TextBox("ContactPhone", Model.Dinner.ContactPhone) %>
|
|
<%= Html.ValidationMessage("ContactPhone", "*") %>
|
|
</p>
|
|
<p>
|
|
<%= Html.Hidden("Latitude", Model.Dinner.Latitude)%>
|
|
<%= Html.Hidden("Longitude", Model.Dinner.Longitude)%>
|
|
</p>
|
|
<p>
|
|
<input type="submit" value="Save" />
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div id="mapDiv">
|
|
<% Html.RenderPartial("Map", Model.Dinner) %>
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function() {
|
|
$("#Address").blur(function(evt) {
|
|
//If it's time to look for an address,
|
|
// clear out the Lat and Lon
|
|
$("#Latitude").val("");
|
|
$("#Longitude").val("");
|
|
|
|
var address = jQuery.trim($("#Address").val());
|
|
if (address.length < 1)
|
|
return;
|
|
|
|
FindAddressOnMap(address);
|
|
});
|
|
});
|
|
|
|
</script>
|
|
|
|
<% myForm.dispose() %> |