folder Tahribat.com Forumları
linefolder C#, Asp.Net, .Net Core
linefolder 100 Tane Checkbox"In Her Birinin Onaylı Olup Olmadığını Nasıl Bulabilirim?



100 Tane Checkbox"In Her Birinin Onaylı Olup Olmadığını Nasıl Bulabilirim?

  1. KısayolKısayol reportŞikayet pmÖzel Mesaj
    AMoonRA
    AMoonRA's avatar
    Kayıt Tarihi: 07/Aralık/2007
    Erkek

    100 tane checkbox var  hepsini tek tek

     

        if checkbox1.checked =true then...

        if checkbox2.checked =true then...

             .
             .  

        if checkbox100.checked=true then...

     

    demenin yerine bunun döngülü ya da başka bişelsini yapmanın kısa yolu var mı acaba??

     

  2. KısayolKısayol reportŞikayet pmÖzel Mesaj
    camarade
    ontedi
    ontedi's avatar
    Kayıt Tarihi: 04/Eylül/2005
    Erkek

    Asp olanını yazayım gerisi sana kalmış

    for i = 1 to 100

    if checkbox"&i&".checked = True Then

    response.write "Fasulyenin faydaları"

    else

    response.write "Zararı ise gaz bombasıdır."

    end if

    next 


    Matematikçi ve Yazılımcı. http://www.ontedi.com ve http://www.cizgi.site Siteme beklerim herkesi.
  3. KısayolKısayol reportŞikayet pmÖzel Mesaj
    AMoonRA
    AMoonRA's avatar
    Kayıt Tarihi: 07/Aralık/2007
    Erkek
    ontedi bunu yazdı:
    -----------------------------

    Asp olanını yazayım gerisi sana kalmış

    for i = 1 to 100

    if checkbox"&i&".checked = True Then

    response.write "Fasulyenin faydaları"

    else

    response.write "Zararı ise gaz bombasıdır."

    end if

    next


    -----------------------------

     

     if checkbox"&i&".checked = True  bunu vb.net kabul etmiyo vb.net teki hali yanılmıyosam "checkbox" &  i.checked = True  (checkbox1.checked=true)  ama

     bunu checkbox olarak  kabul etmiyo vb.net  yani checked özelliğini böle kullanamıyosun .

  4. KısayolKısayol reportŞikayet pmÖzel Mesaj
    camarade
    ontedi
    ontedi's avatar
    Kayıt Tarihi: 04/Eylül/2005
    Erkek
    Sen kullanılan halini ver ayarlarız artık. Vb.net bilsem yazardım ama kalmadı malesef :). Tam anlaşılır biçimde yaz, geç anlayabiliyorum :).

    Matematikçi ve Yazılımcı. http://www.ontedi.com ve http://www.cizgi.site Siteme beklerim herkesi.
  5. KısayolKısayol reportŞikayet pmÖzel Mesaj
    FOXXLY
    FOXXLY's avatar
    Kayıt Tarihi: 19/Haziran/2006
    Erkek

    for i = 1 to 100

    response.write "if checkbox'"&i&"'.checked = True"

    next

    bunu al , not defterinde asdasdasd.asp diye kaydet sonra bi hostta aç bunu . çıkan sonucu direk lazım olan yere yaz :D


    kelimeler albayım bazı anlamlara gelmiyor.
  6. KısayolKısayol reportŞikayet pmÖzel Mesaj
    AMoonRA
    AMoonRA's avatar
    Kayıt Tarihi: 07/Aralık/2007
    Erkek

    ontedi bunu yazdı:
    -----------------------------
    Sen kullanılan halini ver ayarlarız artık. Vb.net bilsem yazardım ama kalmadı malesef :). Tam anlaşılır biçimde yaz, geç anlayabiliyorum :).
    -----------------------------

     CheckBox 'ın kullanım şekli isim.yordam şeklinde 

    onaylı olup olmadığını kontrol etme şu şekilde oluyo  

      İf CheckBox1.Checked =True  then ..... burası bu kadar

    ama sorun  .Checked  özelliğini kullanmak için illa ki onun adını yazmamız gerekiyo & li birleştirmeyi kabul etmiyo velet..

  7. KısayolKısayol reportŞikayet pmÖzel Mesaj
    AMoonRA
    AMoonRA's avatar
    Kayıt Tarihi: 07/Aralık/2007
    Erkek
    FOXXLY bunu yazdı:
    -----------------------------

    for i = 1 to 100

    response.write "if checkbox'"&i&"'.checked = True"

    next

    bunu al , not defterinde asdasdasd.asp diye kaydet sonra bi hostta aç bunu . çıkan sonucu direk lazım olan yere yaz :D


    -----------------------------

     

    Konuyu açarken  kodları  vb.net 'te  yazmam gerektiğini yazmayı unutmuşum:)  asp yi vb.net'e çeviremiyorum ya da çeviriyorum da vb.net kabul etmiyo.

  8. KısayolKısayol reportŞikayet pmÖzel Mesaj
    ertan
    ertan's avatar
    Kayıt Tarihi: 21/Temmuz/2005
    Erkek

    dim i

    for i = 1 to 100

    if checkbox1(i).value = true then

    label1 = "tümü işaretli"

    else

    label1 = "işaretsiz olanlar var..."

    end if

    next

     bi label oluştur ve checkboxların index özelliği olsun.. ve index 1 den 100 e kadar olacak.. eğer sıfırdan başlıyorsa for i = 0 to 99 şeklinde yapabilirsin


    Bundan sonra sadece insan olanlarla muhattap olacağım.. Ona göre karşıma gelin...
  9. KısayolKısayol reportŞikayet pmÖzel Mesaj
    AMoonRA
    AMoonRA's avatar
    Kayıt Tarihi: 07/Aralık/2007
    Erkek
    ertan bunu yazdı:
    -----------------------------

    dim i

    for i = 1 to 100

    if checkbox(i).value = true then

    label1 = "tümü işaretli"

    else

    label1 = "işaretsiz olanlar var..."

    end if

    next

    bi label oluştur ve checkboxların index özelliği olsun.. ve index 1 den 100 e kadar olacak.. eğer sıfırdan başlıyorsa for i = 0 to 99 şeklinde yapabilirsin


    -----------------------------

    index özelliği derken ???? 

  10. KısayolKısayol reportŞikayet pmÖzel Mesaj
    ertan
    ertan's avatar
    Kayıt Tarihi: 21/Temmuz/2005
    Erkek

    checkbox un propertieslerine bak.. orda index yazıyor.. bu özellik senin bazı kodları kolayca yazmanı sağlıyor.. şuan yaptığın gibi :) mesela tümünü işaretlemen gerekiyorsa index özelliği iyi olur.. iki örnek vereyim

    1- indexsiz olan

    checkbox1.value = true

    checkbox2.value = true

    checkbox3.value = true

    checkbox4.value = true

     checkbox5.value = true

    .....

    .....

    checkbox100.value = true

     gördüğün gibi yüz tane yazman gerek..

     

    2- index kullanırsan..

    dim i

    for i = 1 to 100

    checkbox1(i).value = true

    next

     

    bu şekilde daha kısa ve hızlı kod yazabilirsin.. yukarıda yanlış yazmışım sanırım

    if checkbox(i).value = true then

    bunun yerine

    if checkbox1(i).value = true then

    bunu yaz.. ayrıca indexli olacak checkbox1


    Bundan sonra sadece insan olanlarla muhattap olacağım.. Ona göre karşıma gelin...
  11. KısayolKısayol reportŞikayet pmÖzel Mesaj
    FOXXLY
    FOXXLY's avatar
    Kayıt Tarihi: 19/Haziran/2006
    Erkek
    AMoonRA bunu yazdı:
    -----------------------------
    FOXXLY bunu yazdı:
    -----------------------------

    for i = 1 to 100

    response.write "if checkbox'"&i&"'.checked = True"

    next

    bunu al , not defterinde asdasdasd.asp diye kaydet sonra bi hostta aç bunu . çıkan sonucu direk lazım olan yere yaz :D


    -----------------------------

     

    Konuyu açarken  kodları  vb.net 'te  yazmam gerektiğini yazmayı unutmuşum:)  asp yi vb.net'e çeviremiyorum ya da çeviriyorum da vb.net kabul etmiyo.


    -----------------------------
    al hocam senin için hepsini tek tek yazdım :C rep isterim :C

     

     

     

    if checkbox1.checked = True
    if checkbox2.checked = True
    if checkbox3.checked = True
    if checkbox4.checked = True
    if checkbox5.checked = True
    if checkbox6.checked = True
    if checkbox7.checked = True
    if checkbox8.checked = True
    if checkbox9.checked = True
    if checkbox10.checked = True
    if checkbox11.checked = True
    if checkbox12.checked = True
    if checkbox13.checked = True
    if checkbox14.checked = True
    if checkbox15.checked = True
    if checkbox16.checked = True
    if checkbox17.checked = True
    if checkbox18.checked = True
    if checkbox19.checked = True
    if checkbox20.checked = True
    if checkbox21.checked = True
    if checkbox22.checked = True
    if checkbox23.checked = True
    if checkbox24.checked = True
    if checkbox25.checked = True
    if checkbox26.checked = True
    if checkbox27.checked = True
    if checkbox28.checked = True
    if checkbox29.checked = True
    if checkbox30.checked = True
    if checkbox31.checked = True
    if checkbox32.checked = True
    if checkbox33.checked = True
    if checkbox34.checked = True
    if checkbox35.checked = True
    if checkbox36.checked = True
    if checkbox37.checked = True
    if checkbox38.checked = True
    if checkbox39.checked = True
    if checkbox40.checked = True
    if checkbox41.checked = True
    if checkbox42.checked = True
    if checkbox43.checked = True
    if checkbox44.checked = True
    if checkbox45.checked = True
    if checkbox46.checked = True
    if checkbox47.checked = True
    if checkbox48.checked = True
    if checkbox49.checked = True
    if checkbox50.checked = True
    if checkbox51.checked = True
    if checkbox52.checked = True
    if checkbox53.checked = True
    if checkbox54.checked = True
    if checkbox55.checked = True
    if checkbox56.checked = True
    if checkbox57.checked = True
    if checkbox58.checked = True
    if checkbox59.checked = True
    if checkbox60.checked = True
    if checkbox61.checked = True
    if checkbox62.checked = True
    if checkbox63.checked = True
    if checkbox64.checked = True
    if checkbox65.checked = True
    if checkbox66.checked = True
    if checkbox67.checked = True
    if checkbox68.checked = True
    if checkbox69.checked = True
    if checkbox70.checked = True
    if checkbox71.checked = True
    if checkbox72.checked = True
    if checkbox73.checked = True
    if checkbox74.checked = True
    if checkbox75.checked = True
    if checkbox76.checked = True
    if checkbox77.checked = True
    if checkbox78.checked = True
    if checkbox79.checked = True
    if checkbox80.checked = True
    if checkbox81.checked = True
    if checkbox82.checked = True
    if checkbox83.checked = True
    if checkbox84.checked = True
    if checkbox85.checked = True
    if checkbox86.checked = True
    if checkbox87.checked = True
    if checkbox88.checked = True
    if checkbox89.checked = True
    if checkbox90.checked = True
    if checkbox91.checked = True
    if checkbox92.checked = True
    if checkbox93.checked = True
    if checkbox94.checked = True
    if checkbox95.checked = True
    if checkbox96.checked = True
    if checkbox97.checked = True
    if checkbox98.checked = True
    if checkbox99.checked = True
    if checkbox100.checked = True
     


    kelimeler albayım bazı anlamlara gelmiyor.
Toplam Hit: 4783 Toplam Mesaj: 14