voila le code que j'utilise pour effectuer ma recherche le code vb et celui de asp net:
<form id="form1" runat="server">
<div style="height: 54px">
<asp:Image ID="Image1" runat="server" Height="51px" ImageUrl="image/Titre.bmp"
Width="1275px" />
</div>
<div style="width: 187px; float: right; height: 201px;">
<br />
<asp:LinkButton ID="LkbNouvelEnreg" runat="server" Font-Bold="True"
Font-Names="Cambria" Font-Underline="True" ForeColor="Black">Nouveau</asp:LinkButton>
<br />
<asp:LinkButton ID="LkbRecherche" runat="server" Font-Bold="True"
Font-Names="Cambria" Font-Underline="True" ForeColor="Black">Recherche</asp:LinkButton>
<br />
<asp:LinkButton ID="LkbSuppression" runat="server" Font-Bold="True"
Font-Names="Cambria" Font-Underline="True" ForeColor="Black">Suppression</asp:LinkButton>
</div>
<div style="width: 263px; float: left; height: 203px; padding-top: 35; padding-left: 35;">
<asp:Label ID="Pseudo" runat="server" Text="Recherche" Width="84px"></asp:Label>
<asp:DropDownList ID="RechercheAbonne" runat="server" AppendDataBoundItems="True"
AutoPostBack="True" CausesValidation="True" Height="20px"
Width="126px" ></asp:DropDownList> 
<asp:Button ID="ButRecherche" runat="server" Text="OK" onClick="ButRecherche_Click"/>
<br />
<br />
<p><asp:Image ID="Image2" runat="server" Height="106px"
ImageUrl="image/banner_0_2.jpg" Width="165px" /><b>24H/24 disponible pour repondre à vos besoin.</b></p>
</div>
<div style="margin: 760 356; width: 824px; height: 477px; border-style: none none none none; float: left;">
<asp:Panel ID="Panel1" runat="server" BackColor="#FFFF99" Height="475px">
</asp:Panel>
</div>
</form>
et celui vb net
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim connStr As String = ConfigurationManager.ConnectionStrings("solverConnectString").ConnectionString
Dim con As New SqlConnection(connStr)
con.Open()
Dim command = New SqlCommand("remplirComboPseudo", con)
command.CommandType = CommandType.StoredProcedure
command.ExecuteNonQuery()
Dim dt As DataTable
Dim dsPseudo As New SqlDataAdapter(command)
Dim dtPseudo As New DataSet
dsPseudo.Fill(dtPseudo, "ABONNE")
dt = dtPseudo.Tables("ABONNE")
Me.RechercheAbonne.DataSource = dt
Me.RechercheAbonne.DataTextField = "PSEUDO"
Me.RechercheAbonne.DataValueField = "PSEUDO"
Me.RechercheAbonne.DataBind()
dt.Clear()
con.Close()
End Sub
Protected Sub ButRecherche_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ButRecherche.Click
Dim connStr As String = ConfigurationManager.ConnectionStrings("solverConnectString").ConnectionString
Dim con As New SqlConnection(connStr)
con.Open()
Dim command = New SqlCommand("AffichageRecherche", con)
command.CommandType = CommandType.StoredProcedure
Dim myreader As SqlDataReader = Nothing
Dim parameterPseudo = New SqlParameter("@pseudo", SqlDbType.Char, 15)
parameterPseudo.Value = Me.RechercheAbonne.Text
command.Parameters.Add(parameterPseudo)
command.ExecuteNonQuery()
myreader = command.ExecuteReader
If myreader.HasRows Then
While myreader.Read
Session("Nom") = myreader.GetString(0)
Session("Prenom") = myreader.GetString(1)
Session("Pseudo1") = myreader.GetString(2)
Session("Pseudo2") = myreader.GetString(3)
Session("Annee") = myreader.GetValue(4)
Session("Mail") = myreader.GetString(5)
End While
End If
con.Close()
Response.Redirect("~/modification.aspx")
End Sub
la recherche marche bien mais le problème ce situe au niveau de la modification une fois effectuée au click la page recharge les résultats de la recherche et ne prend pas en compte la modification voici un peu comment je fais ma modification:
<div style="border-top-style: inherit; border-bottom-style: inherit; border-left-style: inherit; border-right-style: inherit; padding: 25; border-style: none none none none; width: 464px; margin-left: 395px; margin-bottom: 30; margin-right: 372px; margin-top: 30; border-top-width: inherit; float: none; height: 487px;">
<asp:Panel ID="Panel1" runat="server" Height="486px">
<h1 style="margin-left: 20"> MODIFICATION ABONNE</h1>
 <br />
 <br />
