Thread: Map Logic
View Single Post
  #8 (permalink)  
Old October 11th, 2010, 03:30 PM
flyinhawaiian flyinhawaiian is offline
Friend of Wrox
Points: 539, Level: 8
Points: 539, Level: 8 Points: 539, Level: 8 Points: 539, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Oct 2010
Location: Seattle
Posts: 106
Thanks: 1
Thanked 17 Times in 17 Posts

Ok, finally I got mine fixed. I think there's two ways. Here's one way.
1. Kept the #mapDiv mentioned earlier (in Site.css)

2. Set the id in div tag for the map to "mapDiv"
        <div id="mapDiv">    
            <% Html.RenderPartial("Map", Model.Dinner); %>
3. In Dinnerform.ascx, put the Html.RenderPartial at the top of the fieldset. Since the map is set to float right, everything afterwards will be rendered to the left of it.

4. At this point the Create and Edit should look correct since they both use Dinnerform.ascx.

5. Now fix Details.aspx in the same way, putting the render partial at the top. Open the form in designer. May need to adjust size of MainContent div. Why? There's less fields in the details page so it doesnt extend down as far as the Create/Edit pages. So the map will overlap the bottom of form. Notice they call it details page even though there's not a whole lot of details on that page?

The 2nd way: I havent tried this yet but should work better. Basically do the opposite of the above.

Create #dinnerDiv (instead of #mapDiv) in Site.css with float:left. Use this as the id for the div tags that enclose Dinner. Since dinner is float left, everything after it (the map) should render to the right. This means, the Html.RenderPartial("map") should be last, after all the dinner fields.