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 or English word but not both
Anti-Spam Image

© 2024 - All Right Reserved. | Adadaa logo