Simple ASP Class Question

Results 1 to 2 of 2

Thread: Simple ASP Class Question

  1. #1
    Join Date
    Dec 1969

    Default Simple ASP Class Question

    Hello,<BR>Im going to make an ASP class (My first time) that will retrive some text from database.<BR>i have simple question take alook at this code:<BR><BR> Set articleSearch = New clsArticleSearch <BR> &#039; Setting search filter <BR> articleSearch.searchString = "test string" <BR> ... <BR> Set articles = articleSearch.getArticles<BR> If artcles.count = 1 Then <BR> &#039; display the article <BR> Else <BR> &#039; display list of articles <BR> For Each article In articles <BR> Response.Write article.heading <BR> Response.Write article.subHeading <BR> Response.Write article.mainBody <BR> ... <BR> Next <BR> End If <BR> Set articleSearch = Nothing <BR><BR>my questions is how i will do this? In the part of "For Each article In articles" and article.subHeading!<BR>i mean what will the articleSearch.getArticles return? is it array or what is it? and how can i do sub-items under article the "article" object like "article.subHeading" and added it to the articleSearch.getArticles?<BR><BR>i cant explain well but i guess you know what i mean?!<BR><BR>i did this alot in ASP.NET but i dont know how can do it in Classic ASP, in ASP.NET i could use articleSearch.getArticles as collection this added article objects (which is sparate class) in collection. and then im free to call it.<BR><BR>so i just need expample just show me how can the function hold article objects in it? (with code please)<BR>Im kind of lost in this,this is very urgent please somebody help me.<BR><BR>Thanks in Advanced.<BR>Samer

  2. #2
    Join Date
    Dec 1969

    Default just a technical note....

    ... there&#039;s no such thing as an &#039;ASP Class&#039;. you&#039;re referring to a VBScript Class. might help when you search for solutions somewhere.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts