Creating a Server Component with VB - Redesigned - Part 2[20]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 sonicdater 的 blog

itledatastart s1 s2, s3, strtitlefontstart '///// get the number of titles stored in the array lngarraycount = ubound(vrecordarray, 2) '///// set selected noteid to array index (for not inserting the <a> tag) lngnoteidindex = (lngnoteid - 1) '///// loop through array for lngindexcount = 0 to lngarraycount '///// include an <a> tag if not the selected noteid if not lngnoteidindex = lngindexcount then s1 s2, s3, "<a href=""" s1 s2, s3, strurl s1 s2, s3, "?id=" s1 s2, s3, vrecordarray(array_note_id_index, lngindexcount) s1 s2, s3, """>" end if '///// include the note title text from the array s1 s2, s3, vrecordarray(array_title_index, lngindexcount) '///// include an </a> tag if not the selected noteid if not lngnoteidindex = lngindexcount then s1 s2, s3, "</a>" '///// end the title line with a line break s1 s2, s3, "<br>" next '///// include the ending font and table data tags s1 s2, s3, strtitlefontend s1 s2, s3, strtitledataend '///// construct note text body //////////////////////////////// '///// include the beginning table data and font tags s1 s2, s3, strtextdatastart s1 s2, s3, strtextfontstart '///// include the note text body s1 s2, s3, strnotetext '///// include the ending font table data tags s1 s2, s3, strtextfontend s1 s2, s3, strtextdataend '///// send back constructed text in buffer //////////////////// shownotes = left$(s2, s3) conclusion

the code examples in this article are the main essential processes needed to write large server-side applications like my own ezsite forum dev and ezsite daily planner. both applications are available as free trial downloads at my site, http://www.dougdean.com. please feel free to download either application, without obligation, and explore how the asp code and method signatures work together. both trial applications have documented method descriptions that incorporate the processes described in this article.

i also want to acknowledge the many programmers and developers who contact me with information and suggestions about the articles i have written. your comments are appreciated and i feel fortunate that i can have a venue to 'brain-dump' the server-side information that i acquire.

one other thought i'd like to share is the issue of transition to microsoft's .net. at the time this article was published, beta 2 had just been released and books, magazines, and conferences have all dedicated themselves to the .net environment. i'm very happy with c# and have already started coding an application for the .net environment. one question on my mind was answered at recent conference. simply stated, the recommendation was to use c# for .net component development and stay exclusively with vb for com development. not mixing the new and old vbs hits a chord with me and i wanted to pass it on to any readers who may share the same intuitions i have about the future direction of server-side component development. com components written with vb6 will be necessary for quite a while and the thought of having to keep track of two versions of vb inside my head is disconcerting, to say the least. i, for one, will use be using c# for .net server-side component development and vb6 for server-side com development.

about the author

doug dean lives in southern california where he manages doug dean software, inc. his company is dedicated to creating server-side component products. his product line also includes ezsite forum dev, ezsite daily planner, ezsite forum 3, ezsite calendar, and ezsite webnotes. other helpful articles on asp/vb component issues can be found at http://www.dougdean.com. contact doug dean at dougdean@deltanet.com.

本文关键:Creating a Server Component with VB - Redesigned
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top