![]() ![]() ' Display an error message for the command argument. If CType(e.CommandArgument, String) = "" Then ' Test whether the command argument is an empty string (""). Message.Text = "You clicked the Submit button" ' Display a message for the Submit button being clicked. Sort_List(CType(e.CommandArgument, String)) ![]() Sub CommandBtn_Click(sender As Object, e As CommandEventArgs) Message.Text = "Command argument not recogized." The command argument is not recognized. Message.Text = "You clicked the Sort Descending button." Insert code to sort the list in descending order here. Message.Text = "You clicked the Sort Ascending button." ![]() Insert code to sort the list in ascending order here. Message.Text = "Command name not recogized." Message.Text += ", however the command argument is not recogized." Display an error message for the command argument. ![]() Test whether the command argument is an empty string (""). Display a message for the Submit button being clicked. Void CommandBtn_Click(Object sender, CommandEventArgs e) The following code example demonstrates how to create a Command Button control that sorts a list. Sub SubmitBtn_Click(sender As Object, e As EventArgs) Void SubmitBtn_Click(Object sender, EventArgs e) The following code example demonstrates how to create a Submit Button control that posts the Web page content back to the server. IPostBackEventHandler IButtonControl Examples ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |