Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%
- using (Html.BeginForm())
- {
- %>
- <table>
- <tr>
- <td>Street Address</td>
- <td>
- <%= Html.TextBox("StreetAddress", (ViewData.Model != null) ? ViewData.Model.StreetAddress : "") %>
- <%= Html.ValidationMessage("Address.StreetAddress") %>
- </td>
- </tr>
- </table>
- <%= Html.SubmitButton() %>
- <%
- if (ViewData["GeocodeResults"] != null) {
- %>
- <p>
- Google maps found the following addresses that matched the address you entered. Please select
- the appropriate address. If none of these addresses are correct, try reentering the address
- again and be as specific as possible.
- </p>
- <ul>
- <%
- foreach (GeocodeResult geocodeResult in (List<GeocodeResult>)ViewData["GeocodeResults"]) {
- %>
- <li>
- <%= geocodeResult.StreetAddress %>
- </li>
- <%
- }
- %>
- </ul>
- <%
- }
- %>
- <%
- }
- %>
- <a href='javascript:void(0);' onclick='submitAddress(this);'>
- <%= geocodeResult.StreetAddress %></a>
- function submitAddress(link) {
- $('input#streetAddress:first').text(link.innerHtml);
- $('input#submit').click();
- }
Add Comment
Please, Sign In to add comment