Jesse
|
| Posted: 05/21/2002, 9:00 AM |
|
Hello there,
I have a little problem that I hope somone can help meout with. I have made an online bookstore with the help of the example within codecharge. In the bookstore I also sell free publications and the people can read the text of them online. So I have made a link for them in the bookdetail page to go to the text of the publication. The problem is it shows this link with all books and not only with the publications. So I need some code where it only shows the link field when the categorie_id is 3.
Can anyone help me
Thanks
Jesse
|
|
|
 |
Ken Hardwick
|
| Posted: 05/21/2002, 9:27 AM |
|
In ASP you can ...
1)Create a field on your form as an URL type.
2)Add in before show something like..
if fldType = "Pub" then
fldURL = "Free"
else
fldedit = ""
end if
Then when type = "Pub" then a link will appear but not otherwise
|
|
|
 |
Ken Hardwick
|
| Posted: 05/21/2002, 9:32 AM |
|
if clng(fldcategorie_id) = 3 then
fldURL = "Free"
else
fldURL = ""
end if
|
|
|
 |
jesse
|
| Posted: 05/21/2002, 10:46 AM |
|
Thanks for your quick answer.
I have tried it and when I open the page the browser says something like
'Type's don't match: 'CLng'.
I am sorry it is in dutch and I don't exactly knwo what it is in English. What does it mean, do I have to fill in something else then CLng
Hope you can help
Thanks
Jesse
|
|
|
 |
Ken Hardwick
|
| Posted: 05/21/2002, 1:19 PM |
|
Since in ASP one can not declare the varible type. I quite often used various funtions to force the type of the results..
See article at.. http://www.umt.edu/webdev/asp3.asp
In this case I was trying to force the value of categoryid (which per your question should be a number) to be a number...
so that I could compare it to a number...
ie clng(fldCategory_ID) = 3
or might have used
cstr(fldCategory_ID) = "3"
If you fldCategory_ID values are not always numbers then you might try this
second function.
|
|
|
 |
jesse
|
| Posted: 05/21/2002, 1:57 PM |
|
Thanks man, it works
I appriciate it.
Thanks for your fast reply's.
Greetz
Jesse
|
|
|
 |