Thursday, 5 September 2013

Button click event not responding

Button click event not responding

I have had much experience with PHP but am trying to implement a site with
ASP.NET
I have a button I wish to attempt to test by changing the text of.
However, I am not getting any response even when all fields are validated.
Here is my cleint-side code
<strong>What mobile platform do you use?</strong><br />
<asp:DropDownList ID="MobilePlatforms" runat="server">
<asp:ListItem></asp:ListItem>
<asp:ListItem Value="iOS">iOS (Apple)</asp:ListItem>
<asp:ListItem Value="Android">Android</asp:ListItem>
<asp:ListItem Value="Windows">Windows</asp:ListItem>
<asp:ListItem Value="Blackberry">Blackberry</asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator InitialValue=""
ID="MobilePlatformsValidator" runat="server"
ControlToValidate="MobilePlatforms" ErrorMessage="This field
is required." ToolTip="This field is required."
ValidationGroup="UserTypeInformation"
ClientIDMode="Static"><font
color="red">*</font></asp:RequiredFieldValidator>
<div style="text-align:right">
<asp:Button ID="Finish" runat="server" Text="Finish"
Height="30" Width="50" ValidationGroup="UserTypeInformation"
OnClick="FinishButton_Click" />
Here is the C#
protected void FinishButton_Click(object sender, EventArgs e)
{
Finish.Text = "hello";
}

No comments:

Post a Comment