Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

request.form problem

Status
Not open for further replies.

spiral123

Programmer
Sep 9, 2002
73
CA
I need my page to display one set of data is a form was submitted, and another set if it wasn't. I have it working except if the request.form("unitnumber")= 00001X then i get a "Type mismatch: '[string: "00001X"]' " But if it is a straight numeric value it works great. The code is below, any advice is appreciated.


<% if request.form(&quot;unitnumber&quot;) then

Unitnumber = request.form(&quot;unitnumber&quot;)
else
Unitnumber=0
end if
%>
 
try IsEmpty
<% if IsEmpty(request.form(&quot;unitnumber&quot;)) then
Unitnumber=0
else
Unitnumber = request.form(&quot;unitnumber&quot;)
end if
%> _________________________________________________________
for the best results to your questions: FAQ333-2924
Is your question a most FAQ?? Find out here FAQ333-3048
 
mebi u can try

<% if CStr(request.form(&quot;unitnumber&quot;)) = &quot;&quot; then
Unitnumber=0
else
Unitnumber = CStr(request.form(&quot;unitnumber&quot;))
end if
%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top