Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using form's property as opposed to Profile property
Message
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Using form's property as opposed to Profile property
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01318572
Message ID:
01318572
Vues:
53
Hi everybody,

Do you know the best way of accessing some form properties rather than Profile properties?

Here is what I have in the Form's .cs code
public partial class Coordinator_People_Registration_FC : System.Web.UI.Page
{
    public int SiteID
    {
        get { return Profile.SiteID ; }
        set { this.SiteID = value; }
    }
And this is in ASPX:
<asp:SqlDataSource ID="GradesDataSource" ConnectionString="<%$ ConnectionStrings:FCCMSConnectionString %>" 
SelectCommand="SELECT Grade FROM Grades WHERE SiteID=@SiteID"
                runat="server">
                <SelectParameters>
       <%--             <asp:ProfileParameter Name="SiteID" PropertyName="SiteID" />--%>
  <asp:FormParameter Name="SiteID" FormField="SiteID" Type = "Int32" />
                </SelectParameters>
            </asp:SqlDataSource>
However, using this FormField as a parameter doesn't seem to work. Using Profile parameter directly seems to work. The question is - would it be possible to use form's field instead? I'd like to be able to save reading Profile settings extra time.

Do you see my problem?

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