Server tags in DataSource

Is it possible to put some server tag in the session field to access the constant string ???

    <asp:EntityDataSource ID="EntityDataSourceProcesos" runat="server" ConnectionString="name=Entities"
    DefaultContainerName="Entities" EntitySetName="PROCESO" EntityTypeFilter="PROCESO"
    Select="it.[DE_PROC], it.[ID_PROC], it.[ST_PROC]" 
    Where="it.[ST_PROC] = 1 and it.[TMEMPR].[CO_EMPR] = @EmpresaID">        
    <WhereParameters>
        <asp:SessionParameter Name="EmpresaID" SessionField='<%= stringPublicVariable %>' Type="String" />
    </WhereParameters>
</asp:EntityDataSource>

      

+2


source to share


1 answer


Instead, you can add your parameter to the code behind:



EntityDataSourceProcesos.WhereParameters.Add(
    new SessionParameter("EmpresaID", TypeCode.String, stringPublicVariable));

      

0


source







All Articles