Re: FormView - default value as expression

Discussion in 'ASP .Net' started by Patrick.O.Ige, Dec 1, 2006.

  1. Rafal have u tried
    <asp:textbox id="tb" text='<%# Bind("yourdefaultvaluefromDB") %>'/>
    or in codebehind map tb.text ="yourdefaultvaluefromDB"
    Hope that helps
    Patrick


    "Rafal" <> wrote in message
    news:...
    > 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
    Patrick.O.Ige, Dec 1, 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. Adam Pedder
    Replies:
    0
    Views:
    1,460
    Adam Pedder
    Jan 24, 2006
  2. =?Utf-8?B?QmVu?=
    Replies:
    1
    Views:
    5,994
    Elliot Rodriguez
    May 19, 2006
  3. C Gillespie
    Replies:
    3
    Views:
    391
    Peter Hansen
    Mar 22, 2005
  4. Chris

    Formview within Formview

    Chris, May 19, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    504
    Chris
    May 19, 2007
  5. David Thielen

    FormView/Repeater/ Eval(FormView data)

    David Thielen, Jun 16, 2006, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    621
    David Thielen
    Jun 16, 2006
Loading...

Share This Page