Setting default input values for an <InsertParameters> <asp:Parameter

Discussion in 'ASP .Net' started by DC, Sep 14, 2007.

  1. DC

    DC Guest

    So I have a DetailsView that when I go into insert new mode I want each
    field to have a default value. How do I go about this?

    Ive tried

    <InsertParameters>
    <asp:parameter Name="ImageName" Type="String">noimage.gif</asp:parameter>
    <asp:parameter Name="Title" Type="String">Dr</asp:parameter>
    <asp:parameter Name="ForeName" Type="String">Forename</asp:parameter>
    <asp:parameter Name="SurName" Type="String">Surname</asp:parameter>

    But this throws up a "No lietrals allowed"

    Ive also tried

    <InsertParameters>
    <asp:parameter Name="ImageName" Type="String" DefaultValue="noimage.gif" />
    <asp:parameter Name="Title" Type="String" DefaultValue="Dr" />
    <asp:parameter Name="ForeName" Type="String" DefaultValue="Forename" />
    <asp:parameter Name="SurName" Type="String" DefaultValue="Surname" />

    But this seems to have no effect whatsoever.

    So how should I actualy be going about setting the initial values of the
    bound fields when they go into edit mode?

    Thanks in advance,
    DC, Sep 14, 2007
    #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. VB Programmer
    Replies:
    1
    Views:
    383
    VB Programmer
    Aug 23, 2006
  2. Replies:
    6
    Views:
    361
    Rolf Magnus
    Jun 22, 2005
  3. Replies:
    4
    Views:
    306
  4. Stuart Redmann
    Replies:
    5
    Views:
    477
    Stuart Redmann
    Dec 14, 2007
  5. donutman
    Replies:
    0
    Views:
    750
    donutman
    Jul 30, 2009
Loading...

Share This Page