save form not saving correct if there is an apostrophe (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


travismp -> save form not saving correct if there is an apostrophe (4/18/2008 11:25:47)

I have a form that loads a field from my DB from a previous page. The field name is [Contractors] the new form allows my users to enter new records and it saves the new record with the [Contractor] field. However if there is an apostrophe it drops the rest of the company name.

value='<%=Request("Contractors")%>'></font>


Example:
STEVE'S EXCAVATION

Only saves:
STEVE

Can I add anything to my code above to resolve this issue? Thanks.




rdouglass -> RE: save form not saving correct if there is an apostrophe (4/18/2008 12:15:09)

quote:

value='<%=Request("Contractors")%>'></font>


Try using double quotes instead:

value="<%=Request("Contractors")%>"></font>




travismp -> RE: save form not saving correct if there is an apostrophe (4/18/2008 12:25:33)

That worked GREAT. Thank you so much.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625