Calling a Decrypt function within a class from a Data Binding expr

Discussion in 'ASP .Net Security' started by kfrost, Dec 16, 2005.

  1. kfrost

    kfrost Guest

    Hello,

    (First off this in a hosted environment which I can export a key generated
    by aspnet_regiis so I'm resorting to this.)

    I have a class named crypto which contains a function called Decrypt. My
    code before I encrypted my connectionString was as follows:

    <asp:SqlDataSource ID="SqlDataSourceSQLB1" runat="server"
    ConnectionString="<%$ ConnectionStrings:dbConnectionString %>)"
    OnSelecting="SqlDataSourceSQLB1_Selecting" SelectCommand="SELECT
    [Description], [NavigateUrl], [id] FROM [NSV_Web_WhatsNew]">
    </asp:SqlDataSource>

    I need to take the what ConnectionStrings:dbConnectionString returns above
    and pass it to Crypto.Decrypt()

    I know this isn't correct but something like:
    ConnectionString = <%#Crypto.Decrypt(<%$ConnectionStrings:dbConnectionString
    $>) %>

    Is there anyway to do this?

    Thanks.

    --
    .<Remove This Before Emailing>

    Network & Software Integration
    www.n-sv.com

    "Helping put the pieces of your IT puzzle together"
     
    kfrost, Dec 16, 2005
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andreas Lagemann
    Replies:
    8
    Views:
    724
    Mike Wahler
    Jan 10, 2005
  2. tiwy
    Replies:
    0
    Views:
    591
  3. raunaq
    Replies:
    4
    Views:
    1,064
    Darryl L. Pierce
    Jan 21, 2007
  4. sweety
    Replies:
    9
    Views:
    1,302
    Richard Heathfield
    Feb 7, 2006
  5. Replies:
    1
    Views:
    615
    Daniel Martin
    Jun 16, 2007
  6. Good Night Moon
    Replies:
    9
    Views:
    515
    Rick DeNatale
    Jul 25, 2007
  7. jman
    Replies:
    1
    Views:
    163
    David Golightly
    Aug 14, 2007
  8. Nick the Gr33k

    Eval of expr with 'or' and 'and' within

    Nick the Gr33k, Jun 14, 2013, in forum: Python
    Replies:
    40
    Views:
    428
    Nick the Gr33k
    Jun 15, 2013
Loading...