Setting a dynamic default value in a 2.0 Formview control

Discussion in 'ASP .Net' started by Adam Pedder, Jan 24, 2006.

  1. Adam Pedder

    Adam Pedder Guest

    Hi,

    I'm using the 2.0 Formview control from inside Visual Studio 2005 (VB),
    and am having a problem setting a dynamic value.

    Inside my Insert template I have:

    <asp:TextBox ID="UserNameTextBox" runat="server" Enabled="True"
    Text='<%#Bind("Username") %>'>MyName</asp:TextBox>

    What I want is to be able to set MyName to a dynamic value, in this case
    HttpContext.Current.User.Identity.Name. I don't care how it is done,
    inline or code behind.

    I'd be grateful for any suggestions!

    Adam
    Adam Pedder, Jan 24, 2006
    #1
    1. Advertising

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. =?Utf-8?B?QmVu?=
    Replies:
    1
    Views:
    5,996
    Elliot Rodriguez
    May 19, 2006
  2. Patrick.O.Ige

    Re: FormView - default value as expression

    Patrick.O.Ige, Dec 1, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    417
    Patrick.O.Ige
    Dec 1, 2006
  3. Larry Bud
    Replies:
    1
    Views:
    339
    bruce barker
    Jan 10, 2007
  4. Ryan
    Replies:
    3
    Views:
    413
    Oleg Slyusarchuk
    May 19, 2004
  5. Jason
    Replies:
    0
    Views:
    204
    Jason
    Oct 24, 2006
Loading...

Share This Page