Projet pour une débutante.
laamamel
Messages postés
163
Date d'inscription
Statut
Membre
Dernière intervention
-
laamamel Messages postés 163 Date d'inscription Statut Membre Dernière intervention -
laamamel Messages postés 163 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
svp; Comment fait-on pour afficher une cellule d'une ligne récupérée d'un datagrid dans une autre webform ou il y 'a des textes box
j'utilise l'asp .net et VB 2010
-----------------------------voici ma page:-------------------------------------------------------------
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm_recherche.aspx.vb" Inherits="WebApplication_art24_25.WebForm_recherche" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.style1
{
font-size: large;
text-align: right;
}
</style>
</head>
<body>
<form id="form2" runat="server">
<div class="style1">
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<asp:Label ID="Label1" runat="server" style="text-align: center"
Text=" ?wilaya "></asp:Label>
<asp:TextBox ID="TextBox1" runat="server" BackColor="#003300"
BorderColor="Lime" style="background-color: #99FFCC"></asp:TextBox>
<asp:Label ID="Label2" runat="server" Text="numero dossier:"></asp:Label>
<br />
<asp:DropDownList ID="DropDownList1" runat="server"
DataSourceID="AccessDataSource_art">
<asp:ListItem></asp:ListItem>
<asp:ListItem>code national</asp:ListItem>
<asp:ListItem>numero dossier interne</asp:ListItem>
<asp:ListItem>numero dossier externe</asp:ListItem>
<asp:ListItem>?nom</asp:ListItem>
</asp:DropDownList>
<asp:Button ID="Recherche" runat="server" BorderColor="#CCFFFF" Height="27px"
style="text-align: center" Text="recherche " />
:</div>
<p>
<asp:GridView ID="GridView_recherche" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" CellPadding="4"
DataKeyNames="Codn,n_dos" DataSourceID="AccessDataSource_art"
ForeColor="#333333" GridLines="None" Height="274px" EnableTheming="True">
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:CommandField SelectText="select" ShowSelectButton="True"
ShowCancelButton="False" />
<asp:BoundField DataField="Codn" HeaderText="code national" ReadOnly="True"
SortExpression="Codn" />
<asp:BoundField DataField="nom" HeaderText="nom" SortExpression="nom" />
<asp:BoundField DataField="prenom" HeaderText="prenom" SortExpression="prenom" />
<asp:BoundField DataField="date_nai" HeaderText="date naissance"
SortExpression="date_nai" />
<asp:BoundField DataField="lieu_nai" HeaderText="lieu de naissance"
SortExpression="lieu_nai" />
</Columns>
<EditRowStyle BackColor="#7C6F57" />
<FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#E3EAEB" />
<SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#F8FAFA" />
<SortedAscendingHeaderStyle BackColor="#3333CC" />
<SortedDescendingCellStyle BackColor="#D4DFE1" />
<SortedDescendingHeaderStyle BackColor="#15524A" />
</asp:GridView>
<asp:AccessDataSource ID="AccessDataSource_art" runat="server"
DataFile="~/App_Data/art24-25.accdb"
SelectCommand="SELECT Codn, n_dos, N_BORD, nom, prenom, date_nai, lieu_nai, adresse, N_DOSSM, codwil FROM art24 WHERE (n_dos = ?) AND (codwil = ?)">
<SelectParameters>
<asp:ControlParameter ControlID="TextBox1" Name="n_dos" PropertyName="Text"
Type="Decimal" />
<asp:ControlParameter ControlID="TextBox2" Name="codwil" PropertyName="Text" />
</SelectParameters>
</asp:AccessDataSource>
</p>
</form>
</body>
</html>
-------------------- page vb----------------------------------------------------------------
Imports System.Data.SqlClient
Imports System.Drawing
Public Class WebForm_recherche
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Protected Sub Recherche_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Recherche.Click
End Sub
Private Sub connection()
Dim conn As New SqlDataSource
End Sub
Public Sub Affichage_DataGrid()
End Sub
Protected Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles TextBox1.TextChanged
End Sub
Private Function n_dos() As Object
Throw New NotImplementedException
End Function
Private Sub x(ByVal p1 As Object)
Throw New NotImplementedException
End Sub
Protected Sub GridView_recherche_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
End Sub
Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles DropDownList1.SelectedIndexChanged
End Sub
End Class
---------------------------------------détaille---------------------
je veux faire un lien de gridview à une autre webform càd
en sélectionnant le lien de gridview d'une ligne me donne une autre webform qui détaille ces informations
merci et bon courage
sérieusement je veux de l'aide car je suis débutante en vb et un projet dans des délais proches
merci d'avoir prendre ma problème au sérieux
svp; Comment fait-on pour afficher une cellule d'une ligne récupérée d'un datagrid dans une autre webform ou il y 'a des textes box
j'utilise l'asp .net et VB 2010
-----------------------------voici ma page:-------------------------------------------------------------
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm_recherche.aspx.vb" Inherits="WebApplication_art24_25.WebForm_recherche" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.style1
{
font-size: large;
text-align: right;
}
</style>
</head>
<body>
<form id="form2" runat="server">
<div class="style1">
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<asp:Label ID="Label1" runat="server" style="text-align: center"
Text=" ?wilaya "></asp:Label>
<asp:TextBox ID="TextBox1" runat="server" BackColor="#003300"
BorderColor="Lime" style="background-color: #99FFCC"></asp:TextBox>
<asp:Label ID="Label2" runat="server" Text="numero dossier:"></asp:Label>
<br />
<asp:DropDownList ID="DropDownList1" runat="server"
DataSourceID="AccessDataSource_art">
<asp:ListItem></asp:ListItem>
<asp:ListItem>code national</asp:ListItem>
<asp:ListItem>numero dossier interne</asp:ListItem>
<asp:ListItem>numero dossier externe</asp:ListItem>
<asp:ListItem>?nom</asp:ListItem>
</asp:DropDownList>
<asp:Button ID="Recherche" runat="server" BorderColor="#CCFFFF" Height="27px"
style="text-align: center" Text="recherche " />
:</div>
<p>
<asp:GridView ID="GridView_recherche" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" CellPadding="4"
DataKeyNames="Codn,n_dos" DataSourceID="AccessDataSource_art"
ForeColor="#333333" GridLines="None" Height="274px" EnableTheming="True">
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:CommandField SelectText="select" ShowSelectButton="True"
ShowCancelButton="False" />
<asp:BoundField DataField="Codn" HeaderText="code national" ReadOnly="True"
SortExpression="Codn" />
<asp:BoundField DataField="nom" HeaderText="nom" SortExpression="nom" />
<asp:BoundField DataField="prenom" HeaderText="prenom" SortExpression="prenom" />
<asp:BoundField DataField="date_nai" HeaderText="date naissance"
SortExpression="date_nai" />
<asp:BoundField DataField="lieu_nai" HeaderText="lieu de naissance"
SortExpression="lieu_nai" />
</Columns>
<EditRowStyle BackColor="#7C6F57" />
<FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#E3EAEB" />
<SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#F8FAFA" />
<SortedAscendingHeaderStyle BackColor="#3333CC" />
<SortedDescendingCellStyle BackColor="#D4DFE1" />
<SortedDescendingHeaderStyle BackColor="#15524A" />
</asp:GridView>
<asp:AccessDataSource ID="AccessDataSource_art" runat="server"
DataFile="~/App_Data/art24-25.accdb"
SelectCommand="SELECT Codn, n_dos, N_BORD, nom, prenom, date_nai, lieu_nai, adresse, N_DOSSM, codwil FROM art24 WHERE (n_dos = ?) AND (codwil = ?)">
<SelectParameters>
<asp:ControlParameter ControlID="TextBox1" Name="n_dos" PropertyName="Text"
Type="Decimal" />
<asp:ControlParameter ControlID="TextBox2" Name="codwil" PropertyName="Text" />
</SelectParameters>
</asp:AccessDataSource>
</p>
</form>
</body>
</html>
-------------------- page vb----------------------------------------------------------------
Imports System.Data.SqlClient
Imports System.Drawing
Public Class WebForm_recherche
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Protected Sub Recherche_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Recherche.Click
End Sub
Private Sub connection()
Dim conn As New SqlDataSource
End Sub
Public Sub Affichage_DataGrid()
End Sub
Protected Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles TextBox1.TextChanged
End Sub
Private Function n_dos() As Object
Throw New NotImplementedException
End Function
Private Sub x(ByVal p1 As Object)
Throw New NotImplementedException
End Sub
Protected Sub GridView_recherche_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
End Sub
Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles DropDownList1.SelectedIndexChanged
End Sub
End Class
---------------------------------------détaille---------------------
je veux faire un lien de gridview à une autre webform càd
en sélectionnant le lien de gridview d'une ligne me donne une autre webform qui détaille ces informations
merci et bon courage
sérieusement je veux de l'aide car je suis débutante en vb et un projet dans des délais proches
merci d'avoir prendre ma problème au sérieux
A voir également:
- Projet pour une débutante.
- Filigrane projet - Guide
- Gant projet - Télécharger - Gestion de projets
- Logiciel de programmation pour débutant - Guide
- Musique projet x ✓ - Forum Musique / Radio / Clip
- Comment projeter une image sur un mur - Forum TV & Vidéo