Click to See Complete Forum and Search --> : Server.HTMLEncode
jskeens
02-05-2003, 02:17 PM
I am trying to use an htmlencode in my asp page, but it seems to keep converting my values, like its NOT supposed to do. Here is my code can anyone tell me what I am doing wrong?
Thank you
<%if adorProducts.recordcount >= lngNumberOfRecords then adorProducts.MovePrevious strMoreURL = inventoryList.asp?intCustomerID=<%=intCustomerID%>&strLotNumber=<%=strLotNumber%>&strLicensePlate=<%=strLicensePlate%>&strSku=<%=strSku%>&intStatus=<%=intStatus%>&guid=<%=strGuid%>&strLastProductId=<%=adorProducts("ProductId").value%>
%>
<A HREF="<%=server.htmlencode(strMoreUrl)%>">more >></A>
<%end if%>
Ribeyed
02-05-2003, 02:34 PM
Hi,
I think your problem is you were missing " from around your string.
<%if adorProducts.recordcount >= lngNumberOfRecords then
adorProducts.MovePrevious
strMoreURL = "inventoryList.asp?intCustomerID=<%=intCustomerID%>&strLotNumber=<%=strLotNumber%>&strLicensePlate=<%=strLicensePlate%>&strSku=<%=strSku%>&intStatus=<%=intStatus%>&guid=<%=strGuid%>&strLastProductId=<%=adorProducts("ProductId").value%>"
%>
<A HREF="<%=server.htmlencode(strMoreUrl)%>">more >></A>
<%end if%>
Hope this helps
Ribeyed
02-05-2003, 02:35 PM
hi,
nope wait found someting else, will post again
Ribeyed
02-05-2003, 02:42 PM
Hi,
try this:
<%if adorProducts.recordcount >= lngNumberOfRecords then
adorProducts.MovePrevious
strMoreURL = "inventoryList.asp?intCustomerID= "
strMoreURL = STSMoreURL & ""&intCustomerID&"&strLotNumber="&strLotNumber&"&strLicensePlate="&strLicensePlate&"&strSku="&strSku&"&intStatus="&intStatus&"&guid="
strMoreURL = STSMoreURL & ""&strGuid&"&strLastProductId="&adorProducts("ProductId").value&""
%>
<A HREF="<%=server.htmlencode(strMoreUrl)%>">more >></A>
<%end if%>
If you notice in your code you have <% to open asp then further along you have <% again.
<% if adorProducts.recordcount >= lngNumberOfRecords then adorProducts.MovePrevious strMoreURL = inventoryList.asp?intCustomerID=<% =intCustomerID%.............
This is not allowed.
Try the code above, i couldn't test so there maybe a error, if so post it again.
Hope this helps
jskeens
02-05-2003, 02:55 PM
I just e-mailed you [SWR]Ribeyed
Thanks
Ribeyed
02-06-2003, 02:37 AM
Hi yes sounds like you're trying paging. Maybe you will have better luck if you start of with this example.
http://www.aspfaq.com/show.asp?id=2120 . If you need to add anything else to your paging just post your questions here and i our someone else would only be happy to help.
Hope this helps
pelegk1
05-18-2006, 07:34 AM
why when i do server.htmlencode("15/05/2006") i recive "05/15/2006"
beacuse of the enlish date format?