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

D

DC

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,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top