Bilgisayar Bölümü ASP Kod ve Script Arşivi


List box




This Is a fairly basic example but it shows a couple of useful techniques For beginners . Firstly we show how To pass results To the page that a script resides by using <%= Request.ServerVariables(""SCRIPT_NAME"") %> . It also shows an example of using a listbox .

<form action = ""<%= Request.ServerVariables(""SCRIPT_NAME"") %>"" method = ""Get"">
<Select size=""2"" name = ""colour"" multiple>
<Option>Green</Option>
<Option>Red</Option>
<Option>Blue</Option>
<Option>purple</Option>
<Option>black</Option>
<Option>white</Option>
</Select>
<Input Type=""submit"">
</form>
<%
Dim intCount
'If no colours are selected Then display a message
If Request.QueryString(""colour"").Count = 0 Then
Response.Write ""You didnt Select any colours""
'If you did Select colours
Else
'Loop through the selected colour(s)
For intCount = 1 To Request.QueryString(""colour"").Count
Response.Write ""You Like the colour ""
Response.Write Request.QueryString(""colour"")(intCount)
Response.Write ""<br>""
Next
End If
%

"

ASP Kitabı

 

Faydalılar: Altın Fiyatları |Hediye Kolye | pırlanta fiyatları
Ana Sayfa  Sık Kullanılanlara Ekle   admin[at]bilgisayarbolumu.com | © 2006 - 2023 Bilgisayarbolumu.com