Précédent   Forum du club des développeurs et IT Pro > Dotnet > Développement Web avec .NET
Développement Web avec .NET Forum d'entraide sur les technologies Web de Microsoft (ASP.NET, MVC, Ajax, Silverlight, Services web, Azure, Sharepoint, etc.).
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse
 
Outils de la discussion
Publicité
'
Vieux 19/11/2012, 16h22   #1
Ahmed_Cherif
Invité régulier
 
Homme
Développeur informatique
Inscription : octobre 2012
Messages : 30
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France

Informations professionnelles :
Activité : Développeur informatique
Secteur : High Tech - Éditeur de logiciels

Informations forums :
Inscription : octobre 2012
Messages : 30
Points : 5
Points : 5
Par défaut passage variable de aspx.cs à aspx

Bonjour,

Ma page Hello.aspx.cs contient ce bout de code :

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 
(...)
public partial class ProcTSO : System.Web.UI.Page
    {
        int countItems = 0;
        static string file;
 
 
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                   file = "abc.xml"; 
            }
       }
    }
(...)
je veux faire appel à ma variable dans la page Hello.aspx
comme suit (la variable est en rouge):

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<dx:ASPxGridView ID="gvMapXML"  runat="server" KeyFieldName="Column"
            AutoGenerateColumns="true" OnRowCommand="gvMapXML_RowCommand" OnAfterPerformCallback="gvMapXML_AfterPerformCallback"
            EnableCallBacks="false" OnBeforePerformDataSelect="gvMapXML_BeforePerformDataSelect">
            <Columns>
                <dx:GridViewDataTextColumn FieldName="Column" Caption="Fichier mapping" SortIndex="0">
                </dx:GridViewDataTextColumn>


            </Columns>
            <Templates>
                <DetailRow>
                
                    <%using (TSO_SiteWeb.ServiceReference1.Service1Client wcf = new TSO_SiteWeb.ServiceReference1.Service1Client())
                      {%>
                   
                         <%= wcf.ReqWcf(file) %>
                     <% } %>
                </DetailRow>
            </Templates>
            <SettingsDetail ShowDetailRow="true" />
                    </dx:ASPxGridView>
Comment procéder.

Merci.
Ahmed_Cherif est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse
Outils de la discussion

Navigation rapide


Fuseau horaire GMT +2. Il est actuellement 13h56.


 
 
 
 
Partenaires

Hébergement Web