any thoughts on this?
I'm using MVC2 in VS2010. I have javascript in my view to put markers on a google map. I need to get the address and distance from text boxes,
<%= Html.TextBox("address") %>
<%= Html.TextBox("distance") %>
to use as arguments in the function drawMap(address, distance);
in my code.
Is there a register object I can use to access this? Also, having some issues using <%= Html. (..) %>
in the <script type="text/javascript"><script>
flags. I realise I should probably be implementing the MVC model here, and although use this to populate the textboxes on loading, can't pull the information from a textbox back out again on the POST back, to get values in the javascript function in the view.
Any suggestions greatly received! Thanks in advance.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// further question re: DropDownListFor<>
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Is there also a simple way of getting information from:
<%: Html.DropDownListFor(model => model.SavedAddress1, ViewData["StartLoc"] as SelectList) %>
The SelectList for this is held in the Controller. Would I get which one had been selected from the controller in the POST? Or is there a way of determining which had been selected directly in the Javascript.
Many thanks