Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLDataSource parameter
Message
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
SQLDataSource parameter
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01335592
Message ID:
01335592
Vues:
49
Hi everybody,

I have a UserControl which uses SQLDataSource with SelectParameter being Profile parameter. Now I want to use the same UserControl in other situation where I do not have Profile, but I'm passing my parameter as a QueryString.

I was duplicating the same UserControl in two places with different syntax, but it turned out to be a problem in Deploy.

Here is what I have in ASCX for these two cases:
 <SelectParameters>
        <asp:ProfileParameter Name="SiteID" PropertyName="SiteID" Type="Int32" />
and
 <SelectParameters>
        <asp:QueryStringParameter DefaultValue="0" Name="SiteID" 
            QueryStringField="sid" Type="Int32" />
Is there some possibility to combine them and do somehow conditionally depending on have I passed QueryString or not? Preferably directly in ASCX?

Thanks a lot in advance.
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform