I am experiencing the following error:
Compiler Error Message: BC30205: End of statement expected.
Source Error:
Line 5: <title>UpdateVendor</title>
Line 6: <script runat="server">
Line 7: public void Page_Load(Object sender, EventArgs E) {
Line 8: btnDelete.Attributes.Add("onclick","javascript:if( confirm('Are you
sure you want to delete this record?')== false) return false;");
Line 9: }
Source File: http://localhost/ITDB/UpdateVendor.aspx Line: 7
My javascript code is as follows:
<script runat="server">
public void Page_Load(Object sender, EventArgs E) {
btnDelete.Attributes.Add("onclick","javascript:if( confirm('Are you sure you
want to delete this record?')== false) return false;");
}
void btnDelete_Click(object sender, EventArgs e) {
Message.Text = "You are deleting: " + txtVendorName.Text;
}
</script>
I do not know why this is happening.