Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: FormView - default value as expression

Reply
Thread Tools

Re: FormView - default value as expression

 
 
Patrick.O.Ige
Guest
Posts: n/a
 
      12-01-2006
Rafal have u tried
<asp:textbox id="tb" text='<%# Bind("yourdefaultvaluefromDB") %>'/>
or in codebehind map tb.text ="yourdefaultvaluefromDB"
Hope that helps
Patrick


"Rafal" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello,
>
> I think my problem is very easy to solve but I'm new in asp.net.
> I'm building a Web-based application and I use .NET 2.0 and MS SQL Server
> 2005.
>
> I have implemented FormView control. I have 3 TextBoxes in
> InsertItemTemplate mode.
> When user wants to fill out the form, then these 3 fields should have
> default values.
> In 2 fields should be "0" but in third field should be current date (e.g.
> 30.11.2006).
> There is Text-Property but I have there e.g. <%# Bind("hereNameOfField")
> %>.
> If I put there my value then it won't save it in the DB.
>
> How can I assign the default values ?
>
> I'd very greateful for help.
>
> with best regards,
> Rafal



 
Reply With Quote
 
 
 
Reply

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
C/C++ language proposal: Change the 'case expression' from "integral constant-expression" to "integral expression" Adem C++ 42 11-04-2008 12:39 PM
C/C++ language proposal: Change the 'case expression' from "integral constant-expression" to "integral expression" Adem C Programming 45 11-04-2008 12:39 PM
Formview within Formview Chris ASP .Net 0 05-19-2007 04:12 PM
Changing default selected value in formview dropdownlist =?Utf-8?B?QmVu?= ASP .Net 1 05-19-2006 07:43 PM
Setting a dynamic default value in a 2.0 Formview control Adam Pedder ASP .Net 0 01-24-2006 03:39 PM



Advertisments