942,960 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Marked Solved
  • Views: 51727
  • ASP RSS
Jan 29th, 2008
-1

Convert Int to string classic asp

Expand Post »
Can anyone tell me how to convert an int to a string value that I define?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
dweaver6 is offline Offline
19 posts
since Jan 2008
Feb 16th, 2008
0

Re: Convert Int to string classic asp

Hi, you do something like this example

<%

' CInt Converts to Integer
' CStr Converts to String
' TypeName Returns subtype variable for your control

a = Cint(1)
b = Cstr(1)

Response.Write(TypeName(a)) & "<br>"
Response.Write(TypeName(b))

%>
Reputation Points: 10
Solved Threads: 3
Junior Poster
TobbeK is offline Offline
190 posts
since Feb 2008
Mar 7th, 2010
0
Re: Convert Int to string classic asp
ASP Syntax (Toggle Plain Text)
  1. strQuery = "select user_id from user_master where manager_id in (" & user_idchk & ")"
  2. ObjdaAct = New SqlDataAdapter(strQuery, ObjconAct)
  3. useridslist = New DataTable
  4. ObjdaAct.Fill(useridslist)
  5. user_idchk = ""
  6. If useridslist.Rows.Count > 0 Then
  7.  
  8. For intcounter = 0 To useridslist.Rows.Count - 1
  9. user_idchk = user_idchk & useridslist.Rows(intcounter).Item(0) & ", "
  10. Next
  11. user_idchk = Left(user_idchk, Len(user_idchk) - 2)
  12. teammembersids = teammembersids & user_idchk & ", "
  13. 'user_idchk = "0"
  14. Else
  15. user_idchk = ""
  16. End If
Last edited by peter_budo; Mar 7th, 2010 at 8:13 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)
Reputation Points: 10
Solved Threads: 0
Newbie Poster
trupti_rose is offline Offline
1 posts
since Mar 2010

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: ASP to access
Next Thread in ASP Forum Timeline: ASP Code Problem





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC