<UpdateButton>

The UpdateButton tag renders as a push-button at run-time that, when clicked, initiates the update process, executing the <SubmitCommand> of the associated <EditForm>.

Syntax

<UpdateButton
    AccessKey="string"
    BackColor="color name|#dddddd"
    BorderColor="color name|#dddddd"
    BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge|Inset|Outset"
    BorderWidth="size"
    CssClass="string"
    Font-Bold="True|False"
    Font-Italic="True|False"
    Font-Names="string"
    Font-Overline="True|False"
    Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium|Large|X-Large|XX-Large"
    Font-Strikeout="True|False"
    Font-Underline="True|False"
    ForeColor="color name|#dddddd"
    Height="size"
    OnClientClick="string"
    Redirect="url"
    RedirectMethod="Get|Post"
    Style="string"
    TabIndex="integer"
    Text="string"
    ToolTip="string"
    Visible="True|False"
    Width="size"
/> 
 

Remarks

Back to top

Example

<editform>
  <selectcommand commandtext="SELECT * FROM Users WHERE UserId = @UserId" />
  <submitcommand commandtext="UPDATE Users SET FirstName=@FirstName, LastName=@LastName WHERE UserId=@UserId" />
  <table>
    <tr>
      <td>
        <label for="txtFirstName" text="First Name" />
        <textbox id="txtFirstName" datafield="FirstName" datatype="string" />
      </td>
    </tr>
    <tr>
      <td>
        <label for="txtLastName" text="Last Name" />
        
<textbox id="txtLastName" datafield="LastName" datatype="string" />
      </td>
    </tr>
    <tr>
      <td colspan="2">
        <updatebutton text="Update"/> <cancelbutton text="Cancel"/>
      </td>
    </tr>
  </table>
  <textbox id="txtUserId" datafield="UserId" datatype="int32" visible="false" />
</editform>
Back to top