ASP/ ASP.NET,  Web Programming

[VB] Improvements

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 Reply

உங்கள் மின்னஞ்சல் வெளியிடப்பட மாட்டாது


To prove you're a person (not a spam script), type the security word shown in the picture.
You can enter the Tamil word
Anti-Spam Image