Click here to Skip to main content
15,891,316 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
JavaScript
string StaffSearch = txtSearchBy.Text;
if (StaffSearch == null )
{
    Response.Write(@"<script language='javascript'>document.getElementById('drop1').style.display = 'block';</script>");
    e.Cancel = true;
}


Error 2 'System.EventArgs' does not contain a definition for 'Cancel' and no extension method 'Cancel' accepting a first argument of type 'System.EventArgs' could be found (are you missing a using directive or an assembly reference?) 1583 15
Posted
Updated 11-Oct-13 4:21am
v2

1 solution

Look at your code fragment: now, how do you include quotes in a C# string? Not like that...
Try this:

Response.Write(@"<script language='javascript'>document.getElementById('drop1')style.display = 'block';</script>");


Ignore this - it's a bug in the syntax colouriser
Please do not delete - I need to report it and leaving this here will help...
C#
Response.Write(@"<script language='javascript'>document.getElementById('drop1')style.display = 'block';</script>");
 
Share this answer
 
v3
Comments
sathish kumar 11-Oct-13 9:55am    
javascript'">document.getElementById('drop1')style.display = 'block';</script>");

Error 5 ; expected

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900