Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Setting a dynamic default value in a 2.0 Formview control

Thread Tools

Setting a dynamic default value in a 2.0 Formview control

Adam Pedder
Posts: n/a

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!

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
placement of dynamic control depends on VALUE of dynamic control Larry Bud ASP .Net 1 01-10-2007 10:07 PM
Re: FormView - default value as expression Patrick.O.Ige ASP .Net 0 12-01-2006 09:44 AM
dropdownlist in Formview with datasource - setting selected value from session variable Jason ASP .Net Web Controls 0 10-24-2006 01:29 AM
Changing default selected value in formview dropdownlist =?Utf-8?B?QmVu?= ASP .Net 1 05-19-2006 07:43 PM
Setting a default value for the fileupload web control Ryan ASP .Net Web Controls 3 05-19-2004 07:33 PM