<asp:Label ID="Label1" runat="server" Text="Nom : " Width="150px"></asp:Label>
<asp:TextBox ID="txtNom" runat="server" Text="Admin" Width="150px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="txtNom" ErrorMessage="Le champ nom doit être différent de Admin"
SetFocusOnError="True" InitialValue="Admin">*</asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
ControlToValidate="txtNom" ErrorMessage="Le champ nom est requis"
SetFocusOnError="True">*</asp:RequiredFieldValidator><br \><br \>
<asp:Label ID="label2" runat="server" Text="Prénom : " Width="150px"></asp:Label>
<asp:TextBox ID="txtPrenom" runat="server" Width="150px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ErrorMessage="Le champ prénom est requis" ControlToValidate="txtPrenom"
SetFocusOnError="True">*</asp:RequiredFieldValidator><br \>
<br />
<asp:Label ID="Label5" runat="server" Text="Année de naissance" Width="150px"></asp:Label>
<asp:TextBox ID="txtAnnee" runat="server" Width="150px"></asp:TextBox>
<asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="txtAnnee"
ErrorMessage="L'année de naissance est incorrecte" MaximumValue="1988" MinimumValue="1900"
Type="Integer">*</asp:RangeValidator>
<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txtAnnee"
ErrorMessage="L'année de naissance est obligatoire">*</asp:RequiredFieldValidator><br />
<br />
<asp:Label ID="Label6" runat="server" Text="Adresse mail" Width="150px"></asp:Label>
<asp:TextBox ID="txtMail" runat="server" Width="150px"></asp:TextBox>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtMail"
ErrorMessage="Le mail est invalide" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
<br />
<br />
<asp:Label ID="Label8" runat="server" Font-Italic="True" ForeColor="Navy" Text="Exemple de CustomValidator :"
Width="281px"></asp:Label><br />
<asp:Label ID="Label7" runat="server" Text="Entrez un nombre pair :" Width="150px"></asp:Label>
<asp:TextBox ID="txtPair" runat="server"></asp:TextBox>
<asp:CustomValidator ID="CustomValidator2" runat="server"
ControlToValidate="txtPair" OnServerValidate="ValidationPair" ErrorMessage="Le nombre n'est pas pair !" ClientValidationFunction="ValidationPair">*</asp:CustomValidator>
<br />
<br \>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="true" Height="67px" Width="344px" />
<br />
<br />
<asp:Button ID="btnValider" runat="server" Text="Valider" OnClick="btnValider_Click" />
<script type="text/javascript">
function ValidationPair(source, arguments)
{
if (arguments.Value%2 == 0)
arguments.IsValid = true;
else
arguments.IsValid = false;
}
</script>
<asp:Label ID="lblValidation" runat="server" Text="En cours de validation !"></asp:Label>
</asp:Panel>
</div>
puis le code vb net
Dim nom As String
Dim prenom As String
Dim an As Integer
Dim mail As String
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim connStr As String = ConfigurationManager.ConnectionStrings("solverConnectString").ConnectionString
Dim con As New SqlConnection(connStr)
con.Open()
nom = Session("Nom")
prenom = Session("Prenom")
'Session("Pseudo1")
'Session("Pseudo2")
an = Session("Annee")
mail = Session("Mail")
con.Close()
Me.txtNom.Text = nom
Me.txtPrenom.Text = prenom
Me.txtAnnee.Text = an
Me.txtMail.Text = mail
End Sub
Protected Sub btnValider_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnValider.Click
Try
Dim connStr As String = ConfigurationManager.ConnectionStrings("solverConnectString").ConnectionString
Dim con As New SqlConnection(connStr)
con.Open()
Dim command = New SqlCommand("modificationAbonne", con)
command.CommandType = CommandType.StoredProcedure
Dim parametreNom As New SqlParameter("@nom", SqlDbType.VarChar, 15)
parametreNom.Value = UCase(Me.txtNom.Text)
command.Parameters.Add(parametreNom)
Dim parametrePrenom As New SqlParameter("@prenom", SqlDbType.VarChar, 25)
parametrePrenom.Value = UCase(Me.txtPrenom.Text)
command.Parameters.Add(parametrePrenom)
'Dim parametrePseudo As New SqlParameter("@pseudo", SqlDbType.Char, 10)
'parametrePseudo.Value = Me.txtPseudo1.Text
'command.Parameters.Add(parametrePseudo)
'Dim parametreVerifPseudo As New SqlParameter("@verifpseudo", SqlDbType.Char, 10)
'parametreVerifPseudo.Value = Me.txtPseudo2.Text
'command.Parameters.Add(parametreVerifPseudo)
Dim parametreAnn As New SqlParameter("@annee", SqlDbType.BigInt)
parametreAnn.Value = Me.txtAnnee.Text
command.Parameters.Add(parametreAnn)
Dim parametreAdres As New SqlParameter("@dresmail", SqlDbType.VarChar, 50)
parametreAdres.Value = Me.txtNom.Text
command.Parameters.Add(parametreAdres)
command.ExecuteNonQuery()
con.Close()
Catch
End Try
End Sub
Protected Sub ValidationPair(ByVal sender As Object, ByVal value As ServerValidateEventArgs)
Try
Dim nbre As Int32 = Int32.Parse(value.Value)
If nbre Mod 2 = 0 Then
value.IsValid = True
Else
value.IsValid = False
End If
Catch ex As Exception
' ne rien faire
End Try
End Sub
aidé moi s'il vous plaît
