![]() |
| |||||||
| Sponsored Links |
![]() | « Previous Thread | Next Thread » |
| | LinkBack | Thread Tools | Display Modes |
|
#1
| ||||
| ||||
| I have this in my HEAD section: Code: <script language="JavaScript">
function CallServerEvent(argument)
{
document.getElementById('<%=Hidden1.ClientID %>').value = argument;
<%= Page.ClientScript.GetPostBackEventReference(this.Button1, "") %>
}
</script>
Code: Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30451: Name 'this' is not declared.
Source Error:
Line 11: {
Line 12: document.getElementById('<%=Hidden1.ClientID %>').value = argument;
Line 13: <%= Page.ClientScript.GetPostBackEventReference(this.Button1, "") %>
Line 14: }
Line 15: </script>
Source File: C:\Inetpub\wwwroot\keithdesign\main.aspx Line: 13
Shem |
| Sponsored Links |
|
#2
| ||||
| ||||
| JavaScript and C# use the 'this' keyword, but you placed it in VB.net code. See this page: ClientScriptManager.GetPostBackEventReference Method (Control, String) (System.Web.UI)
__________________ jmurrayhead If you agree with me... click the icon! If my post solved your problem, click the button in the lower right-hand corner of the post.Join our Folding team: DeveloperBarn Folding |
|
#3
| ||||
| ||||
| "this" must change to "Me" |
|
#5
| ||||
| ||||
| I only made he change i mentioned and it worked |
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|