ஒரு பார்வை

July 6, 2006

[VB] Improvements

Filed under: ASP/ ASP.NET,Web Programming — CAPitalZ @ 11:40 am

Avoid multiple Response.Write statements and group them in to few. Slower:

‘Add a default Select Word
Response.Write ” <option value=””0″”>(Select a Program Manager)</option>”

¨       Do While Not objRs.EOF
Response.Write ” <option value=” & objRs!ProjManKey & “>” & objRs!ProjMan & “</option>”
objRs.MoveNext
Loop
Response.Write “</font> </select>”

Faster:

Dim strHTML

‘Add a default Select Word
strHTML =  ” <option value=””0″”>(Select a Program Manager)</option>”

Do While Not objRs.EOF
strHTML = strHTML & ” <option value=” & objRs!ProjManKey & “>” & objRs!ProjMan & “</option>”
objRs.MoveNext
Loop
strHTML = strHTML &  “</font> </select>”

Response.Write strHTML

______
CAPital

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: