David Mac 0 Newbie Poster

Hi All,

My first post in a LONG time (got a prompt from admin).

I have a fully working ASP.Net website that handles dimensions in metric.
The customer now wants to extend the website to allow Americans to use it using imperial measurements!!!?? (Yes, I have tried to talk them out of it!).

I think the way to do this would be to keep everything in metric as far as possible and convert to imperial (feet & inches instead of metres) on the fly.
So, when displaying the values I convert from metres to feet/inches
After accepting input I convert to metres and store as usual (in metres)

I display results in a FormView with

<td>
<%#Eval("Width", "{0:n3} m")%>
</td>

I get input in the FormView with

                        <td>
                            <asp:TextBox id="txtWidth" Text='<%# Bind("Width") %>' Width="50px" Runat="server" />m
                        </td>

So the question is how do I do it?

Any suggestions/alternative approaches welcome

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.