Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 273 Vote(s) - 3.49 Average
  • 1
  • 2
  • 3
  • 4
  • 5
passing variable from aspx JScript code behind to markup aspx file

#1
I can't find a way to pass a variable declared in my code-behind aspx.js file to the corresponding code-behind.aspx markup file. The error I keep getting is this:

Parser Error Message: Code blocks are not allowed in this file.

My Code-Behind.aspx.js looks like this:

import System;

package Test {
class CodeBehind extends System.Web.UI.Page {
public var my_var;

public function Page_Load(sender, E:System.EventArgs) {
my_var = "This is my_var.";
}
}
}

I compile the code-behind file manually like this:

> jsc.exe /t:library /out:bin\codebehind.dll codebehind.aspx.js

The Code-Behind.aspx looks like this:

<%@ Page Language="JScript" Inherits="Test.CodeBehind" CompilationMode="Never" %>
<HTML>
<HEAD>
<TITLE>Hello World Test</TITLE>
</HEAD>
<BODY STYLE="font-size:12;font-family:arial,verdana,sans-serif;">
<FORM RUNAT="server">
<%= my_var %>
</FORM>
</BODY>
</HTML>

I know there are ASP.NET server controls such as asp:label and all that stuff but all I want is print out the contents of simple variables which serve as placeholders.

I don't want the website to compile everytime it is requested and I would like to keep the CompilationMode option set to "Never" and compile all code manually if possible.


Thanks!
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through