Why does this not work?

  • Thread starter Rex the Strange
  • Start date
R

Rex the Strange

Anyone, please...

<asp:SqlDataSource ID="project_source" runat="server"
OldValuesParameterFormatString='old_{0}'
ConnectionString="<%$ ConnectionStrings:Access Database Test
Connection %>"
ProviderName="<%$ ConnectionStrings:Access Database Test
Connection.ProviderName %>"
UpdateCommand="Update projects set name=@name where
projectid=@old_projectid"
SelectCommand="Select projects.projectid, projects.name from
projects">
<UpdateParameters>
<asp:parameter Name="projectid" Type="Int32" />
<asp:parameter Name="name" Type="String" />
</UpdateParameters>
</asp:SqlDataSource>

<asp:FormView ID="project_formview" runat="server"
DataSourceID="project_source">
<EditItemTemplate>
<asp:HiddenField ID='projectid' runat='server' Value='<%# Bind
("projectid") %>' />
<asp:TextBox ID='name' runat='server' Text='<%# Bind ("name") %>'
MaxLength=255 Width=500 />
<asp:Button ID="update" runat="server" Text="Update Record"
CommandName="Update" />
</EditItemTemplate>

<ItemTemplate>
<asp:Button ID='update_mode' runat='server' Text='Update Mode'
CommandName='Edit' />
</ItemTemplate>
</asp:FormView>
 

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,776
Messages
2,569,603
Members
45,197
Latest member
ScottChare

Latest Threads

Top