IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

ASP.NET Discussion :

Récupération valeur d'une liste de checkbox


Sujet :

ASP.NET

  1. #1
    Membre confirmé
    Profil pro
    Étudiant
    Inscrit en
    Juin 2007
    Messages
    84
    Détails du profil
    Informations personnelles :
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Juin 2007
    Messages : 84
    Par défaut Récupération valeur d'une liste de checkbox
    Bonjour,
    Je suis actuellement en train de développer une application web en asp avec le langage C#. Je m'occupe de la partie recherche d'un site web.
    Les pages en amont de la partie recherche ont été développé en html. Je souhaitais savoir comment récupérer les valeurs d'une liste de checkbox dans une variable C# pour pouvoir ensuite les exploiter afin d'interroger ma base de données.
    Je vous remercie d'avance pour vos réponses !

  2. #2
    Rédacteur
    Avatar de lutecefalco
    Profil pro
    zadzdzddzdzd
    Inscrit en
    Juillet 2005
    Messages
    5 052
    Détails du profil
    Informations personnelles :
    Âge : 45
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : zadzdzddzdzd

    Informations forums :
    Inscription : Juillet 2005
    Messages : 5 052
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
     
    foreach(var item in CheckBoxList1.Items)
    {
       if(item.Checked)
       {
           // to do
       }
    }

  3. #3
    Membre confirmé
    Profil pro
    Étudiant
    Inscrit en
    Juin 2007
    Messages
    84
    Détails du profil
    Informations personnelles :
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Juin 2007
    Messages : 84
    Par défaut
    Je ne sais pas si çà marche car ma liste de checkbox est déclaré en html.
    De plus, je souhaitais savoir comment mettre une action dans mon fichier html pour que lorsque je clique sur le bouton ok il m'envoie vers un fichier avec une extension .aspx
    Merci d'avance !

  4. #4
    Membre Expert
    Avatar de Pongten
    Homme Profil pro
    IT Analyst & Software Developer
    Inscrit en
    Juin 2002
    Messages
    1 173
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : IT Analyst & Software Developer
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Juin 2002
    Messages : 1 173
    Par défaut
    Si tu pars d'un pur fichier HTML, tu vas devoir regarder du côté de httpRequest pour récupérer les données POST...

  5. #5
    Membre confirmé
    Profil pro
    Étudiant
    Inscrit en
    Juin 2007
    Messages
    84
    Détails du profil
    Informations personnelles :
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Juin 2007
    Messages : 84
    Par défaut
    Je pars d'un fichier html pure en effet. Pourriez vous me donner un peu plus de détail sur httpRequest, est ce une classe disponible en C# ?

  6. #6
    Membre Expert
    Avatar de Pongten
    Homme Profil pro
    IT Analyst & Software Developer
    Inscrit en
    Juin 2002
    Messages
    1 173
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : IT Analyst & Software Developer
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Juin 2002
    Messages : 1 173
    Par défaut
    Comment se fait ta liaison ? La page HTML contient un form dont l'action est ta page ASPX ?

  7. #7
    Membre confirmé
    Profil pro
    Étudiant
    Inscrit en
    Juin 2007
    Messages
    84
    Détails du profil
    Informations personnelles :
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Juin 2007
    Messages : 84
    Par défaut
    Pour le moment je n'ai aucun lien car cette partie a été fait par une autre personne.
    Voici le fichier si cela peut vous aider
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Ville de Gatineau</title>
    <link href="http://www.ville.gatineau.qc.ca/style-gatineau-general.css" rel="stylesheet" type="text/css">
    <link rel="shortcut icon" type="image/x-icon" href="http://www.ville.gatineau.qc.ca/favicon.png" />
    <script type="text/javascript" src="js/motionpack.js"></script>
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }
     
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }
     
    function MM_nbGroup(event, grpName) { //v6.0
      var i,img,nbArr,args=MM_nbGroup.arguments;
      if (event == "init" && args.length > 2) {
        if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
          img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
          if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
          nbArr[nbArr.length] = img;
          for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
            if (!img.MM_up) img.MM_up = img.src;
            img.src = img.MM_dn = args[i+1];
            nbArr[nbArr.length] = img;
        } }
      } else if (event == "over") {
        document.MM_nbOver = nbArr = new Array();
        for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
          if (!img.MM_up) img.MM_up = img.src;
          img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
          nbArr[nbArr.length] = img;
        }
      } else if (event == "out" ) {
        for (i=0; i < document.MM_nbOver.length; i++) {
          img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
      } else if (event == "down") {
        nbArr = document[grpName];
        if (nbArr)
          for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
        document[grpName] = nbArr = new Array();
        for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
          if (!img.MM_up) img.MM_up = img.src;
          img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
          nbArr[nbArr.length] = img;
      } }
    }
     
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }
     
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
    //-->
    </script>
    </head>
    <BODY bgcolor="#FFFFFF">
        <table width="758" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000">
     
      <td height="98" valign="top"><table width="758" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="485"><a href="http://www.ville.gatineau.qc.ca/index.htm"><img src="http://www.ville.gatineau.qc.ca/images/1-logotop1.jpg" alt="Retour &agrave; la page d'accueil" width="485" height="29" border="0"></a></td>
            <td width="109"><a href="http://www.ville.gatineau.qc.ca/recherche.asp" onClick="MM_nbGroup('down','group1','Recherche','http://www.ville.gatineau.qc.ca/images/1-recherche2.jpg',1)" onMouseOver="MM_nbGroup('over','Recherche','http://www.ville.gatineau.qc.ca/images/1-recherche2.jpg','http://www.ville.gatineau.qc.ca/images/1-recherche2.jpg',1)" onMouseOut="MM_nbGroup('out')"><img src="http://www.ville.gatineau.qc.ca/images/1-recherche1.jpg" alt="" name="Recherche" width="109" height="29" border="0" onload=""></a></td>
            <td width="57"><a href="http://www.ville.gatineau.qc.ca/aide.htm" onClick="MM_nbGroup('down','group1','Aide','http://www.ville.gatineau.qc.ca/images/1-aide2.jpg',1)" onMouseOver="MM_nbGroup('over','Aide','http://www.ville.gatineau.qc.ca/images/1-aide2.jpg','http://www.ville.gatineau.qc.ca/images/1-aide2.jpg',1)" onMouseOut="MM_nbGroup('out')"><img src="http://www.ville.gatineau.qc.ca/images/1-aide1.jpg" alt="" name="Aide" width="57" height="29" border="0" onload=""></a></td>
            <td width="107"><a href="http://www.ville.gatineau.qc.ca/joindre.htm" onClick="MM_nbGroup('down','group1','Joindre','http://www.ville.gatineau.qc.ca/images/1-joindre2.jpg',1)" onMouseOver="MM_nbGroup('over','Joindre','http://www.ville.gatineau.qc.ca/images/1-joindre2.jpg','http://www.ville.gatineau.qc.ca/images/1-joindre2.jpg',1)" onMouseOut="MM_nbGroup('out')"><img src="http://www.ville.gatineau.qc.ca/images/1-joindre1.jpg" alt="" name="Joindre" width="107" height="29" border="0" onload=""></a></td>
          </tr>
        </table>
        <table width="758" border="0" cellpadding="0" cellspacing="0" bgcolor="8CB3DD">
          <tr>
            <td width="252" height="33" valign="top"><a href="http://www.ville.gatineau.qc.ca/index.htm"><img src="http://www.ville.gatineau.qc.ca/images/1-logotop2.jpg" alt="Retour &agrave; la page d'accueil" width="266" height="33" border="0"></a></td>
            <td width="450" valign="top" background="http://www.ville.gatineau.qc.ca/images/1-boutons.jpg" bgcolor="1F63A7"><script type='text/javascript' src='http://www.ville.gatineau.qc.ca/nwrmenu_var.js'></script>
              <script type='text/javascript' src='http://www.ville.gatineau.qc.ca/menu_com.js'></script></td>
            <td width="56" align="right"><a href="http://www.ville.gatineau.qc.ca/gatineau/english/index.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('English','','http://www.ville.gatineau.qc.ca/images/1-english2.jpg',1)"><img src="http://www.ville.gatineau.qc.ca/images/1-english1.jpg" name="English" width="56" height="33" border="0"></a></td>
          </tr>
        </table>
        <table width="758" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td valign="top" bgcolor="#FFFFFF"><table width="758" height="152" border="0" cellpadding="0" cellspacing="15">
              <tr bgcolor="#FFFFFF">
                <td colspan="2"><table width="710" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
    <td colspan="3"><a href="index.htm"><img src="img/conteneur_haut.jpg" width="710" height="120" border="0"></a></td>
    </tr>
    <tr>
    <td width="15" rowspan="2" valign="top" style="background: url(img/conteneur_gauche.gif) repeat-y;"><img src="img/conteneur_gauche.gif" width="15" height="15"></td>
    <td>&nbsp;</td>
    <td width="15" rowspan="2" align="right" valign="top" style="background: url(img/conteneur_droite.gif) repeat-y right;"><img src="img/conteneur_droite.gif" width="15" height="15"></td>
    </tr>
    <tr>
    <td width="680"><table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="250" valign="top" style="background: url(img/navbar_bg.gif) no-repeat bottom center;">
     
    <div style="background: url(img/icon_arrow.gif) no-repeat left 2px; padding-left: 20px; margin-bottom: 8px;"><a href="consommer.htm"><strong>Consommer</strong></a></div>
    <div style="background: url(img/icon_arrow.gif) no-repeat left 2px; padding-left: 20px; margin-bottom: 8px;"><a href="se_departir.htm">Se d&eacute;partir </a></div>
    <div style="background: url(img/icon_arrow.gif) no-repeat left 2px; padding-left: 20px; margin-bottom: 8px;"><a href="3rv.htm">Qu'est ce que les 3RV? </a></div>
    <div style="background: url(img/icon_arrow.gif) no-repeat left 2px; padding-left: 20px; margin-bottom: 8px;"><a href="consommer_autrement.htm">Consommer autrement </a></div>
    <div style="background: url(img/icon_arrow.gif) no-repeat left 2px; padding-left: 20px; margin-bottom: 8px;"><a href="jardins_communautaires.htm">Jardins communautaires </a></div>
    <div style="background: url(img/icon_arrow.gif) no-repeat left 2px; padding-left: 20px; margin-bottom: 8px;"><a href="efficacite_energetique.htm">Efficacit&eacute; &eacute;nerg&eacute;tique </a></div>
    <div style="background: url(img/icon_arrow.gif) no-repeat left 2px; padding-left: 20px; margin-bottom: 8px;"><a href="renovation.htm">R&eacute;novation</a></div>
    <div style="background: url(img/icon_arrow.gif) no-repeat left 2px; padding-left: 20px; margin-bottom: 8px;"><a href="transport.htm">Transport</a></div>
    <div style="background: url(img/icon_arrow.gif) no-repeat left 2px; padding-left: 20px; margin-bottom: 8px;"><a href="liens.htm">Liens</a></div>
     
    </td>
    <td valign="top"><table width="430" height="25" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td height="25" background="img/section_titre_fond.gif" style="font: bold 14px Trebuchet MS, Arial; color: #28730e; page-break-before: always;">&nbsp;&nbsp;&nbsp;Consommer</td>
    </tr>
    </table>
    <h1 align="justify"><a href="#" onClick="toggleSlide('div0'); slideup('div1'); slideup('div2'); slideup('div3');" style="font: bold 14pt Arial;"><img src="img/consommer_alimentation.jpg" alt="" width="48" height="48" border="0" style="vertical-align: middle; margin-right: 6px;" />Alimentation</a></h1>
    <div style="display: block; overflow: hidden;" id="div0">
    <table border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td><input type="checkbox" name="Consommer" value="Producteurs locaux"></td>
    <td>Producteurs locaux</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="Producteurs biologiques"></td>
    <td>Producteurs biologiques</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="D&eacute;taillants ou fabricants de produits biologiques"></td>
    <td>D&eacute;taillants ou fabricants de produits biologiques</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="D&eacute;taillants ou fabricants de produits &eacute;quitables"></td>
    <td>D&eacute;taillants ou fabricants de produits &eacute;quitables</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="D&eacute;taillants ou fabricants de produits r&eacute;gionaux"></td>
    <td>D&eacute;taillants ou fabricants de produits r&eacute;gionaux</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="Restaurants ou traiteurs offrant des produits biologiques ou &eacute;quitables"></td>
    <td>Restaurants ou traiteurs offrant des produits  biologiques ou &eacute;quitables</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="Restaurants mettant en vedette des produits r&eacute;gionaux"></td>
    <td>Restaurants mettant en vedette des produits r&eacute;gionaux</td>
    </tr>
    </table>
    </div>
    <h1 align="justify"><a href="#" onClick="toggleSlide('div1'); slideup('div0'); slideup('div2'); slideup('div3');" style="font: bold 14pt Arial;"><img src="img/consommer_biens_usages_recuperes.jpg" alt="" width="48" height="48" border="0" style="vertical-align: middle; margin-right: 6px;" />Biens usagers ou r&eacute;cup&eacute;r&eacute;s</a></h1>
    <div style="display: block; overflow: hidden;" id="div1">
    <table border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td><input type="checkbox" name="Consommer" value="V&ecirc;tements et accessoires de mode"></td>
    <td>V&ecirc;tements et accessoires de mode</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="Meubles"></td>
    <td>Meubles</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="Petits appareils &eacute;lectrom&eacute;nagers"></td>
    <td>Petits appareils &eacute;lectrom&eacute;nagers</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="Gros appareils &eacute;lectrom&eacute;nagers"></td>
    <td>Gros appareils &eacute;lectrom&eacute;nagers</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="Jouets"></td>
    <td>Jouets</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="Livres, films, musique, instruments de musique"></td>
    <td>Livres, films, musique, instruments de musique</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="Articles de sport"></td>
    <td>Articles de sport</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="Articles pour b&eacute;b&eacute;s"></td>
    <td>Articles pour b&eacute;b&eacute;s</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="Articles de maison, cuisine, d&eacute;coration"></td>
    <td>Articles de maison,  cuisine, d&eacute;coration</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="Mat&eacute;riel informatique"></td>
    <td>Mat&eacute;riel informatique</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="Mat&eacute;riel &eacute;lectronique domestique"></td>
    <td>Mat&eacute;riel &eacute;lectronique domestique</td>
    </tr>
    </table>
    </div>
    <h1 align="justify"><a href="#" onClick="toggleSlide('div2'); slideup('div0'); slideup('div1'); slideup('div3');" style="font: bold 14pt Arial;"><img src="img/consommer_autres_produits_ecologiques.jpg" alt="" width="48" height="48" border="0" style="vertical-align: middle; margin-right: 6px;" />Autres produits &eacute;cologiques</a></h1>
    <div style="display: block; overflow: hidden;" id="div2">
    <table border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td><input type="checkbox" name="Consommer" value="Produits d'entretien m&eacute;nager"></td>
    <td>Produits d'entretien m&eacute;nager</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="Produits de soins corporels"></td>
    <td>Produits de soins corporels</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="Produits d'hygi&egrave;ne f&eacute;minine"></td>
    <td>Produits d'hygi&egrave;ne f&eacute;minine</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="Couches r&eacute;utilisables"></td>
    <td>Couches r&eacute;utilisables</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="Vaisselle compostable"></td>
    <td>Vaisselle compostable</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="Artisanat, v&ecirc;tements, accessoires &eacute;cologiques"></td>
    <td>Artisanat, v&ecirc;tements, accessoires &eacute;cologiques</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="Composteurs"></td>
    <td>Composteurs</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="Barils de r&eacute;cup&eacute;ration d'eau de pluie"></td>
    <td>Barils de r&eacute;cup&eacute;ration d'eau de pluie</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="Produits pour animaux"></td>
    <td>Produits pour animaux</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="Lave-auto"></td>
    <td>Lave-auto</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="Nourriture biologique pour animaux"></td>
    <td>Nourriture biologique pour animaux</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="Produits de toilettage &eacute;cologiques pour animaux"></td>
    <td>Produits de toilettage &eacute;cologiques pour animaux</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="Liti&egrave;res &eacute;cologiques pour animaux"></td>
    <td>Liti&egrave;res &eacute;cologiques pour animaux</td>
    </tr>
    </table>
    </div>
    <h1 align="justify"><a href="#" onClick="toggleSlide('div3'); slideup('div0'); slideup('div1'); slideup('div2');" style="font: bold 14pt Arial;"><img src="img/consommer_reparation.jpg" alt="" width="48" height="48" border="0" style="vertical-align: middle; margin-right: 6px;" />R&eacute;paration</a></h1>
    <div style="display: block; overflow: hidden;" id="div3">
    <table border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td><input type="checkbox" name="Consommer" value="Cordonniers"></td>
    <td>Cordonniers</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="Meubles"></td>
    <td>Meubles</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="R&eacute;paration d'appareils &eacute;lectroniques"></td>
    <td>R&eacute;paration d'appareils &eacute;lectroniques</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="Consommer" value="R&eacute;paration d'instruments de cuisine"></td>
    <td>R&eacute;paration d'instruments de cuisine</td>
    </tr>
    </table>
    </div>
    <p>&nbsp;</p>
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td width="50%" align="center"><a href="javascript:history.back(1);"><img src="img/bouton_retour.jpg" width="200" height="40" border="0" onMouseOver="this.src = 'img/bouton_retour_1.jpg';" onMouseOut="this.src = 'img/bouton_retour.jpg';" /></a><a href="index.htm"></a></td>
    <td width="50%" align="center"><a href="resultats_recherche.htm"><img src="img/bouton_rechercher.jpg" width="200" height="40" border="0" onMouseOver="this.src = 'img/bouton_rechercher_1.jpg';" onMouseOut="this.src = 'img/bouton_rechercher.jpg';" /></a></td>
    </tr>
    </table>
    <script type="text/javascript">
    <!--
    document.getElementById("div0").style.display = "none";
    document.getElementById("div1").style.display = "none";
    document.getElementById("div2").style.display = "none";
    document.getElementById("div3").style.display = "none";
    //-->
    </script></td>
    </tr>
    </table>
    <br>
    <p align="right"><a href="#top" style="font: 9px Verdana; color: #333333; text-decoration: none;"><img src="img/retour_haut_page.gif" width="15" height="14" border="0" align="absmiddle">Haut de la page</a></p></td>
    </tr>
     
    <tr>
    <td width="15" valign="bottom"><img src="img/conteneur_bas_gauche.gif" width="15" height="15"></td>
    <td width="680" valign="bottom" style="background: url(img/conteneur_bas.gif) repeat-x;"><img src="img/conteneur_bas.gif" width="15" height="15"></td>
    <td width="15" align="right" valign="bottom"><img src="img/conteneur_bas_droite.gif" width="15" height="15"></td>
    </tr>
    </table>
    </td></tr>
            </table></td>
          </tr>
        </table>
      <tr>
        <td><table width="758" cellpadding="0" cellspacing="3" bordercolor="#000000" bgcolor="709FDB">
          <tr>
            <td bgcolor="709FDB"><FONT face="Arial, Helvetica, sans-serif" size=-2>&nbsp;&nbsp;&nbsp;<a href="/avis_juridique.htm" style="font: bold 10px Arial; color: #000000; text-decoration: none;">&copy; Ville de Gatineau. Tous droits r&eacute;serv&eacute;s.</a></FONT></td>
            <td align="center" bgcolor="709FDB"><a href="/webmestre.asp"><img src="http://www.gatineau.ca/images/pied-de-page_courriel_webmestre.gif" alt="" width="180" height="9" border="0" /></a></td>
            <td align="right" bgcolor="709FDB"><FONT face="Arial, Helvetica, sans-serif" size=-2><strong>Derni&egrave;re modification :</strong> <script type="text/javascript">
    <!--
    document.write(document.lastModified);
    -->
    </script>&nbsp;&nbsp;&nbsp;</FONT></td>
        </tr>
        </table></td>
      </tr>
    </table>
    	<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
    </script>
    	<script type="text/javascript">
    _uacct = "UA-486079-1";
    urchinTracker();
    </script>
    </body>
    </html>
    Le code est très long je m'en excuse d'avance car il y a du javascript.

  8. #8
    Membre Expert
    Avatar de Pongten
    Homme Profil pro
    IT Analyst & Software Developer
    Inscrit en
    Juin 2002
    Messages
    1 173
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : IT Analyst & Software Developer
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Juin 2002
    Messages : 1 173
    Par défaut
    Le problème est que si la page source ne fait pas un post vers votre page, vous ne saurez pas en récupérer les données de POST...

  9. #9
    Membre confirmé
    Profil pro
    Étudiant
    Inscrit en
    Juin 2007
    Messages
    84
    Détails du profil
    Informations personnelles :
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Juin 2007
    Messages : 84
    Par défaut
    C'est bien ce qu'il me semblait
    est qu'il est possible d'ajouter dans ce fichier un bout de code ressemblant à

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    <form method=post action=recherche.aspx />

  10. #10
    Membre Expert
    Avatar de Pongten
    Homme Profil pro
    IT Analyst & Software Developer
    Inscrit en
    Juin 2002
    Messages
    1 173
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : IT Analyst & Software Developer
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Juin 2002
    Messages : 1 173
    Par défaut
    Si tu peux interagir sur la source, oui...

Discussions similaires

  1. recuperer la valeur d'une liste de checkbox?
    Par john85 dans le forum ASP.NET MVC
    Réponses: 1
    Dernier message: 10/08/2011, 13h56
  2. Réponses: 7
    Dernier message: 19/05/2007, 11h33
  3. Réponses: 4
    Dernier message: 09/05/2007, 23h39
  4. [PHP-JS] Récupération valeur d'une liste déroulante
    Par vandeyy dans le forum Langage
    Réponses: 12
    Dernier message: 29/01/2007, 16h03
  5. [SQL] Problème de récupération des valeurs d'une liste multiple en php
    Par BOLARD dans le forum PHP & Base de données
    Réponses: 1
    Dernier message: 01/05/2006, 00h29

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo