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. Advertisements

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. CJ
    Replies:
    1
    Views:
    1,840
    Andrew Thompson
    Oct 29, 2004
  2. VB Programmer
    Replies:
    1
    Views:
    462
    VB Programmer
    Aug 23, 2006
  3. Replies:
    6
    Views:
    498
    Rolf Magnus
    Jun 22, 2005
  4. Replies:
    4
    Views:
    446
  5. Stuart Redmann
    Replies:
    5
    Views:
    751
    Stuart Redmann
    Dec 14, 2007
  6. donutman
    Replies:
    0
    Views:
    843
    donutman
    Jul 30, 2009
  7. jcpc
    Replies:
    2
    Views:
    1,927
  8. Abdul Mohsin
    Replies:
    1
    Views:
    414
Loading...